persist
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package persist contains the Persist type.
Index¶
- type Persist
- type PersistView
- func (v PersistView) AsStruct() *Persist
- func (v PersistView) AttestationKey() tailcfg.StableNodeID
- func (v PersistView) DisallowedTKAStateIDs() views.Slice[string]
- func (p PersistView) Equals(p2 PersistView) bool
- func (v PersistView) MarshalJSON() ([]byte, error)
- func (v PersistView) MarshalJSONTo(enc *jsontext.Encoder) error
- func (v PersistView) NetworkLockKey() key.NLPrivate
- func (v PersistView) NodeID() tailcfg.StableNodeID
- func (v PersistView) OldPrivateNodeKey() key.NodePrivate
- func (v PersistView) PrivateNodeKey() key.NodePrivate
- func (p PersistView) PublicNodeKey() key.NodePublic
- func (p PersistView) PublicNodeKeyOK() (_ key.NodePublic, ok bool)
- func (v *PersistView) UnmarshalJSON(b []byte) error
- func (v *PersistView) UnmarshalJSONFrom(dec *jsontext.Decoder) error
- func (v PersistView) UserProfile() tailcfg.UserProfile
- func (v PersistView) Valid() bool
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typePersist¶
type Persist struct {PrivateNodeKeykey.NodePrivateOldPrivateNodeKeykey.NodePrivate// needed to request key rotationUserProfiletailcfg.UserProfileNetworkLockKeykey.NLPrivateNodeIDtailcfg.StableNodeIDAttestationKeykey.HardwareAttestationKey `json:",omitempty"`// DisallowedTKAStateIDs stores the tka.State.StateID values which// this node will not operate network lock on. This is used to// prevent bootstrapping TKA onto a key authority which was forcibly// disabled.DisallowedTKAStateIDs []string `json:",omitempty"`// contains filtered or unexported fields}Persist is the JSON type stored on disk on nodes to remember theirsettings between runs. This is stored as part of ipn.Prefs and ispersisted per ipn.LoginProfile.
func (*Persist)Clone¶
Clone makes a deep copy of Persist.The result aliases no memory with the original.
func (*Persist)PublicNodeKey¶added inv1.32.3
func (p *Persist) PublicNodeKey()key.NodePublic
PublicNodeKey returns the public key for the node key.
func (*Persist)PublicNodeKeyOK¶added inv1.62.1
func (p *Persist) PublicNodeKeyOK() (pubkey.NodePublic, okbool)
PublicNodeKeyOK returns the public key for the node key.
Unlike PublicNodeKey, it returns ok=false if there is no node private keyinstead of panicking.
func (*Persist)View¶added inv1.32.3
func (p *Persist) View()PersistView
View returns a read-only view of Persist.
typePersistView¶added inv1.32.3
type PersistView struct {// contains filtered or unexported fields}PersistView provides a read-only view over Persist.
Its methods should only be called if `Valid()` returns true.
func (PersistView)AsStruct¶added inv1.32.3
func (vPersistView) AsStruct() *Persist
AsStruct returns a clone of the underlying value which aliases no memory withthe original.
func (PersistView)AttestationKey¶added inv1.90.0
func (vPersistView) AttestationKey()tailcfg.StableNodeID
func (PersistView)DisallowedTKAStateIDs¶added inv1.34.0
func (vPersistView) DisallowedTKAStateIDs()views.Slice[string]
DisallowedTKAStateIDs stores the tka.State.StateID values whichthis node will not operate network lock on. This is used toprevent bootstrapping TKA onto a key authority which was forciblydisabled.
func (PersistView)Equals¶added inv1.34.0
func (pPersistView) Equals(p2PersistView)bool
func (PersistView)MarshalJSON¶added inv1.32.3
func (vPersistView) MarshalJSON() ([]byte,error)
MarshalJSON implementsjsonv1.Marshaler.
func (PersistView)MarshalJSONTo¶added inv1.88.0
func (vPersistView) MarshalJSONTo(enc *jsontext.Encoder)error
MarshalJSONTo implementsjsonv2.MarshalerTo.
func (PersistView)NetworkLockKey¶added inv1.34.0
func (vPersistView) NetworkLockKey()key.NLPrivate
func (PersistView)NodeID¶added inv1.34.0
func (vPersistView) NodeID()tailcfg.StableNodeID
func (PersistView)OldPrivateNodeKey¶added inv1.32.3
func (vPersistView) OldPrivateNodeKey()key.NodePrivate
needed to request key rotation
func (PersistView)PrivateNodeKey¶added inv1.32.3
func (vPersistView) PrivateNodeKey()key.NodePrivate
func (PersistView)PublicNodeKey¶added inv1.34.0
func (pPersistView) PublicNodeKey()key.NodePublic
PublicNodeKey returns the public key for the node key.
It panics if there is no node private key. See PublicNodeKeyOK.
func (PersistView)PublicNodeKeyOK¶added inv1.62.1
func (pPersistView) PublicNodeKeyOK() (_key.NodePublic, okbool)
PublicNodeKeyOK returns the public key for the node key.
Unlike PublicNodeKey, it returns ok=false if there is no node private keyinstead of panicking.
func (*PersistView)UnmarshalJSON¶added inv1.32.3
func (v *PersistView) UnmarshalJSON(b []byte)error
UnmarshalJSON implementsjsonv1.Unmarshaler.
func (*PersistView)UnmarshalJSONFrom¶added inv1.88.0
func (v *PersistView) UnmarshalJSONFrom(dec *jsontext.Decoder)error
UnmarshalJSONFrom implementsjsonv2.UnmarshalerFrom.
func (PersistView)UserProfile¶added inv1.34.0
func (vPersistView) UserProfile()tailcfg.UserProfile
func (PersistView)Valid¶added inv1.32.3
func (vPersistView) Valid()bool
Valid reports whether v's underlying value is non-nil.