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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDidMethod

func GetDidMethod(didID string) (string, error)

GetDidMethod get did method.

Types

type Option

type Option func(opts *Registry)

Option is a vdr instance option.

func WithDefaultServiceEndpoint

func WithDefaultServiceEndpoint(serviceEndpoint string) Option

WithDefaultServiceEndpoint allows for setting default service endpoint.

func WithDefaultServiceType

func WithDefaultServiceType(serviceType string) Option

WithDefaultServiceType is default service type for this creator.

func WithVDR

func WithVDR(method vdrapi.VDR) Option

WithVDR adds did method implementation for store.

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

Registry vdr registry.

func New

func New(ctx provider, opts ...Option) *Registry

New return new instance of vdr.

func (*Registry) Close

func (r *Registry) Close() error

Close frees resources being maintained by vdr.

func (*Registry) Create

func (r *Registry) Create(didMethod string, did *diddoc.Doc,
	opts ...vdrapi.DIDMethodOption) (*diddoc.DocResolution, error)

Create a new DID Document and store it in this registry.

func (*Registry) Deactivate

func (r *Registry) Deactivate(did string, opts ...vdrapi.DIDMethodOption) error

Deactivate did document.

func (*Registry) Resolve

func (r *Registry) Resolve(did string, opts ...vdrapi.ResolveOption) (*diddoc.DocResolution, error)

Resolve did document.

func (*Registry) Update

func (r *Registry) Update(didDoc *diddoc.Doc, opts ...vdrapi.DIDMethodOption) error

Update did document.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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