Documentation ¶
Index ¶
- Constants
- Variables
- type AddressBook
- func (a *AddressBook) Add(identity zkidentity.PublicIdentity) (string, error)
- func (a *AddressBook) All() []zkidentity.PublicIdentity
- func (a *AddressBook) Del(id [zkidentity.IdentitySize]byte) error
- func (a *AddressBook) FindIdentity(id [zkidentity.IdentitySize]byte) (*zkidentity.PublicIdentity, error)
- func (a *AddressBook) FindNick(nick string) (*zkidentity.PublicIdentity, error)
Constants ¶
View Source
const (
IdentityFilename = "publicidentity.xdr"
)
Variables ¶
View Source
var ( ErrNotFound = errors.New("nick not found") ErrDuplicateNick = errors.New("duplicate nick") )
Functions ¶
This section is empty.
Types ¶
type AddressBook ¶
AddressBook context.
func (*AddressBook) Add ¶
func (a *AddressBook) Add(identity zkidentity.PublicIdentity) (string, error)
Add adds an identity to an AddressBook. The identity is always added and can not fail. The returned error is used to indicate if the nick, which is used as the lookup key, was modified. The caller is responsible for using the correct lookup nick.
func (*AddressBook) All ¶
func (a *AddressBook) All() []zkidentity.PublicIdentity
All returns an unsorted array of zkidentity.PublicIdentity.
func (*AddressBook) Del ¶
func (a *AddressBook) Del(id [zkidentity.IdentitySize]byte) error
Del permanently removes user from the address book.
func (*AddressBook) FindIdentity ¶
func (a *AddressBook) FindIdentity(id [zkidentity.IdentitySize]byte) (*zkidentity.PublicIdentity, error)
FindIdentity returns the identity associated with identity.
func (*AddressBook) FindNick ¶
func (a *AddressBook) FindNick(nick string) (*zkidentity.PublicIdentity, error)
FindNick returns the identity associated with nick.
Click to show internal directories.
Click to hide internal directories.