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 ManagedDocumentValidator(serviceResolver types.ServiceResolver) did.Validator
- func NetworkDocumentValidator() did.Validator
- func TestMethodDIDAPrivateKey() crypto.TestKey
- func TestMethodDIDBPrivateKey() crypto.TestKey
- type Ambassador
- type Config
- type InvalidServiceError
- type MockAmbassador
- type MockAmbassadorMockRecorder
- type VDR
- func (r *VDR) Config() interface{}
- func (r *VDR) Configure(_ core.ServerConfig) error
- func (r *VDR) ConflictedDocuments() ([]did.Document, []types.DocumentMetadata, error)
- func (r *VDR) Create(ctx context.Context, options types.DIDCreationOptions) (*did.Document, crypto.Key, error)
- func (r *VDR) Diagnostics() []core.DiagnosticResult
- func (r *VDR) IsOwner(ctx context.Context, id did.DID) (bool, error)
- func (r *VDR) ListOwned(ctx context.Context) ([]did.DID, error)
- func (r *VDR) Name() string
- func (r *VDR) Shutdown() error
- func (r *VDR) Start() error
- func (r *VDR) Update(ctx context.Context, id did.DID, next did.Document) error
Constants ¶
const ModuleName = "VDR"
ModuleName is the name of the engine
Variables ¶
var ErrThumbprintMismatch = errors.New("thumbprint of signing key does not match DID")
ErrThumbprintMismatch is returned when a transaction publishing a new DID is signed with a different key than the DID is generated from
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 ManagedDocumentValidator ¶
func ManagedDocumentValidator(serviceResolver types.ServiceResolver) did.Validator
ManagedDocumentValidator extends NetworkDocumentValidator with extra safety checks to be performed on DID documents managed by this node before they are published on the network.
func NetworkDocumentValidator ¶
NetworkDocumentValidator creates a DID Document validator that checks for inconsistencies in the DID Document: - validate it according to the W3C DID Core Data Model specification - validate it according to the Nuts DID Method specification:
- it checks validationMethods for the following conditions:
- every validationMethod id must have a fragment
- every validationMethod id should have the DID prefix
- every validationMethod id must be unique
- it checks services for the following conditions:
- every service id must have a fragment
- every service id should have the DID prefix
- every service id must be unique
- every service type must be unique
func TestMethodDIDAPrivateKey ¶
TestMethodDIDAPrivateKey returns the key for TestMethodDIDA
func TestMethodDIDBPrivateKey ¶
TestMethodDIDBPrivateKey returns the key for TestMethodDIDB
Types ¶
type Ambassador ¶
type Ambassador interface {
// Configure instructs the ambassador to start receiving DID Documents from the network.
Configure() error
// Start the event listener
Start() error
}
Ambassador acts as integration point between VDR and network by sending DID Documents network and process DID Documents received through the network.
func NewAmbassador ¶
func NewAmbassador(networkClient network.Transactions, didStore didstore.Store, eventManager events.Event) Ambassador
NewAmbassador creates a new Ambassador,
type Config ¶
type Config struct{}
Config holds the config for the VDR engine
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns a fresh Config filled with default values
type InvalidServiceError ¶
type InvalidServiceError struct {
Cause error
}
func (InvalidServiceError) Error ¶
func (e InvalidServiceError) Error() string
func (InvalidServiceError) Unwrap ¶
func (e InvalidServiceError) Unwrap() error
type MockAmbassador ¶
type MockAmbassador struct {
// contains filtered or unexported fields
}
MockAmbassador is a mock of Ambassador interface.
func NewMockAmbassador ¶
func NewMockAmbassador(ctrl *gomock.Controller) *MockAmbassador
NewMockAmbassador creates a new mock instance.
func (*MockAmbassador) Configure ¶
func (m *MockAmbassador) Configure() error
Configure mocks base method.
func (*MockAmbassador) EXPECT ¶
func (m *MockAmbassador) EXPECT() *MockAmbassadorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockAmbassadorMockRecorder ¶
type MockAmbassadorMockRecorder struct {
// contains filtered or unexported fields
}
MockAmbassadorMockRecorder is the mock recorder for MockAmbassador.
func (*MockAmbassadorMockRecorder) Configure ¶
func (mr *MockAmbassadorMockRecorder) Configure() *gomock.Call
Configure indicates an expected call of Configure.
func (*MockAmbassadorMockRecorder) Start ¶
func (mr *MockAmbassadorMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start.
type VDR ¶
type VDR struct {
// contains filtered or unexported fields
}
VDR stands for the Nuts 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(config Config, cryptoClient crypto.KeyStore, networkClient network.Transactions, store didstore.Store, eventManager events.Event) *VDR
NewVDR creates a new VDR with provided params
func (*VDR) Configure ¶
func (r *VDR) Configure(_ core.ServerConfig) error
Configure configures the VDR engine.
func (*VDR) ConflictedDocuments ¶
func (*VDR) Create ¶
func (r *VDR) Create(ctx context.Context, options types.DIDCreationOptions) (*did.Document, crypto.Key, error)
Create generates a new DID Document
func (*VDR) Diagnostics ¶
func (r *VDR) Diagnostics() []core.DiagnosticResult
Diagnostics returns the diagnostics for this engine
Source Files
¶
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. |
|
Package didservice contains DID Document related functionality that only matters to the current node.
|
Package didservice contains DID Document related functionality that only matters to the current node. |
|
Package didstore is a generated GoMock package.
|
Package didstore is a generated GoMock package. |
|
Package types is a generated GoMock package.
|
Package types is a generated GoMock package. |