docvalidator

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OperationStoreClient

type OperationStoreClient interface {

	// Get retrieves all operations related to document
	Get(uniqueSuffix string) ([]*batch.AnchoredOperation, error)
}

OperationStoreClient defines interface for retrieving all operations related to document

type Validator

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

Validator is responsible for validating document operations and sidetree rules

func New

func New(store OperationStoreClient) *Validator

New creates a new document validator

func (*Validator) IsValidOriginalDocument

func (v *Validator) IsValidOriginalDocument(payload []byte) error

IsValidOriginalDocument verifies that the given payload is a valid Sidetree specific document that can be accepted by the Sidetree create operation.

func (*Validator) IsValidPayload

func (v *Validator) IsValidPayload(payload []byte) error

IsValidPayload verifies that the given payload is a valid Sidetree specific payload that can be accepted by the Sidetree update operations

func (*Validator) TransformDocument added in v0.1.3

func (v *Validator) TransformDocument(internal document.Document) (*document.ResolutionResult, error)

TransformDocument takes internal representation of document and transforms it to required representation

Jump to

Keyboard shortcuts

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