storage

package
v0.0.0-...-d62ea78 Latest Latest
Warning

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

Go to latest
Published: May 2, 2018 License: Apache-2.0 Imports: 7 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StorageTypes = [...]string{
	"none",
	"memory",
	"file",
}

StorageTypes contains all implemented storage types.

Functions

This section is empty.

Types

type GetSetDeleter

type GetSetDeleter interface {
	Get(nonce [nonceLength]byte) *RequestInfo
	Set(nonce [nonceLength]byte, request RequestInfo)
	Delete(nonce [nonceLength]byte)
}

GetSetDeleter provides a persistent map from []byte nonces to openpgp.Entities

func NewFileStore

func NewFileStore() GetSetDeleter

NewFileStore returns a GetSetDeleter that stores values in a /requests subdirectory

func NewMemoryStore

func NewMemoryStore() GetSetDeleter

NewMemoryStore returns a GetSetDeleter that only stores values in memory

func NewNoneStore

func NewNoneStore() GetSetDeleter

NewNoneStore returns a GetSetDeleter that does not store anything

func NewStore

func NewStore(storageType string) (GetSetDeleter, error)

NewStore returns a net GetSetDeleter that is backed by the specified storage.

type RequestInfo

type RequestInfo struct {
	Key       gpg.Key
	Email     string
	Timestamp time.Time
}

RequestInfo contains information on a signing request

Jump to

Keyboard shortcuts

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