processor

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2020 License: Apache-2.0 Imports: 4 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OperationProcessor

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

OperationProcessor will process document operations in chronological order and create final document during resolution. It uses operation store client to retrieve all operations that are related to requested document.

func New

New returns new operation processor

func (*OperationProcessor) Resolve

func (s *OperationProcessor) Resolve(uniqueSuffix string) (document.Document, error)

Resolve document based on the given unique suffix Parameters: uniqueSuffix - unique portion of ID to resolve. for example "abc123" in "did:sidetree:abc123"

type OperationStoreClient

type OperationStoreClient interface {

	// Get retrieves all operations related to document
	Get(uniqueSuffix string) ([]batch.Operation, error)
	// Put storing operation
	Put(op batch.Operation) error
}

OperationStoreClient defines interface for retrieving all operations related to document

Jump to

Keyboard shortcuts

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