Documentation ¶
Index ¶
- type MockVDR
- func (m *MockVDR) Accept(method string) bool
- func (m *MockVDR) Close() error
- func (m *MockVDR) Create(keyManager kms.KeyManager, didDoc *did.Doc, opts ...vdrapi.DIDMethodOption) (*did.DocResolution, error)
- func (m *MockVDR) Deactivate(didID string, opts ...vdrapi.DIDMethodOption) error
- func (m *MockVDR) Read(didID string, opts ...vdrapi.ResolveOption) (*did.DocResolution, error)
- func (m *MockVDR) Update(didDoc *did.Doc, opts ...vdrapi.DIDMethodOption) error
- type MockVDRegistry
- func (m *MockVDRegistry) Close() error
- func (m *MockVDRegistry) Create(method string, didDoc *did.Doc, opts ...vdrapi.DIDMethodOption) (*did.DocResolution, error)
- func (m *MockVDRegistry) Deactivate(didID string, opts ...vdrapi.DIDMethodOption) error
- func (m *MockVDRegistry) Resolve(didID string, opts ...vdrapi.ResolveOption) (*did.DocResolution, error)
- func (m *MockVDRegistry) Update(didDoc *did.Doc, opts ...vdrapi.DIDMethodOption) error
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) 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.
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.
Click to show internal directories.
Click to hide internal directories.