Version: v0.0.0-...-321511a Latest Latest

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

Go to latest
Published: Jan 7, 2018 License: MIT Imports: 8 Imported by: 0



Stores data in files on disk.



This section is empty.


This section is empty.


func NewAddresses

func NewAddresses(config *Config) backend.AddressesBackend

func NewContacts

func NewContacts(config *Config) backend.ContactsBackend

func NewKeys

func NewKeys(config *Config, users backend.UsersBackend) backend.KeysBackend

func NewUsersSettings

func NewUsersSettings(config *Config, users backend.UsersBackend) backend.UsersBackend

func Use

func Use(bkd *backend.Backend, config *Config)

func UseAddresses

func UseAddresses(bkd *backend.Backend, config *Config)

func UseContacts

func UseContacts(bkd *backend.Backend, config *Config)

func UseKeys

func UseKeys(bkd *backend.Backend, config *Config)

func UseUsersSettings

func UseUsersSettings(bkd *backend.Backend, config *Config)


type Addresses

type Addresses struct {
	// contains filtered or unexported fields

func (*Addresses) DeleteAddress

func (b *Addresses) DeleteAddress(user, id string) error

func (*Addresses) GetAddress

func (b *Addresses) GetAddress(user, id string) (*backend.Address, error)

func (*Addresses) InsertAddress

func (b *Addresses) InsertAddress(user string, address *backend.Address) (*backend.Address, error)

func (*Addresses) ListAddresses

func (b *Addresses) ListAddresses(user string) ([]*backend.Address, error)

func (*Addresses) UpdateAddress

func (b *Addresses) UpdateAddress(user string, update *backend.AddressUpdate) (*backend.Address, error)

type Config

type Config struct {
	Directory string

type Contacts

type Contacts struct {
	// contains filtered or unexported fields

func (*Contacts) DeleteAllContacts

func (b *Contacts) DeleteAllContacts(user string) error

func (*Contacts) DeleteContact

func (b *Contacts) DeleteContact(user, id string) error

func (*Contacts) InsertContact

func (b *Contacts) InsertContact(user string, contact *backend.Contact) (*backend.Contact, error)

func (*Contacts) ListContacts

func (b *Contacts) ListContacts(user string) ([]*backend.Contact, error)

func (*Contacts) UpdateContact

func (b *Contacts) UpdateContact(user string, update *backend.ContactUpdate) (*backend.Contact, error)

type Keys

type Keys struct {
	// contains filtered or unexported fields

Stores private & public keys on disk. Public keys are stored in DOMAIN/USERNAME.pub.gpg and private keys are in DOMAIN/USERNAME.priv.gpg.

func (*Keys) GetKeypair

func (b *Keys) GetKeypair(email string) (keypair *backend.Keypair, err error)

func (*Keys) GetPublicKey

func (b *Keys) GetPublicKey(email string) (string, error)

func (*Keys) InsertKeypair

func (b *Keys) InsertKeypair(email string, keypair *backend.Keypair) (*backend.Keypair, error)

func (*Keys) UpdateKeypair

func (b *Keys) UpdateKeypair(email string, keypair *backend.Keypair) (updated *backend.Keypair, err error)

type UsersSettings

type UsersSettings struct {
	// contains filtered or unexported fields

func (*UsersSettings) Auth

func (b *UsersSettings) Auth(username, password string) (user *backend.User, err error)

func (*UsersSettings) DeleteUser

func (b *UsersSettings) DeleteUser(id string) error

func (*UsersSettings) GetUser

func (b *UsersSettings) GetUser(id string) (user *backend.User, err error)

func (*UsersSettings) InsertUser

func (b *UsersSettings) InsertUser(user *backend.User, password string) (inserted *backend.User, err error)

func (*UsersSettings) UpdateUser

func (b *UsersSettings) UpdateUser(update *backend.UserUpdate) (err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to