peer

package
v0.14.3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2020 License: MIT Imports: 6 Imported by: 3

Documentation

Index

Constants

View Source
const (
	ErrInvalidShorthand = errors.Error("invalid shorthand")
)

Variables

View Source
var (
	// ErrMissingKey when a key is not passed
	ErrMissingKey = errors.New("missing key")
	// ErrECDSAPrivateKeyRequired when a key is not an ECDSA key
	ErrECDSAPrivateKeyRequired = errors.New(
		"network currently requires an ecdsa private key")
)

Functions

This section is empty.

Types

type ConnectionInfo added in v0.14.1

type ConnectionInfo struct {
	Metadata  object.Metadata   `nimona:"metadata:m,omitempty"`
	PublicKey crypto.PublicKey  `nimona:"publicKey:s,omitempty"`
	Addresses []string          `nimona:"addresses:as,omitempty"`
	Relays    []*ConnectionInfo `nimona:"relays:ao,omitempty"`
}

func (*ConnectionInfo) FromObject added in v0.14.1

func (e *ConnectionInfo) FromObject(o *object.Object) error

func (ConnectionInfo) ToObject added in v0.14.1

func (e ConnectionInfo) ToObject() *object.Object

func (*ConnectionInfo) Type added in v0.14.1

func (e *ConnectionInfo) Type() string

type CryptoPublicKeySyncList added in v0.5.0

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

CryptoPublicKeySyncList -

func NewCryptoPublicKeyValueTypeSyncMap added in v0.5.0

func NewCryptoPublicKeyValueTypeSyncMap() *CryptoPublicKeySyncList

NewCryptoPublicKeyValueTypeSyncMap constructs a new SyncMap

func (*CryptoPublicKeySyncList) Delete added in v0.5.0

Delete -

func (*CryptoPublicKeySyncList) Exists added in v0.5.0

Exists -

func (*CryptoPublicKeySyncList) Put added in v0.5.0

Put -

func (*CryptoPublicKeySyncList) Range added in v0.5.0

func (m *CryptoPublicKeySyncList) Range(i func(k crypto.PublicKey) bool)

Range -

type ObjectHashSyncList added in v0.5.0

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

ObjectHashSyncList -

func NewObjectHashValueTypeSyncMap added in v0.5.0

func NewObjectHashValueTypeSyncMap() *ObjectHashSyncList

NewObjectHashValueTypeSyncMap constructs a new SyncMap

func (*ObjectHashSyncList) Delete added in v0.5.0

func (m *ObjectHashSyncList) Delete(k object.Hash)

Delete -

func (*ObjectHashSyncList) Exists added in v0.5.0

func (m *ObjectHashSyncList) Exists(k object.Hash) bool

Exists -

func (*ObjectHashSyncList) Put added in v0.5.0

func (m *ObjectHashSyncList) Put(k object.Hash)

Put -

func (*ObjectHashSyncList) Range added in v0.5.0

func (m *ObjectHashSyncList) Range(i func(k object.Hash) bool)

Range -

type Shorthand added in v0.11.0

type Shorthand string

Shorthand has the form of `<public-key>@<address>`. They are mostly used for configuration and bootstrapping.

func (Shorthand) ConnectionInfo added in v0.14.1

func (s Shorthand) ConnectionInfo() (*ConnectionInfo, error)

func (Shorthand) IsValid added in v0.11.0

func (s Shorthand) IsValid() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL