httpbinding

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2019 License: Apache-2.0 Imports: 10 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 DIDResolver

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

DIDResolver DID Resolver via HTTP(s) endpoint

func New

func New(endpointURL string, opts ...ResolverOpt) (*DIDResolver, error)

New creates new DID Resolver

func (*DIDResolver) Accept

func (res *DIDResolver) Accept(method string) bool

Accept did method - attempt to resolve any method

func (*DIDResolver) Read

func (res *DIDResolver) Read(didID string, _ ...didresolver.ResolveOpt) (*did.Doc, error)

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

type ResolverOpt

type ResolverOpt func(opts *resolverOpts)

ResolverOpt is the DID Resolver option

func WithAccept

func WithAccept(accept Accept) ResolverOpt

WithAccept option is for accept did method

func WithTLSConfig

func WithTLSConfig(tlsConfig *tls.Config) ResolverOpt

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

func WithTimeout

func WithTimeout(timeout time.Duration) ResolverOpt

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

Jump to

Keyboard shortcuts

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