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: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DIDCommServiceType = "did-communication"

DIDCommServiceType default DID Communication service endpoint type.

Variables

View Source
var ErrNotFound = errors.New("DID not found")

ErrNotFound is returned when a DID resolver does not find the DID.

Functions

This section is empty.

Types

type DIDMethodOption

type DIDMethodOption func(opts *DIDMethodOpts)

DIDMethodOption is a did method option.

func WithOption

func WithOption(name string, value interface{}) DIDMethodOption

WithOption add option for did method.

type DIDMethodOpts

type DIDMethodOpts struct {
	Values map[string]interface{}
}

DIDMethodOpts did method opts.

type Registry

type Registry interface {
	Resolve(did string, opts ...ResolveOption) (*did.DocResolution, error)
	Create(method string, did *did.Doc, opts ...DIDMethodOption) (*did.DocResolution, error)
	Update(did *did.Doc, opts ...DIDMethodOption) error
	Deactivate(did string, opts ...DIDMethodOption) error
	Close() error
}

Registry vdr registry.

type ResolveOption

type ResolveOption func(opts *ResolveOpts)

ResolveOption is a did resolve option.

func WithHTTPClient

func WithHTTPClient(httpClient *http.Client) ResolveOption

WithHTTPClient the HTTP client input option can be used to resolve with a specific http client. TODO https://github.com/hyperledger/aries-framework-go/issues/2465

func WithNoCache

func WithNoCache(noCache bool) ResolveOption

WithNoCache the no-cache input option can be used to turn cache on or off. TODO https://github.com/hyperledger/aries-framework-go/issues/2465

func WithVersionID

func WithVersionID(versionID interface{}) ResolveOption

WithVersionID the version id input option can be used to request a specific version of a DID Document. TODO https://github.com/hyperledger/aries-framework-go/issues/2465

func WithVersionTime

func WithVersionTime(versionTime time.Time) ResolveOption

WithVersionTime the version time input option can used to request a specific version of a DID Document. TODO https://github.com/hyperledger/aries-framework-go/issues/2465

type ResolveOpts

type ResolveOpts struct {
	HTTPClient  *http.Client
	VersionID   interface{}
	VersionTime string
	NoCache     bool
}

ResolveOpts holds the options for did resolve.

type VDR

type VDR interface {
	Read(did string, opts ...ResolveOption) (*did.DocResolution, error)
	Create(keyManager kms.KeyManager, did *did.Doc, opts ...DIDMethodOption) (*did.DocResolution, error)
	Accept(method string) bool
	Update(did *did.Doc, opts ...DIDMethodOption) error
	Deactivate(did string, opts ...DIDMethodOption) error
	Close() error
}

VDR verifiable data registry interface. TODO https://github.com/hyperledger/aries-framework-go/issues/2475

Jump to

Keyboard shortcuts

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