Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressedMessage ¶
AddressedMessage is a Message with a Sender and Recipient public key.
type ContactInfo ¶
ContactInfo represents the local name for an address.
type ContactInfos ¶
type ContactInfos []ContactInfo
ContactInfos is a sortable slice of contact information.
func (ContactInfos) Less ¶
func (c ContactInfos) Less(i, j int) bool
Less implements sort.Interface.
type Contacts ¶
type Contacts interface { // Key returns the latest public key for the given name. Key(name string) (*sf.PublicKey, error) // Name returns the latest name given to the public key. Name(key *sf.PublicKey) (string, error) // Put assigns a public key to a given name, superseding any prior name // assignment. Put(name string, key *sf.PublicKey) error // Current returns the current name assignments. Current() (ContactInfos, error) }
Contacts organizes public keys by a locally assigned name.
type Service ¶
type Service interface { // Push queues a message to a recipient. Push(msg *AddressedMessage) error // Pop retrieves messages addressed to a recipient and removes them. Pop(recipient string) ([]*AddressedMessage, error) }
Service stores messages for a shadowfax server.
type Vault ¶
type Vault interface { // Current returns the latest key pair. Current() (*sf.KeyPair, error) // Get returns the key pair for the given public key. Get(key *sf.PublicKey) (*sf.KeyPair, error) // Put adds a new key pair, which becomes the latest, current key pair. Put(keyPair *sf.KeyPair) error // Each calls the given function with each key pair in the vault. // // Iteration stops if the function returns an error. Each(func(key *sf.KeyPair) error) error }
Vault stores public-private key pairs.
Click to show internal directories.
Click to hide internal directories.