resolvehandler

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2021 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDocumentNotFound = fmt.Errorf("document not found")

ErrDocumentNotFound is document not found error.

Functions

This section is empty.

Types

type Option

type Option func(opts *ResolveHandler)

Option is an option for resolve handler.

func WithCreateDocumentStore

func WithCreateDocumentStore(store storage.Store) Option

WithCreateDocumentStore will enable resolution from 'create' document store in case that document is not found in operations store.

func WithEnableDIDDiscovery

func WithEnableDIDDiscovery(enable bool) Option

WithEnableDIDDiscovery sets optional did discovery flag.

func WithUnpublishedDIDLabel

func WithUnpublishedDIDLabel(label string) Option

WithUnpublishedDIDLabel sets did label.

type ResolveHandler

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

ResolveHandler resolves generic documents.

func NewResolveHandler

func NewResolveHandler(namespace string, resolver dochandler.Resolver, discovery discovery, anchorGraph common.AnchorGraph, opts ...Option) *ResolveHandler

NewResolveHandler returns a new document resolve handler.

func (*ResolveHandler) ResolveDocument

func (r *ResolveHandler) ResolveDocument(id string) (*document.ResolutionResult, error)

ResolveDocument resolves a document.

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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