Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Applier ¶
type Applier struct { protocol.Protocol OperationParser protocol.DocumentComposer }
Applier is an operation applier.
func New ¶
func New(p protocol.Protocol, parser OperationParser, dc protocol.DocumentComposer) *Applier
New returns a new operation applier for the given protocol.
func (*Applier) Apply ¶
func (s *Applier) Apply(op *operation.AnchoredOperation, rm *protocol.ResolutionModel) (*protocol.ResolutionModel, error)
Apply applies the given anchored operation.
type OperationParser ¶
type OperationParser interface { ValidateSuffixData(suffixData *model.SuffixDataModel) error ValidateDelta(delta *model.DeltaModel) error ParseCreateOperation(request []byte, anchor bool) (*model.Operation, error) ParseUpdateOperation(request []byte, anchor bool) (*model.Operation, error) ParseRecoverOperation(request []byte, anchor bool) (*model.Operation, error) ParseDeactivateOperation(request []byte, anchor bool) (*model.Operation, error) ParseSignedDataForUpdate(compactJWS string) (*model.UpdateSignedDataModel, error) ParseSignedDataForDeactivate(compactJWS string) (*model.DeactivateSignedDataModel, error) ParseSignedDataForRecover(compactJWS string) (*model.RecoverSignedDataModel, error) }
OperationParser defines the functions for parsing operations.
Click to show internal directories.
Click to hide internal directories.