vdr

package
v0.1.6-0...-5c25bcb Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockVDR

type MockVDR struct {
	AcceptValue bool
	StoreErr    error
	ReadFunc    func(didID string, opts ...vdrapi.ResolveOption) (*did.DocResolution, error)
	CreateFunc  func(keyManager kms.KeyManager, did *did.Doc,
		opts ...vdrapi.DIDMethodOption) (*did.DocResolution, error)
	UpdateFunc     func(didDoc *did.Doc, opts ...vdrapi.DIDMethodOption) error
	DeactivateFunc func(did string, opts ...vdrapi.DIDMethodOption) error
	CloseErr       error
}

MockVDR mock implementation of vdr to be used only for unit tests.

func (*MockVDR) Accept

func (m *MockVDR) Accept(method string) bool

Accept did.

func (*MockVDR) Close

func (m *MockVDR) Close() error

Close frees resources being maintained by vdr.

func (*MockVDR) Create

func (m *MockVDR) Create(keyManager kms.KeyManager, didDoc *did.Doc,
	opts ...vdrapi.DIDMethodOption) (*did.DocResolution, error)

Create did.

func (*MockVDR) Deactivate

func (m *MockVDR) Deactivate(didID string, opts ...vdrapi.DIDMethodOption) error

Deactivate did.

func (*MockVDR) Read

func (m *MockVDR) Read(didID string, opts ...vdrapi.ResolveOption) (*did.DocResolution, error)

Read did.

func (*MockVDR) Update

func (m *MockVDR) Update(didDoc *did.Doc, opts ...vdrapi.DIDMethodOption) error

Update did.

type MockVDRegistry

type MockVDRegistry struct {
	CreateErr      error
	CreateValue    *did.Doc
	CreateFunc     func(string, *did.Doc, ...vdrapi.DIDMethodOption) (*did.DocResolution, error)
	UpdateFunc     func(didDoc *did.Doc, opts ...vdrapi.DIDMethodOption) error
	DeactivateFunc func(did string, opts ...vdrapi.DIDMethodOption) error
	ResolveErr     error
	ResolveValue   *did.Doc
	ResolveFunc    func(didID string, opts ...vdrapi.ResolveOption) (*did.DocResolution, error)
}

MockVDRegistry mock implementation of vdr to be used only for unit tests.

func (*MockVDRegistry) Close

func (m *MockVDRegistry) Close() error

Close frees resources being maintained by vdr.

func (*MockVDRegistry) Create

func (m *MockVDRegistry) Create(method string, didDoc *did.Doc,
	opts ...vdrapi.DIDMethodOption) (*did.DocResolution, error)

Create mock implementation of create DID.

func (*MockVDRegistry) Deactivate

func (m *MockVDRegistry) Deactivate(didID string, opts ...vdrapi.DIDMethodOption) error

Deactivate did.

func (*MockVDRegistry) Resolve

func (m *MockVDRegistry) Resolve(didID string, opts ...vdrapi.ResolveOption) (*did.DocResolution, error)

Resolve did document.

func (*MockVDRegistry) Update

func (m *MockVDRegistry) Update(didDoc *did.Doc, opts ...vdrapi.DIDMethodOption) error

Update did.

Jump to

Keyboard shortcuts

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