Documentation
¶
Overview ¶
Package vdr is a generated GoMock package.
Package vdr contains a verifiable data registry to the w3c specification and provides primitives for storing and working with Nuts DID based identities. It provides an easy to work with web api and a command line interface. It provides underlying storage back ends to store, update and search for Nuts identities.
Index ¶
- Constants
- Variables
- func TestMethodDIDAPrivateKey() crypto.TestKey
- func TestMethodDIDBPrivateKey() crypto.TestKey
- type DBDocumentOwner
- type MockVDR
- func (m *MockVDR) ConflictedDocuments() ([]did.Document, []resolver.DocumentMetadata, error)
- func (m *MockVDR) DocumentOwner() didsubject.DocumentOwner
- func (m *MockVDR) EXPECT() *MockVDRMockRecorder
- func (m *MockVDR) NutsDocumentManager() didsubject.DocumentManager
- func (m *MockVDR) PublicURL() *url.URL
- func (m *MockVDR) ResolveManaged(id did.DID) (*did.Document, error)
- func (m *MockVDR) Resolver() resolver.DIDResolver
- type MockVDRMockRecorder
- func (mr *MockVDRMockRecorder) ConflictedDocuments() *gomock.Call
- func (mr *MockVDRMockRecorder) DocumentOwner() *gomock.Call
- func (mr *MockVDRMockRecorder) NutsDocumentManager() *gomock.Call
- func (mr *MockVDRMockRecorder) PublicURL() *gomock.Call
- func (mr *MockVDRMockRecorder) ResolveManaged(id any) *gomock.Call
- func (mr *MockVDRMockRecorder) Resolver() *gomock.Call
- type Module
- func (r *Module) Configure(config core.ServerConfig) error
- func (r *Module) ConflictedDocuments() ([]did.Document, []resolver.DocumentMetadata, error)
- func (r *Module) Diagnostics() []core.DiagnosticResult
- func (r *Module) DocumentOwner() didsubject.DocumentOwner
- func (r *Module) Migrate() error
- func (r *Module) Name() string
- func (r *Module) NutsDocumentManager() didsubject.DocumentManager
- func (r *Module) PublicURL() *url.URL
- func (r *Module) Resolve(id did.DID, metadata *resolver.ResolveMetadata) (*did.Document, *resolver.DocumentMetadata, error)
- func (r *Module) ResolveManaged(id did.DID) (*did.Document, error)
- func (r *Module) Resolver() resolver.DIDResolver
- func (r *Module) Shutdown() error
- func (r *Module) Start() error
- type MultiDocumentOwner
- type VDR
Constants ¶
const ModuleName = "VDR"
ModuleName is the name of the engine
Variables ¶
var TestDIDA = did.MustParseDID("did:nuts:GvkzxsezHvEc8nGhgz6Xo3jbqkHwswLmWw3CYtCm7hAW")
TestDIDA is a testDID
var TestDIDB = did.MustParseDID("did:nuts:B8PUHs2AUHbFF1xLLK4eZjgErEcMXHxs68FteY7NDtCY")
TestDIDB is a testDID
var TestMethodDIDA = did.MustParseDIDURL(TestDIDA.String() + "#abc-method-1")
TestMethodDIDA is a test method DID for the TestDIDA
var TestMethodDIDB, _ = did.ParseDIDURL(TestDIDB.String() + "#abc-method-2")
TestMethodDIDB is a test method DID for the TestDIDB
Functions ¶
func TestMethodDIDAPrivateKey ¶
TestMethodDIDAPrivateKey returns the key for TestMethodDIDA
func TestMethodDIDBPrivateKey ¶
TestMethodDIDBPrivateKey returns the key for TestMethodDIDB
Types ¶
type DBDocumentOwner ¶
type MockVDR ¶
type MockVDR struct {
// contains filtered or unexported fields
}
MockVDR is a mock of VDR interface.
func NewMockVDR ¶
func NewMockVDR(ctrl *gomock.Controller) *MockVDR
NewMockVDR creates a new mock instance.
func (*MockVDR) ConflictedDocuments ¶
ConflictedDocuments mocks base method.
func (*MockVDR) DocumentOwner ¶
func (m *MockVDR) DocumentOwner() didsubject.DocumentOwner
DocumentOwner mocks base method.
func (*MockVDR) EXPECT ¶
func (m *MockVDR) EXPECT() *MockVDRMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockVDR) NutsDocumentManager ¶
func (m *MockVDR) NutsDocumentManager() didsubject.DocumentManager
NutsDocumentManager mocks base method.
func (*MockVDR) ResolveManaged ¶
ResolveManaged mocks base method.
func (*MockVDR) Resolver ¶
func (m *MockVDR) Resolver() resolver.DIDResolver
Resolver mocks base method.
type MockVDRMockRecorder ¶
type MockVDRMockRecorder struct {
// contains filtered or unexported fields
}
MockVDRMockRecorder is the mock recorder for MockVDR.
func (*MockVDRMockRecorder) ConflictedDocuments ¶
func (mr *MockVDRMockRecorder) ConflictedDocuments() *gomock.Call
ConflictedDocuments indicates an expected call of ConflictedDocuments.
func (*MockVDRMockRecorder) DocumentOwner ¶
func (mr *MockVDRMockRecorder) DocumentOwner() *gomock.Call
DocumentOwner indicates an expected call of DocumentOwner.
func (*MockVDRMockRecorder) NutsDocumentManager ¶
func (mr *MockVDRMockRecorder) NutsDocumentManager() *gomock.Call
NutsDocumentManager indicates an expected call of NutsDocumentManager.
func (*MockVDRMockRecorder) PublicURL ¶
func (mr *MockVDRMockRecorder) PublicURL() *gomock.Call
PublicURL indicates an expected call of PublicURL.
func (*MockVDRMockRecorder) ResolveManaged ¶
func (mr *MockVDRMockRecorder) ResolveManaged(id any) *gomock.Call
ResolveManaged indicates an expected call of ResolveManaged.
func (*MockVDRMockRecorder) Resolver ¶
func (mr *MockVDRMockRecorder) Resolver() *gomock.Call
Resolver indicates an expected call of Resolver.
type Module ¶
type Module struct {
// new style DID management
didsubject.Manager
// contains filtered or unexported fields
}
Module implements VDR, which stands for the Verifiable Data Registry. It is the public entrypoint to work with W3C DID documents. It connects the Resolve, Create and Update DID methods to the network, and receives events back from the network which are processed in the store. It is also a Runnable, Diagnosable and Configurable Nuts Engine.
func NewVDR ¶
func NewVDR(cryptoClient crypto.KeyStore, networkClient network.Transactions, didStore didnutsStore.Store, eventManager events.Event, storageInstance storage.Engine, pkiValidator pki.Validator) *Module
NewVDR creates a new Module with provided params
func (*Module) Configure ¶
func (r *Module) Configure(config core.ServerConfig) error
Configure configures the Module engine.
func (*Module) ConflictedDocuments ¶
func (*Module) Diagnostics ¶
func (r *Module) Diagnostics() []core.DiagnosticResult
Diagnostics returns the diagnostics for this engine
func (*Module) DocumentOwner ¶
func (r *Module) DocumentOwner() didsubject.DocumentOwner
func (*Module) NutsDocumentManager ¶
func (r *Module) NutsDocumentManager() didsubject.DocumentManager
NutsDocumentManager returns the nuts document manager Deprecated
func (*Module) Resolve ¶
func (r *Module) Resolve(id did.DID, metadata *resolver.ResolveMetadata) (*did.Document, *resolver.DocumentMetadata, error)
Resolve resolves any DID document which DID method is supported. To only resolve DID documents managed by the local node, use ResolveManaged().
func (*Module) ResolveManaged ¶
ResolveManaged resolves a DID document that is managed by the local node.
func (*Module) Resolver ¶
func (r *Module) Resolver() resolver.DIDResolver
type MultiDocumentOwner ¶
type MultiDocumentOwner struct {
DocumentOwners []didsubject.DocumentOwner
}
MultiDocumentOwner check ownage via multiple DocumentOwners. This is to overcome VDR v1 API which can only manipulate did:nuts VDR V1 API does not change the SQL DB state so it has to check private keys.
type VDR ¶
type VDR interface {
// NutsDocumentManager returns the nuts document manager.
// Deprecated
NutsDocumentManager() didsubject.DocumentManager
// DocumentOwner returns the document owner.
DocumentOwner() didsubject.DocumentOwner
// ResolveManaged resolves a DID document that is managed by the local node.
ResolveManaged(id did.DID) (*did.Document, error)
// Resolver returns the resolver for getting the DID document for a DID.
Resolver() resolver.DIDResolver
// ConflictedDocuments returns the DID Document and metadata of all documents with a conflict.
ConflictedDocuments() ([]did.Document, []resolver.DocumentMetadata, error)
// PublicURL returns the public URL of the Nuts node, which is used as base URL for web-based DIDs.
PublicURL() *url.URL
}
VDR defines the public end facing methods for the Verifiable Data Registry.
Directories
¶
| Path | Synopsis |
|---|---|
|
api
|
|
|
v1
Package v1 provides primitives to interact with the openapi HTTP API.
|
Package v1 provides primitives to interact with the openapi HTTP API. |
|
v2
Package v2 provides primitives to interact with the openapi HTTP API.
|
Package v2 provides primitives to interact with the openapi HTTP API. |
|
Package didnuts is a generated GoMock package.
|
Package didnuts is a generated GoMock package. |
|
didstore
Package didstore is a generated GoMock package.
|
Package didstore is a generated GoMock package. |
|
Package didsubject is a generated GoMock package.
|
Package didsubject is a generated GoMock package. |
|
Package resolver is a generated GoMock package.
|
Package resolver is a generated GoMock package. |