Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metadata ¶
type Metadata struct {
// contains filtered or unexported fields
}
Metadata is responsible for creating document metadata.
func (*Metadata) CreateDocumentMetadata ¶
func (t *Metadata) CreateDocumentMetadata(rm *protocol.ResolutionModel, info protocol.TransformationInfo) (document.Metadata, error)
CreateDocumentMetadata will create document metadata.
type Option ¶
type Option func(opts *Metadata)
Option is a metadata instance option.
func WithIncludePublishedOperations ¶
WithIncludePublishedOperations sets optional include published operations flag.
func WithIncludeUnpublishedOperations ¶
WithIncludeUnpublishedOperations sets optional include unpublished operations flag.
type PublishedOperation ¶
type PublishedOperation struct { // Type defines operation type. Type operation.Type `json:"type"` // OperationRequest is the original operation request. OperationRequest []byte `json:"operation"` // TransactionTime is the logical anchoring time. TransactionTime uint64 `json:"transactionTime"` // TransactionNumber is the transaction number of the transaction this operation was batched within. TransactionNumber uint64 `json:"transactionNumber"` // ProtocolVersion is the genesis time of the protocol that was used for this operation. ProtocolVersion uint64 `json:"protocolVersion"` // CanonicalReference contains canonical reference that applies to this operation. CanonicalReference string `json:"canonicalReference,omitempty"` // EquivalenceReferences contains equivalence reference that applies to this operation. EquivalentReferences []string `json:"equivalentReferences,omitempty"` // AnchorOrigin is anchor origin AnchorOrigin interface{} `json:"anchorOrigin,omitempty"` }
PublishedOperation defines an published operation for metadata. It is a subset of anchored operation.
type UnpublishedOperation ¶
type UnpublishedOperation struct { // Type defines operation type. Type operation.Type `json:"type"` // OperationRequest is the original operation request. OperationRequest []byte `json:"operation"` // TransactionTime is the logical anchoring time. TransactionTime uint64 `json:"transactionTime"` // ProtocolVersion is the genesis time of the protocol that was used for this operation. ProtocolVersion uint64 `json:"protocolVersion"` // AnchorOrigin is anchor origin. AnchorOrigin interface{} `json:"anchorOrigin,omitempty"` }
UnpublishedOperation defines an un-published operation for metadata. It is a subset of anchored operation.
Click to show internal directories.
Click to hide internal directories.