didstore

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2019 License: Apache-2.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 MockDidMethod

type MockDidMethod struct {
	PutErr      error
	GetValue    *diddoc.Doc
	GetErr      error
	AcceptValue bool
}

MockDidMethod is mock did method

func (*MockDidMethod) Accept

func (r *MockDidMethod) Accept(method string) bool

Accept did method

func (*MockDidMethod) Get

func (r *MockDidMethod) Get(id string) (*diddoc.Doc, error)

Get did document

func (*MockDidMethod) Put

func (r *MockDidMethod) Put(doc *diddoc.Doc, by *[]didstore.ModifiedBy) error

Put did document

type MockDidStore

type MockDidStore struct {
	Store  map[string]*didDoc.Doc
	PutErr error
	GetErr error
}

MockDidStore is mock did store

func NewMockDidStore

func NewMockDidStore() *MockDidStore

NewMockDidStore new didStore instance.

func (*MockDidStore) Get

func (m *MockDidStore) Get(k string) (*didDoc.Doc, error)

Get fetches the record based on key

func (*MockDidStore) Put

func (m *MockDidStore) Put(doc *didDoc.Doc) error

Put stores the key and the record

Jump to

Keyboard shortcuts

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