mock

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 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 VDR

type VDR struct {
	AcceptValue    bool
	StoreErr       error
	AcceptFunc     func(method string, opts ...vdrapi.DIDMethodOption) bool
	ReadFunc       func(didID string, opts ...vdrapi.DIDMethodOption) (*did.DocResolution, error)
	CreateFunc     func(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
}

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

func (*VDR) Accept

func (m *VDR) Accept(method string, opts ...vdrapi.DIDMethodOption) bool

Accept did.

func (*VDR) Close

func (m *VDR) Close() error

Close frees resources being maintained by vdr.

func (*VDR) Create

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

Create did.

func (*VDR) Deactivate

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

Deactivate did.

func (*VDR) Read

func (m *VDR) Read(didID string, opts ...vdrapi.DIDMethodOption) (*did.DocResolution, error)

Read did.

func (*VDR) Update

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

Update did.

type VDRegistry

type VDRegistry 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.DIDMethodOption) (*did.DocResolution, error)
}

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

func (*VDRegistry) Close

func (m *VDRegistry) Close() error

Close frees resources being maintained by vdr.

func (*VDRegistry) Create

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

Create mock implementation of create DID.

func (*VDRegistry) Deactivate

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

Deactivate did.

func (*VDRegistry) Resolve

func (m *VDRegistry) Resolve(didID string, opts ...vdrapi.DIDMethodOption) (*did.DocResolution, error)

Resolve did document.

func (*VDRegistry) Update

func (m *VDRegistry) 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