httpbinding

package
v0.1.3-0...-617a0de Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

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 *VDRI)

Option configures the peer vdri

func WithAccept

func WithAccept(accept Accept) Option

WithAccept option is for accept did method

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 VDRI

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

VDRI via HTTP(s) endpoint

func New

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

New creates new DID Resolver

func (*VDRI) Accept

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

Accept did method - attempt to resolve any method

func (*VDRI) Build

func (v *VDRI) Build(pubKey *vdriapi.PubKey, opts ...vdriapi.DocOpts) (*did.Doc, error)

Build did doc TODO separate this public DID create from httpbinding

and remove with request builder option [Issue #860]

func (*VDRI) Close

func (v *VDRI) Close() error

Close frees resources being maintained by vdri.

func (*VDRI) Read

func (v *VDRI) Read(didID string, _ ...vdriapi.ResolveOpts) (*did.Doc, error)

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

func (*VDRI) Store

func (v *VDRI) Store(doc *did.Doc, by *[]vdriapi.ModifiedBy) error

Store did doc

Jump to

Keyboard shortcuts

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