httpbinding

package
v0.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2021 License: Apache-2.0 Imports: 14 Imported by: 22

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Accept

type Accept func(method string) bool

Accept is method to accept did method.

type Option

type Option func(opts *VDR)

Option configures the peer vdr.

func WithAccept

func WithAccept(accept Accept) Option

WithAccept option is for accept did method.

func WithResolveAuthToken

func WithResolveAuthToken(authToken string) Option

WithResolveAuthToken add auth token for resolve.

func WithTLSConfig

func WithTLSConfig(tlsConfig *tls.Config) Option

WithTLSConfig option is for definition of secured HTTP transport using a tls.Config instance.

func WithTimeout

func WithTimeout(timeout time.Duration) Option

WithTimeout option is for definition of HTTP(s) timeout value of DID Resolver.

type VDR

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

VDR via HTTP(s) endpoint.

func New

func New(endpointURL string, opts ...Option) (*VDR, error)

New creates new DID Resolver.

func (*VDR) Accept

func (v *VDR) Accept(method string) bool

Accept did method - attempt to resolve any method.

func (*VDR) Close

func (v *VDR) Close() error

Close frees resources being maintained by vdr.

func (*VDR) Create added in v0.1.6

func (v *VDR) Create(keyManager kms.KeyManager, didDoc *did.Doc,
	opts ...vdrapi.DIDMethodOption) (*did.DocResolution, error)

Create did doc.

func (*VDR) Deactivate added in v0.1.6

func (v *VDR) Deactivate(didID string, opts ...vdrapi.DIDMethodOption) error

Deactivate did doc.

func (*VDR) Read

func (v *VDR) Read(didID string, _ ...vdrapi.ResolveOption) (*did.DocResolution, error)

Read implements didresolver.DidMethod.Read interface (https://w3c-ccg.github.io/did-resolution/#resolving-input)

func (*VDR) Update added in v0.1.6

func (v *VDR) Update(didDoc *did.Doc, opts ...vdrapi.DIDMethodOption) error

Update did doc.

Jump to

Keyboard shortcuts

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