resolvehandler

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: Apache-2.0 Imports: 17 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 WithEnableDIDDiscovery

func WithEnableDIDDiscovery(enable bool) Option

WithEnableDIDDiscovery sets optional did discovery flag.

func WithEnableResolutionFromAnchorOrigin added in v1.0.0

func WithEnableResolutionFromAnchorOrigin(enable bool) Option

WithEnableResolutionFromAnchorOrigin sets optional resolution from anchor origin 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 coreResolver, discovery discoveryService,
	domain string, endpointClient endpointClient, remoteResolver remoteResolver,
	anchorGraph common.AnchorGraph, metrics metricsProvider, opts ...Option,
) *ResolveHandler

NewResolveHandler returns a new document resolve handler.

func (*ResolveHandler) ResolveDocument

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

ResolveDocument resolves a document.

Jump to

Keyboard shortcuts

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