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 ¶
func New(name string, store OperationStoreClient, pc protocol.Client, opts ...Option) *OperationProcessor
New returns new operation processor with the given name. (Note that name is only used for logging.)
func (*OperationProcessor) Resolve ¶
func (s *OperationProcessor) Resolve(uniqueSuffix string, opts ...document.ResolutionOption) (*protocol.ResolutionModel, 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) ([]*operation.AnchoredOperation, error) }
OperationStoreClient defines interface for retrieving all operations related to document.
type Option ¶ added in v0.7.0
type Option func(opts *OperationProcessor)
Option is an option for operation processor.
func WithUnpublishedOperationStore ¶ added in v0.7.0
func WithUnpublishedOperationStore(store unpublishedOperationStore) Option
WithUnpublishedOperationStore stores unpublished operation into unpublished operation store.