Movatterモバイル変換


[0]ホーム

URL:


tests

package
v1.92.2Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2025 License:BSD-3-ClauseImports:10Imported by:0

Details

Repository

github.com/tailscale/tailscale

Links

Documentation

Overview

Package tests serves a list of tests for tailscale.com/cmd/viewer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

typeBasicTypeadded inv1.70.0

typeContaineradded inv1.72.0

type Container[Tany] struct {Item T}

Container is a pre-defined container type, such as a collection, an optionalvalue or a generic wrapper.

func (*Container[T])Cloneadded inv1.72.0

func (c *Container[T]) Clone() *Container[T]

typeContainerViewadded inv1.72.0

type ContainerView[Tviews.ViewCloner[T, V], Vviews.StructView[T]] struct {// contains filtered or unexported fields}

ContainerView is a pre-defined read-only view of a Container[T].

funcContainerViewOfadded inv1.72.0

func ContainerViewOf[Tviews.ViewCloner[T, V], Vviews.StructView[T]](c *Container[T])ContainerView[T, V]

func (ContainerView[T, V])Itemadded inv1.72.0

func (cvContainerView[T, V]) Item() V

typeGenericBasicStructadded inv1.72.0

type GenericBasicStruct[TBasicType] struct {Value T}

typeGenericCloneableStructadded inv1.70.0

type GenericCloneableStruct[Tviews.ViewCloner[T, V], Vviews.StructView[T]] struct {Value TSlice []TMap   map[string]T// Unsupported views.Pointer     *TPtrSlice    []*TPtrKeyMap   map[*T]string `json:"-"`PtrValueMap map[string]*TSliceMap    map[string][]T}

func (*GenericCloneableStruct[T, V])Cloneadded inv1.70.0

func (src *GenericCloneableStruct[T, V]) Clone() *GenericCloneableStruct[T, V]

Clone makes a deep copy of GenericCloneableStruct.The result aliases no memory with the original.

func (*GenericCloneableStruct[T, V])Viewadded inv1.70.0

View returns a read-only view of GenericCloneableStruct.

typeGenericCloneableStructViewadded inv1.70.0

type GenericCloneableStructView[Tviews.ViewCloner[T, V], Vviews.StructView[T]] struct {// contains filtered or unexported fields}

GenericCloneableStructView[T, V] provides a read-only view over GenericCloneableStruct[T, V].

Its methods should only be called if `Valid()` returns true.

func (GenericCloneableStructView[T, V])AsStructadded inv1.70.0

func (vGenericCloneableStructView[T, V]) AsStruct() *GenericCloneableStruct[T, V]

AsStruct returns a clone of the underlying value which aliases no memory withthe original.

func (GenericCloneableStructView[T, V])Mapadded inv1.70.0

func (vGenericCloneableStructView[T, V]) Map()views.MapFn[string, T, V]

func (GenericCloneableStructView[T, V])MarshalJSONadded inv1.70.0

func (vGenericCloneableStructView[T, V]) MarshalJSON() ([]byte,error)

MarshalJSON implementsjsonv1.Marshaler.

func (GenericCloneableStructView[T, V])MarshalJSONToadded inv1.88.0

func (vGenericCloneableStructView[T, V]) MarshalJSONTo(enc *jsontext.Encoder)error

MarshalJSONTo implementsjsonv2.MarshalerTo.

func (GenericCloneableStructView[T, V])Pointeradded inv1.70.0

func (vGenericCloneableStructView[T, V]) Pointer() map[string]T

Unsupported views.

func (GenericCloneableStructView[T, V])PtrKeyMapadded inv1.70.0

func (vGenericCloneableStructView[T, V]) PtrKeyMap() map[*T]string

func (GenericCloneableStructView[T, V])PtrSliceadded inv1.70.0

func (vGenericCloneableStructView[T, V]) PtrSlice() *T

func (GenericCloneableStructView[T, V])PtrValueMapadded inv1.70.0

func (vGenericCloneableStructView[T, V]) PtrValueMap() map[string]*T

func (GenericCloneableStructView[T, V])Sliceadded inv1.70.0

func (vGenericCloneableStructView[T, V]) Slice()views.SliceView[T, V]

func (GenericCloneableStructView[T, V])SliceMapadded inv1.70.0

func (vGenericCloneableStructView[T, V]) SliceMap() map[string][]T

func (*GenericCloneableStructView[T, V])UnmarshalJSONadded inv1.70.0

func (v *GenericCloneableStructView[T, V]) UnmarshalJSON(b []byte)error

UnmarshalJSON implementsjsonv1.Unmarshaler.

func (*GenericCloneableStructView[T, V])UnmarshalJSONFromadded inv1.88.0

func (v *GenericCloneableStructView[T, V]) UnmarshalJSONFrom(dec *jsontext.Decoder)error

UnmarshalJSONFrom implementsjsonv2.UnmarshalerFrom.

func (GenericCloneableStructView[T, V])Validadded inv1.70.0

func (vGenericCloneableStructView[T, V]) Valid()bool

Valid reports whether v's underlying value is non-nil.

func (GenericCloneableStructView[T, V])Valueadded inv1.70.0

func (vGenericCloneableStructView[T, V]) Value() V

typeGenericIntStructadded inv1.70.0

type GenericIntStruct[Tconstraints.Integer] struct {Value   TPointer *TSlice   []TMap     map[string]T// Unsupported views.PtrSlice    []*TPtrKeyMap   map[*T]string `json:"-"`PtrValueMap map[string]*TSliceMap    map[string][]T}

func (*GenericIntStruct[T])Cloneadded inv1.70.0

func (src *GenericIntStruct[T]) Clone() *GenericIntStruct[T]

Clone makes a deep copy of GenericIntStruct.The result aliases no memory with the original.

func (*GenericIntStruct[T])Viewadded inv1.70.0

View returns a read-only view of GenericIntStruct.

typeGenericIntStructViewadded inv1.70.0

type GenericIntStructView[Tconstraints.Integer] struct {// contains filtered or unexported fields}

GenericIntStructView[T] provides a read-only view over GenericIntStruct[T].

Its methods should only be called if `Valid()` returns true.

func (GenericIntStructView[T])AsStructadded inv1.70.0

func (vGenericIntStructView[T]) AsStruct() *GenericIntStruct[T]

AsStruct returns a clone of the underlying value which aliases no memory withthe original.

func (GenericIntStructView[T])Mapadded inv1.70.0

func (vGenericIntStructView[T]) Map()views.Map[string, T]

func (GenericIntStructView[T])MarshalJSONadded inv1.70.0

func (vGenericIntStructView[T]) MarshalJSON() ([]byte,error)

MarshalJSON implementsjsonv1.Marshaler.

func (GenericIntStructView[T])MarshalJSONToadded inv1.88.0

func (vGenericIntStructView[T]) MarshalJSONTo(enc *jsontext.Encoder)error

MarshalJSONTo implementsjsonv2.MarshalerTo.

func (GenericIntStructView[T])Pointeradded inv1.70.0

func (vGenericIntStructView[T]) Pointer()views.ValuePointer[T]

func (GenericIntStructView[T])PtrKeyMapadded inv1.70.0

func (vGenericIntStructView[T]) PtrKeyMap() map[*T]string

func (GenericIntStructView[T])PtrSliceadded inv1.70.0

func (vGenericIntStructView[T]) PtrSlice() *T

Unsupported views.

func (GenericIntStructView[T])PtrValueMapadded inv1.70.0

func (vGenericIntStructView[T]) PtrValueMap() map[string]*T

func (GenericIntStructView[T])Sliceadded inv1.70.0

func (vGenericIntStructView[T]) Slice()views.Slice[T]

func (GenericIntStructView[T])SliceMapadded inv1.70.0

func (vGenericIntStructView[T]) SliceMap() map[string][]T

func (*GenericIntStructView[T])UnmarshalJSONadded inv1.70.0

func (v *GenericIntStructView[T]) UnmarshalJSON(b []byte)error

UnmarshalJSON implementsjsonv1.Unmarshaler.

func (*GenericIntStructView[T])UnmarshalJSONFromadded inv1.88.0

func (v *GenericIntStructView[T]) UnmarshalJSONFrom(dec *jsontext.Decoder)error

UnmarshalJSONFrom implementsjsonv2.UnmarshalerFrom.

func (GenericIntStructView[T])Validadded inv1.70.0

func (vGenericIntStructView[T]) Valid()bool

Valid reports whether v's underlying value is non-nil.

func (GenericIntStructView[T])Valueadded inv1.70.0

func (vGenericIntStructView[T]) Value() T

typeGenericNoPtrsStructadded inv1.70.0

type GenericNoPtrsStruct[TStructWithoutPtrs |netip.Prefix |BasicType] struct {Value   TPointer *TSlice   []TMap     map[string]T// Unsupported views.PtrSlice    []*TPtrKeyMap   map[*T]string `json:"-"`PtrValueMap map[string]*TSliceMap    map[string][]T}

func (*GenericNoPtrsStruct[T])Cloneadded inv1.70.0

func (src *GenericNoPtrsStruct[T]) Clone() *GenericNoPtrsStruct[T]

Clone makes a deep copy of GenericNoPtrsStruct.The result aliases no memory with the original.

func (*GenericNoPtrsStruct[T])Viewadded inv1.70.0

View returns a read-only view of GenericNoPtrsStruct.

typeGenericNoPtrsStructViewadded inv1.70.0

type GenericNoPtrsStructView[TStructWithoutPtrs |netip.Prefix |BasicType] struct {// contains filtered or unexported fields}

GenericNoPtrsStructView[T] provides a read-only view over GenericNoPtrsStruct[T].

Its methods should only be called if `Valid()` returns true.

func (GenericNoPtrsStructView[T])AsStructadded inv1.70.0

AsStruct returns a clone of the underlying value which aliases no memory withthe original.

func (GenericNoPtrsStructView[T])Mapadded inv1.70.0

func (GenericNoPtrsStructView[T])MarshalJSONadded inv1.70.0

func (vGenericNoPtrsStructView[T]) MarshalJSON() ([]byte,error)

MarshalJSON implementsjsonv1.Marshaler.

func (GenericNoPtrsStructView[T])MarshalJSONToadded inv1.88.0

func (vGenericNoPtrsStructView[T]) MarshalJSONTo(enc *jsontext.Encoder)error

MarshalJSONTo implementsjsonv2.MarshalerTo.

func (GenericNoPtrsStructView[T])Pointeradded inv1.70.0

func (GenericNoPtrsStructView[T])PtrKeyMapadded inv1.70.0

func (vGenericNoPtrsStructView[T]) PtrKeyMap() map[*T]string

func (GenericNoPtrsStructView[T])PtrSliceadded inv1.70.0

func (vGenericNoPtrsStructView[T]) PtrSlice() *T

Unsupported views.

func (GenericNoPtrsStructView[T])PtrValueMapadded inv1.70.0

func (vGenericNoPtrsStructView[T]) PtrValueMap() map[string]*T

func (GenericNoPtrsStructView[T])Sliceadded inv1.70.0

func (vGenericNoPtrsStructView[T]) Slice()views.Slice[T]

func (GenericNoPtrsStructView[T])SliceMapadded inv1.70.0

func (vGenericNoPtrsStructView[T]) SliceMap() map[string][]T

func (*GenericNoPtrsStructView[T])UnmarshalJSONadded inv1.70.0

func (v *GenericNoPtrsStructView[T]) UnmarshalJSON(b []byte)error

UnmarshalJSON implementsjsonv1.Unmarshaler.

func (*GenericNoPtrsStructView[T])UnmarshalJSONFromadded inv1.88.0

func (v *GenericNoPtrsStructView[T]) UnmarshalJSONFrom(dec *jsontext.Decoder)error

UnmarshalJSONFrom implementsjsonv2.UnmarshalerFrom.

func (GenericNoPtrsStructView[T])Validadded inv1.70.0

func (vGenericNoPtrsStructView[T]) Valid()bool

Valid reports whether v's underlying value is non-nil.

func (GenericNoPtrsStructView[T])Valueadded inv1.70.0

func (vGenericNoPtrsStructView[T]) Value() T

typeGenericTypeAliasStructadded inv1.74.0

type GenericTypeAliasStruct[T integer, T2views.ViewCloner[T2, V2], V2views.StructView[T2]] struct {NonCloneable TCloneable    T2}

func (*GenericTypeAliasStruct[T, T2, V2])Cloneadded inv1.74.0

func (src *GenericTypeAliasStruct[T, T2, V2]) Clone() *GenericTypeAliasStruct[T, T2, V2]

Clone makes a deep copy of GenericTypeAliasStruct.The result aliases no memory with the original.

func (*GenericTypeAliasStruct[T, T2, V2])Viewadded inv1.74.0

func (p *GenericTypeAliasStruct[T, T2, V2]) View()GenericTypeAliasStructView[T, T2, V2]

View returns a read-only view of GenericTypeAliasStruct.

typeGenericTypeAliasStructViewadded inv1.74.0

type GenericTypeAliasStructView[T integer, T2views.ViewCloner[T2, V2], V2views.StructView[T2]] struct {// contains filtered or unexported fields}

GenericTypeAliasStructView[T, T2, V2] provides a read-only view over GenericTypeAliasStruct[T, T2, V2].

Its methods should only be called if `Valid()` returns true.

func (GenericTypeAliasStructView[T, T2, V2])AsStructadded inv1.74.0

func (vGenericTypeAliasStructView[T, T2, V2]) AsStruct() *GenericTypeAliasStruct[T, T2, V2]

AsStruct returns a clone of the underlying value which aliases no memory withthe original.

func (GenericTypeAliasStructView[T, T2, V2])Cloneableadded inv1.74.0

func (vGenericTypeAliasStructView[T, T2, V2]) Cloneable() V2

func (GenericTypeAliasStructView[T, T2, V2])MarshalJSONadded inv1.74.0

func (vGenericTypeAliasStructView[T, T2, V2]) MarshalJSON() ([]byte,error)

MarshalJSON implementsjsonv1.Marshaler.

func (GenericTypeAliasStructView[T, T2, V2])MarshalJSONToadded inv1.88.0

func (vGenericTypeAliasStructView[T, T2, V2]) MarshalJSONTo(enc *jsontext.Encoder)error

MarshalJSONTo implementsjsonv2.MarshalerTo.

func (GenericTypeAliasStructView[T, T2, V2])NonCloneableadded inv1.74.0

func (vGenericTypeAliasStructView[T, T2, V2]) NonCloneable() T

func (*GenericTypeAliasStructView[T, T2, V2])UnmarshalJSONadded inv1.74.0

func (v *GenericTypeAliasStructView[T, T2, V2]) UnmarshalJSON(b []byte)error

UnmarshalJSON implementsjsonv1.Unmarshaler.

func (*GenericTypeAliasStructView[T, T2, V2])UnmarshalJSONFromadded inv1.88.0

func (v *GenericTypeAliasStructView[T, T2, V2]) UnmarshalJSONFrom(dec *jsontext.Decoder)error

UnmarshalJSONFrom implementsjsonv2.UnmarshalerFrom.

func (GenericTypeAliasStructView[T, T2, V2])Validadded inv1.74.0

func (vGenericTypeAliasStructView[T, T2, V2]) Valid()bool

Valid reports whether v's underlying value is non-nil.

typeMap

type Map struct {Int                 map[string]intSliceInt            map[string][]intStructPtrWithPtr    map[string]*StructWithPtrsStructPtrWithoutPtr map[string]*StructWithoutPtrsStructWithoutPtr    map[string]StructWithoutPtrsSlicesWithPtrs      map[string][]*StructWithPtrsSlicesWithoutPtrs   map[string][]*StructWithoutPtrsStructWithoutPtrKey map[StructWithoutPtrs]int `json:"-"`StructWithPtr       map[string]StructWithPtrs// Unsupported views.SliceIntPtr      map[string][]*intPointerKey       map[*string]int        `json:"-"`StructWithPtrKey map[StructWithPtrs]int `json:"-"`}

func (*Map)Clone

func (src *Map) Clone() *Map

Clone makes a deep copy of Map.The result aliases no memory with the original.

func (*Map)View

func (p *Map) View()MapView

View returns a read-only view of Map.

typeMapContaineradded inv1.72.0

type MapContainer[Kcomparable, Vviews.Cloner[V]] struct {Items map[K]V}

MapContainer is a predefined map-like container type.UnlikeContainer, it has two type parameters, where the valueis the second parameter.

func (*MapContainer[K, V])Cloneadded inv1.72.0

func (c *MapContainer[K, V]) Clone() *MapContainer[K, V]

typeMapContainerViewadded inv1.72.0

type MapContainerView[Kcomparable, Tviews.ViewCloner[T, V], Vviews.StructView[T]] struct {// contains filtered or unexported fields}

MapContainerView is a pre-defined read-only view of aMapContainer[K, T].

funcMapContainerViewOfadded inv1.72.0

func MapContainerViewOf[Kcomparable, Tviews.ViewCloner[T, V], Vviews.StructView[T]](c *MapContainer[K, T])MapContainerView[K, T, V]

func (MapContainerView[K, T, V])Itemsadded inv1.72.0

func (cvMapContainerView[K, T, V]) Items()views.MapFn[K, T, V]

typeMapView

type MapView struct {// contains filtered or unexported fields}

MapView provides a read-only view over Map.

Its methods should only be called if `Valid()` returns true.

func (MapView)AsStruct

func (vMapView) AsStruct() *Map

AsStruct returns a clone of the underlying value which aliases no memory withthe original.

func (MapView)Int

func (vMapView) Int()views.Map[string,int]

func (MapView)MarshalJSON

func (vMapView) MarshalJSON() ([]byte,error)

MarshalJSON implementsjsonv1.Marshaler.

func (MapView)MarshalJSONToadded inv1.88.0

func (vMapView) MarshalJSONTo(enc *jsontext.Encoder)error

MarshalJSONTo implementsjsonv2.MarshalerTo.

func (MapView)PointerKey

func (vMapView) PointerKey() map[*string]int

func (MapView)SliceInt

func (vMapView) SliceInt()views.MapSlice[string,int]

func (MapView)SliceIntPtr

func (vMapView) SliceIntPtr() map[string][]*int

Unsupported views.

func (MapView)StructPtrWithPtradded inv1.30.0

func (MapView)StructPtrWithoutPtradded inv1.30.0

func (MapView)StructWithPtrKey

func (vMapView) StructWithPtrKey() map[StructWithPtrs]int

func (MapView)StructWithoutPtr

func (vMapView) StructWithoutPtr()views.Map[string,StructWithoutPtrs]

func (MapView)StructWithoutPtrKey

func (vMapView) StructWithoutPtrKey()views.Map[StructWithoutPtrs,int]

func (*MapView)UnmarshalJSON

func (v *MapView) UnmarshalJSON(b []byte)error

UnmarshalJSON implementsjsonv1.Unmarshaler.

func (*MapView)UnmarshalJSONFromadded inv1.88.0

func (v *MapView) UnmarshalJSONFrom(dec *jsontext.Decoder)error

UnmarshalJSONFrom implementsjsonv2.UnmarshalerFrom.

func (MapView)Valid

func (vMapView) Valid()bool

Valid reports whether v's underlying value is non-nil.

typeOnlyGetCloneadded inv1.30.0

type OnlyGetClone struct {SinViewerPorFavorbool}

func (*OnlyGetClone)Cloneadded inv1.30.0

func (src *OnlyGetClone) Clone() *OnlyGetClone

Clone makes a deep copy of OnlyGetClone.The result aliases no memory with the original.

typeStructWithContainersadded inv1.72.0

type StructWithContainers struct {IntContainerContainer[int]CloneableContainerContainer[*StructWithPtrs]BasicGenericContainerContainer[GenericBasicStruct[int]]CloneableGenericContainerContainer[*GenericNoPtrsStruct[int]]CloneableMapMapContainer[int, *StructWithPtrs]CloneableGenericMapMapContainer[int, *GenericNoPtrsStruct[int]]}

func (*StructWithContainers)Cloneadded inv1.72.0

Clone makes a deep copy of StructWithContainers.The result aliases no memory with the original.

func (*StructWithContainers)Viewadded inv1.72.0

View returns a read-only view of StructWithContainers.

typeStructWithContainersViewadded inv1.72.0

type StructWithContainersView struct {// contains filtered or unexported fields}

StructWithContainersView provides a read-only view over StructWithContainers.

Its methods should only be called if `Valid()` returns true.

func (StructWithContainersView)AsStructadded inv1.72.0

AsStruct returns a clone of the underlying value which aliases no memory withthe original.

func (StructWithContainersView)BasicGenericContaineradded inv1.72.0

func (vStructWithContainersView) BasicGenericContainer()Container[GenericBasicStruct[int]]

func (StructWithContainersView)CloneableContaineradded inv1.72.0

func (StructWithContainersView)CloneableGenericContaineradded inv1.72.0

func (StructWithContainersView)CloneableGenericMapadded inv1.72.0

func (StructWithContainersView)CloneableMapadded inv1.72.0

func (StructWithContainersView)IntContaineradded inv1.72.0

func (vStructWithContainersView) IntContainer()Container[int]

func (StructWithContainersView)MarshalJSONadded inv1.72.0

func (vStructWithContainersView) MarshalJSON() ([]byte,error)

MarshalJSON implementsjsonv1.Marshaler.

func (StructWithContainersView)MarshalJSONToadded inv1.88.0

func (vStructWithContainersView) MarshalJSONTo(enc *jsontext.Encoder)error

MarshalJSONTo implementsjsonv2.MarshalerTo.

func (*StructWithContainersView)UnmarshalJSONadded inv1.72.0

func (v *StructWithContainersView) UnmarshalJSON(b []byte)error

UnmarshalJSON implementsjsonv1.Unmarshaler.

func (*StructWithContainersView)UnmarshalJSONFromadded inv1.88.0

func (v *StructWithContainersView) UnmarshalJSONFrom(dec *jsontext.Decoder)error

UnmarshalJSONFrom implementsjsonv2.UnmarshalerFrom.

func (StructWithContainersView)Validadded inv1.72.0

Valid reports whether v's underlying value is non-nil.

typeStructWithEmbeddedadded inv1.42.0

type StructWithEmbedded struct {A *StructWithPtrsStructWithSlices}

func (*StructWithEmbedded)Cloneadded inv1.42.0

Clone makes a deep copy of StructWithEmbedded.The result aliases no memory with the original.

func (*StructWithEmbedded)Viewadded inv1.42.0

View returns a read-only view of StructWithEmbedded.

typeStructWithEmbeddedViewadded inv1.42.0

type StructWithEmbeddedView struct {// contains filtered or unexported fields}

StructWithEmbeddedView provides a read-only view over StructWithEmbedded.

Its methods should only be called if `Valid()` returns true.

func (StructWithEmbeddedView)Aadded inv1.42.0

func (StructWithEmbeddedView)AsStructadded inv1.42.0

AsStruct returns a clone of the underlying value which aliases no memory withthe original.

func (StructWithEmbeddedView)MarshalJSONadded inv1.42.0

func (vStructWithEmbeddedView) MarshalJSON() ([]byte,error)

MarshalJSON implementsjsonv1.Marshaler.

func (StructWithEmbeddedView)MarshalJSONToadded inv1.88.0

func (vStructWithEmbeddedView) MarshalJSONTo(enc *jsontext.Encoder)error

MarshalJSONTo implementsjsonv2.MarshalerTo.

func (StructWithEmbeddedView)StructWithSlicesadded inv1.42.0

func (*StructWithEmbeddedView)UnmarshalJSONadded inv1.42.0

func (v *StructWithEmbeddedView) UnmarshalJSON(b []byte)error

UnmarshalJSON implementsjsonv1.Unmarshaler.

func (*StructWithEmbeddedView)UnmarshalJSONFromadded inv1.88.0

func (v *StructWithEmbeddedView) UnmarshalJSONFrom(dec *jsontext.Decoder)error

UnmarshalJSONFrom implementsjsonv2.UnmarshalerFrom.

func (StructWithEmbeddedView)Validadded inv1.42.0

Valid reports whether v's underlying value is non-nil.

typeStructWithMapOfViewsadded inv1.92.0

type StructWithMapOfViews struct {MapOfViews map[string]StructWithoutPtrsView}

func (*StructWithMapOfViews)Cloneadded inv1.92.0

Clone makes a deep copy of StructWithMapOfViews.The result aliases no memory with the original.

func (*StructWithMapOfViews)Viewadded inv1.92.0

View returns a read-only view of StructWithMapOfViews.

typeStructWithMapOfViewsViewadded inv1.92.0

type StructWithMapOfViewsView struct {// contains filtered or unexported fields}

StructWithMapOfViewsView provides a read-only view over StructWithMapOfViews.

Its methods should only be called if `Valid()` returns true.

func (StructWithMapOfViewsView)AsStructadded inv1.92.0

AsStruct returns a clone of the underlying value which aliases no memory withthe original.

func (StructWithMapOfViewsView)MapOfViewsadded inv1.92.0

func (StructWithMapOfViewsView)MarshalJSONadded inv1.92.0

func (vStructWithMapOfViewsView) MarshalJSON() ([]byte,error)

MarshalJSON implementsjsonv1.Marshaler.

func (StructWithMapOfViewsView)MarshalJSONToadded inv1.92.0

func (vStructWithMapOfViewsView) MarshalJSONTo(enc *jsontext.Encoder)error

MarshalJSONTo implementsjsonv2.MarshalerTo.

func (*StructWithMapOfViewsView)UnmarshalJSONadded inv1.92.0

func (v *StructWithMapOfViewsView) UnmarshalJSON(b []byte)error

UnmarshalJSON implementsjsonv1.Unmarshaler.

func (*StructWithMapOfViewsView)UnmarshalJSONFromadded inv1.92.0

func (v *StructWithMapOfViewsView) UnmarshalJSONFrom(dec *jsontext.Decoder)error

UnmarshalJSONFrom implementsjsonv2.UnmarshalerFrom.

func (StructWithMapOfViewsView)Validadded inv1.92.0

Valid reports whether v's underlying value is non-nil.

typeStructWithNoViewadded inv1.80.0

type StructWithNoView struct {Valueint}

typeStructWithPtrs

type StructWithPtrs struct {Value  *StructWithoutPtrsInt    *intNoView *StructWithNoViewNoCloneValue *StructWithoutPtrs `codegen:"noclone"`}

func (*StructWithPtrs)Clone

func (src *StructWithPtrs) Clone() *StructWithPtrs

Clone makes a deep copy of StructWithPtrs.The result aliases no memory with the original.

func (*StructWithPtrs)Equal

func (v *StructWithPtrs) Equal(v2 *StructWithPtrs)bool

func (*StructWithPtrs)String

func (v *StructWithPtrs) String()string

func (*StructWithPtrs)View

View returns a read-only view of StructWithPtrs.

typeStructWithPtrsAliasadded inv1.74.0

type StructWithPtrsAlias =StructWithPtrs

typeStructWithPtrsAliasViewadded inv1.74.0

type StructWithPtrsAliasView =StructWithPtrsView

typeStructWithPtrsView

type StructWithPtrsView struct {// contains filtered or unexported fields}

StructWithPtrsView provides a read-only view over StructWithPtrs.

Its methods should only be called if `Valid()` returns true.

func (StructWithPtrsView)AsStruct

AsStruct returns a clone of the underlying value which aliases no memory withthe original.

func (StructWithPtrsView)Equal

func (StructWithPtrsView)Int

func (StructWithPtrsView)MarshalJSON

func (vStructWithPtrsView) MarshalJSON() ([]byte,error)

MarshalJSON implementsjsonv1.Marshaler.

func (StructWithPtrsView)MarshalJSONToadded inv1.88.0

func (vStructWithPtrsView) MarshalJSONTo(enc *jsontext.Encoder)error

MarshalJSONTo implementsjsonv2.MarshalerTo.

func (StructWithPtrsView)NoCloneValue

func (vStructWithPtrsView) NoCloneValue() *StructWithoutPtrs

func (StructWithPtrsView)NoViewadded inv1.80.0

func (StructWithPtrsView)String

func (vStructWithPtrsView) String()string

func (*StructWithPtrsView)UnmarshalJSON

func (v *StructWithPtrsView) UnmarshalJSON(b []byte)error

UnmarshalJSON implementsjsonv1.Unmarshaler.

func (*StructWithPtrsView)UnmarshalJSONFromadded inv1.88.0

func (v *StructWithPtrsView) UnmarshalJSONFrom(dec *jsontext.Decoder)error

UnmarshalJSONFrom implementsjsonv2.UnmarshalerFrom.

func (StructWithPtrsView)Valid

func (vStructWithPtrsView) Valid()bool

Valid reports whether v's underlying value is non-nil.

func (StructWithPtrsView)Value

typeStructWithSlices

type StructWithSlices struct {Values         []StructWithoutPtrsValuePointers  []*StructWithoutPtrsStructPointers []*StructWithPtrsSlice    []stringPrefixes []netip.PrefixData     []byte// Unsupported views.Structs []StructWithPtrsInts    []*int}

func (*StructWithSlices)Clone

func (src *StructWithSlices) Clone() *StructWithSlices

Clone makes a deep copy of StructWithSlices.The result aliases no memory with the original.

func (*StructWithSlices)View

View returns a read-only view of StructWithSlices.

typeStructWithSlicesView

type StructWithSlicesView struct {// contains filtered or unexported fields}

StructWithSlicesView provides a read-only view over StructWithSlices.

Its methods should only be called if `Valid()` returns true.

func (StructWithSlicesView)AsStruct

AsStruct returns a clone of the underlying value which aliases no memory withthe original.

func (StructWithSlicesView)Data

func (StructWithSlicesView)Ints

func (vStructWithSlicesView) Ints() *int

func (StructWithSlicesView)MarshalJSON

func (vStructWithSlicesView) MarshalJSON() ([]byte,error)

MarshalJSON implementsjsonv1.Marshaler.

func (StructWithSlicesView)MarshalJSONToadded inv1.88.0

func (vStructWithSlicesView) MarshalJSONTo(enc *jsontext.Encoder)error

MarshalJSONTo implementsjsonv2.MarshalerTo.

func (StructWithSlicesView)Prefixes

func (StructWithSlicesView)Slice

func (StructWithSlicesView)StructPointers

func (StructWithSlicesView)Structs

Unsupported views.

func (*StructWithSlicesView)UnmarshalJSON

func (v *StructWithSlicesView) UnmarshalJSON(b []byte)error

UnmarshalJSON implementsjsonv1.Unmarshaler.

func (*StructWithSlicesView)UnmarshalJSONFromadded inv1.88.0

func (v *StructWithSlicesView) UnmarshalJSONFrom(dec *jsontext.Decoder)error

UnmarshalJSONFrom implementsjsonv2.UnmarshalerFrom.

func (StructWithSlicesView)Valid

func (vStructWithSlicesView) Valid()bool

Valid reports whether v's underlying value is non-nil.

func (StructWithSlicesView)Values

typeStructWithTypeAliasFieldsadded inv1.74.0

type StructWithTypeAliasFields struct {WithPtrStructWithPtrsAliasWithoutPtrStructWithoutPtrsAliasWithPtrByPtr    *StructWithPtrsAliasWithoutPtrByPtr *StructWithoutPtrsAliasSliceWithPtrs    []*StructWithPtrsAliasSliceWithoutPtrs []*StructWithoutPtrsAliasMapWithPtrs    map[string]*StructWithPtrsAliasMapWithoutPtrs map[string]*StructWithoutPtrsAliasMapOfSlicesWithPtrs    map[string][]*StructWithPtrsAliasMapOfSlicesWithoutPtrs map[string][]*StructWithoutPtrsAlias}

func (*StructWithTypeAliasFields)Cloneadded inv1.74.0

Clone makes a deep copy of StructWithTypeAliasFields.The result aliases no memory with the original.

func (*StructWithTypeAliasFields)Viewadded inv1.74.0

View returns a read-only view of StructWithTypeAliasFields.

typeStructWithTypeAliasFieldsViewadded inv1.74.0

type StructWithTypeAliasFieldsView struct {// contains filtered or unexported fields}

StructWithTypeAliasFieldsView provides a read-only view over StructWithTypeAliasFields.

Its methods should only be called if `Valid()` returns true.

func (StructWithTypeAliasFieldsView)AsStructadded inv1.74.0

AsStruct returns a clone of the underlying value which aliases no memory withthe original.

func (StructWithTypeAliasFieldsView)MapOfSlicesWithPtrsadded inv1.74.0

func (StructWithTypeAliasFieldsView)MapWithPtrsadded inv1.74.0

func (StructWithTypeAliasFieldsView)MapWithoutPtrsadded inv1.74.0

func (StructWithTypeAliasFieldsView)MarshalJSONadded inv1.74.0

func (vStructWithTypeAliasFieldsView) MarshalJSON() ([]byte,error)

MarshalJSON implementsjsonv1.Marshaler.

func (StructWithTypeAliasFieldsView)MarshalJSONToadded inv1.88.0

MarshalJSONTo implementsjsonv2.MarshalerTo.

func (StructWithTypeAliasFieldsView)SliceWithPtrsadded inv1.74.0

func (StructWithTypeAliasFieldsView)SliceWithoutPtrsadded inv1.74.0

func (*StructWithTypeAliasFieldsView)UnmarshalJSONadded inv1.74.0

func (v *StructWithTypeAliasFieldsView) UnmarshalJSON(b []byte)error

UnmarshalJSON implementsjsonv1.Unmarshaler.

func (*StructWithTypeAliasFieldsView)UnmarshalJSONFromadded inv1.88.0

func (v *StructWithTypeAliasFieldsView) UnmarshalJSONFrom(dec *jsontext.Decoder)error

UnmarshalJSONFrom implementsjsonv2.UnmarshalerFrom.

func (StructWithTypeAliasFieldsView)Validadded inv1.74.0

Valid reports whether v's underlying value is non-nil.

func (StructWithTypeAliasFieldsView)WithPtradded inv1.74.0

func (StructWithTypeAliasFieldsView)WithPtrByPtradded inv1.74.0

func (StructWithTypeAliasFieldsView)WithoutPtradded inv1.74.0

func (StructWithTypeAliasFieldsView)WithoutPtrByPtradded inv1.74.0

typeStructWithoutPtrs

type StructWithoutPtrs struct {IntintPfxnetip.Prefix}

func (*StructWithoutPtrs)Clone

Clone makes a deep copy of StructWithoutPtrs.The result aliases no memory with the original.

func (*StructWithoutPtrs)View

View returns a read-only view of StructWithoutPtrs.

typeStructWithoutPtrsAliasadded inv1.74.0

type StructWithoutPtrsAlias =StructWithoutPtrs

typeStructWithoutPtrsAliasViewadded inv1.74.0

type StructWithoutPtrsAliasView =StructWithoutPtrsView

typeStructWithoutPtrsView

type StructWithoutPtrsView struct {// contains filtered or unexported fields}

StructWithoutPtrsView provides a read-only view over StructWithoutPtrs.

Its methods should only be called if `Valid()` returns true.

func (StructWithoutPtrsView)AsStruct

AsStruct returns a clone of the underlying value which aliases no memory withthe original.

func (StructWithoutPtrsView)Int

func (StructWithoutPtrsView)MarshalJSON

func (vStructWithoutPtrsView) MarshalJSON() ([]byte,error)

MarshalJSON implementsjsonv1.Marshaler.

func (StructWithoutPtrsView)MarshalJSONToadded inv1.88.0

func (vStructWithoutPtrsView) MarshalJSONTo(enc *jsontext.Encoder)error

MarshalJSONTo implementsjsonv2.MarshalerTo.

func (StructWithoutPtrsView)Pfx

func (*StructWithoutPtrsView)UnmarshalJSON

func (v *StructWithoutPtrsView) UnmarshalJSON(b []byte)error

UnmarshalJSON implementsjsonv1.Unmarshaler.

func (*StructWithoutPtrsView)UnmarshalJSONFromadded inv1.88.0

func (v *StructWithoutPtrsView) UnmarshalJSONFrom(dec *jsontext.Decoder)error

UnmarshalJSONFrom implementsjsonv2.UnmarshalerFrom.

func (StructWithoutPtrsView)Valid

Valid reports whether v's underlying value is non-nil.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp