dochandler

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2020 License: Apache-2.0 Imports: 16 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Processor

type Processor interface {
	Namespace() string
	Protocol() protocol.Client
	ProcessOperation(operation *batch.Operation) (*document.ResolutionResult, error)
}

Processor processes document operations

type ResolveHandler

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

ResolveHandler resolves generic documents

func NewResolveHandler

func NewResolveHandler(resolver Resolver) *ResolveHandler

NewResolveHandler returns a new document resolve handler

func (*ResolveHandler) Resolve

func (o *ResolveHandler) Resolve(rw http.ResponseWriter, req *http.Request)

Resolve resolves a document

type Resolver

type Resolver interface {
	Namespace() string
	ResolveDocument(idOrDocument string) (*document.ResolutionResult, error)
}

Resolver resolves documents

type UpdateHandler

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

UpdateHandler handles the creation and update of documents

func NewUpdateHandler

func NewUpdateHandler(processor Processor) *UpdateHandler

NewUpdateHandler returns a new document update handler

func (*UpdateHandler) Update

func (h *UpdateHandler) Update(rw http.ResponseWriter, req *http.Request)

Update creates or updates a document

Jump to

Keyboard shortcuts

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