store

package
v0.0.0-...-4cf50c0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store interface {
	Init() error
	Type() Type
	WithLogFunc(logFunc func(level, message string, err error)) Store

	// trust grant tokens
	PutTrustGrantToken(token *types.StoredData) (string, error)
	DeleteTrustGrantTokens(ids []string) error
	GetTrustGrantTokens(ids []string) ([]*types.StoredData, error)

	// keypairs
	PutKeyPair(pair *types.StoredData) (string, error)
	DeleteKeyPairs(id []string) error
	GetKeyPairs(ids []string) ([]*types.StoredData, error)

	// trusts
	PutTrust(trust *types.StoredData) (string, error)
	DeleteTrusts(ids []string) error
	GetTrusts(ids []string) ([]*types.StoredData, error)
}

Store interface to a store

type Type

type Type string

Type enum

var (
	StoreTypeShared      Type = "shared"      // shared means that all peers share access to the same store data (i.e. database)
	StoreTypeDistributed Type = "distributed" // distributed means that all peers have their own local copy of the store data (i.e. embedded db)
)

Store types

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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