storage

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2022 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

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

func New

func New(path string) (*Storage, error)

func (*Storage) ActivateSharedPeer

func (storage *Storage) ActivateSharedPeer(sharingKey string, pubkey string) (int64, error)

func (*Storage) AsKeystore

func (storage *Storage) AsKeystore() auth.KeyStore

func (*Storage) CreatePeer

func (storage *Storage) CreatePeer(peer types.PeerInfo) (int64, error)

func (*Storage) DeleteAuthorizerKey

func (storage *Storage) DeleteAuthorizerKey(id string) error

func (*Storage) DeletePeer

func (storage *Storage) DeletePeer(id int64) error

func (*Storage) GetAuthorizerKeyByID

func (storage *Storage) GetAuthorizerKeyByID(id string) (types.AuthorizerKey, error)

func (*Storage) GetPeer

func (storage *Storage) GetPeer(id int64) (types.PeerInfo, error)

func (*Storage) ListAuthorizerKeys

func (storage *Storage) ListAuthorizerKeys() ([]types.AuthorizerKey, error)

func (*Storage) Running

func (storage *Storage) Running() bool

func (*Storage) SearchPeers

func (storage *Storage) SearchPeers(filter *types.PeerInfo) ([]types.PeerInfo, error)

func (*Storage) Shutdown

func (storage *Storage) Shutdown() error

func (*Storage) UpdateAuthorizerKeys

func (storage *Storage) UpdateAuthorizerKeys(keys []types.AuthorizerKey) error

UpdateAuthorizerKeys updates or inserts the given keys. The methods do not validate the key content.

func (*Storage) UpdatePeer

func (storage *Storage) UpdatePeer(peer types.PeerInfo) (int64, error)

Jump to

Keyboard shortcuts

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