Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustParseNonce ¶
Types ¶
type ControlCode ¶ added in v0.6.2
type ControlCode uint8
const ( CONTROL_RELAY ControlCode = 0 CONTROL_NEW_PEER ControlCode = 1 CONTROL_NEW_PEER_UDP_ADDR ControlCode = 2 CONTROL_LEAD_DISCO ControlCode = 3 CONTROL_UPDATE_NETWORK_SECRET ControlCode = 20 CONTROL_CONN ControlCode = 30 )
func (ControlCode) Byte ¶ added in v0.6.2
func (code ControlCode) Byte() byte
func (ControlCode) String ¶ added in v0.6.2
func (code ControlCode) String() string
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 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 Peermap ¶ added in v0.6.0
type Peermap struct {
// contains filtered or unexported fields
}
func NewPeermap ¶ added in v0.6.0
func NewPeermap(server *url.URL, store SecretStore) (*Peermap, error)
func NewPeermapURL ¶ added in v0.6.0
func NewPeermapURL(serverURL string, store SecretStore) (*Peermap, error)
func (*Peermap) SecretStore ¶ added in v0.6.0
func (s *Peermap) SecretStore() SecretStore
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.