mock

package
v1.0.0-...-9f5453b Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2018 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MethodCall

type MethodCall struct {
	Name string
	Args []interface{}
}

type Option

type Option func(*Storage)

func Close

func Close(f closeFunc) Option

func FetchKeyrings

func FetchKeyrings(f fetchKeyringsFunc) Option

func FetchKeys

func FetchKeys(f fetchKeysFunc) Option

func Insert

func Insert(f insertFunc) Option

func MatchKeyword

func MatchKeyword(f resolverFunc) Option

func MatchMD5

func MatchMD5(f resolverFunc) Option

func ModifiedSince

func ModifiedSince(f modifiedSinceFunc) Option

func RenotifyAll

func RenotifyAll(f renotifyAllFunc) Option

func Resolve

func Resolve(f resolverFunc) Option

func Update

func Update(f updateFunc) Option

type Recorder

type Recorder struct {
	Calls []MethodCall
}

func (*Recorder) MethodCount

func (m *Recorder) MethodCount(name string) int

type Storage

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

func NewStorage

func NewStorage(options ...Option) *Storage

func (*Storage) Close

func (m *Storage) Close() error

func (*Storage) FetchKeyrings

func (m *Storage) FetchKeyrings(s []string) ([]*storage.Keyring, error)

func (*Storage) FetchKeys

func (m *Storage) FetchKeys(s []string) ([]*openpgp.PrimaryKey, error)

func (*Storage) Insert

func (m *Storage) Insert(keys []*openpgp.PrimaryKey) (int, error)

func (*Storage) MatchKeyword

func (m *Storage) MatchKeyword(s []string) ([]string, error)

func (*Storage) MatchMD5

func (m *Storage) MatchMD5(s []string) ([]string, error)

func (*Storage) ModifiedSince

func (m *Storage) ModifiedSince(t time.Time) ([]string, error)

func (*Storage) Notify

func (m *Storage) Notify(change storage.KeyChange) error

func (*Storage) RenotifyAll

func (m *Storage) RenotifyAll() error

func (*Storage) Resolve

func (m *Storage) Resolve(s []string) ([]string, error)

func (*Storage) Subscribe

func (m *Storage) Subscribe(f func(storage.KeyChange) error)

func (*Storage) Update

func (m *Storage) Update(key *openpgp.PrimaryKey, lastMD5 string) error

Jump to

Keyboard shortcuts

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