Documentation ¶
Index ¶
- type Book
- func (bk *Book) Add(addr crypto.Address, name string)
- func (bk Book) GetByAddress(addr crypto.Address) (names []string, ok bool)
- func (bk Book) GetByName(name string) (addr crypto.Address, ok bool)
- func (bk Book) GetFromNameOrAddress(addrOrName string) (addr crypto.Address, names []string, ok bool)
- func (bk Book) ImportKeybase(path string) error
- func (bk Book) List() []Entry
- type Entry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Book ¶
type Book struct {
// contains filtered or unexported fields
}
Book reference a list of addresses optionally associated with a name It is not thread safe.
func (*Book) Add ¶
Add inserts a new address into the address book linked to the specified name. An address can be associated with multiple names, yet each name can only belong to one address. Hence, if a name is reused, it will replace the reference to the previous address. Adding an address without a name is permissible.
func (Book) GetByAddress ¶
func (Book) GetFromNameOrAddress ¶
func (Book) ImportKeybase ¶
Click to show internal directories.
Click to hide internal directories.