Documentation ¶
Index ¶
Constants ¶
View Source
const ( CONTROL_RELAY = 0 CONTROL_NEW_PEER = 1 CONTROL_NEW_PEER_UDP_ADDR = 2 CONTROL_LEAD_DISCO = 3 CONTROL_UPDATE_NETWORK_SECRET = 20 )
Variables ¶
This section is empty.
Functions ¶
func MustParseNonce ¶
Types ¶
type FileSecretStore ¶ added in v0.1.0
type FileSecretStore struct {
StoreFilePath string
}
func (*FileSecretStore) NetworkSecret ¶ added in v0.1.0
func (s *FileSecretStore) NetworkSecret() (NetworkSecret, error)
func (*FileSecretStore) UpdateNetworkSecret ¶ added in v0.1.0
func (s *FileSecretStore) UpdateNetworkSecret(secret NetworkSecret) error
type Metadata ¶ added in v0.0.2
type Metadata struct { SilenceMode bool `json:"silenceMode"` Alias1 string `json:"alias1"` Alias2 string `json:"alias2"` Extra map[string]any `json:"extra"` }
func (Metadata) MustMarshalJSON ¶ added in v0.0.2
type NetworkSecret ¶
type NetworkSecret struct { Secret string `json:"secret"` Network string `json:"network"` Expire time.Time `json:"expire"` }
func (NetworkSecret) Expired ¶ added in v0.1.0
func (s NetworkSecret) Expired() bool
func (*NetworkSecret) NetworkSecret ¶ added in v0.1.0
func (s *NetworkSecret) NetworkSecret() (NetworkSecret, error)
func (*NetworkSecret) UpdateNetworkSecret ¶ added in v0.1.0
func (s *NetworkSecret) UpdateNetworkSecret(secret NetworkSecret) error
type SecretStore ¶ added in v0.1.0
type SecretStore interface { NetworkSecret() (NetworkSecret, error) UpdateNetworkSecret(NetworkSecret) error }
Click to show internal directories.
Click to hide internal directories.