Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnchoredOperation ¶
type AnchoredOperation struct {
// Type defines operation type.
Type Type `json:"type"`
// UniqueSuffix defines document unique suffix.
UniqueSuffix string `json:"uniqueSuffix"`
// OperationRequest is the original operation request
OperationRequest []byte `json:"operation"`
// TransactionTime is the logical anchoring time (block number in case of blockchain) for this operation in the
// anchoring system (blockchain).
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 (version) 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"`
}
AnchoredOperation defines an anchored operation (stored in document operation store).
type Operation ¶
type Operation struct {
// Type defines operation type.
Type Type
// UniqueSuffix defines document unique suffix.
UniqueSuffix string
// ID defines ID
ID string
// OperationRequest is the original operation request
OperationRequest []byte
// AnchorOrigin defines anchor origin.
AnchorOrigin interface{}
// Properties contains an arbitrary set of implementation-specific name-value pairs.
Properties []Property
}
Operation holds minimum information required for parsing/validating client request.
type Property ¶ added in v1.0.0
type Property struct {
Key string
Value interface{}
}
Property contains a key-value pair.
type QueuedOperation ¶
type QueuedOperation struct {
Type Type
OperationRequest []byte
UniqueSuffix string
Namespace string
AnchorOrigin interface{}
Properties []Property
}
QueuedOperation stores minimum required operation info for operations queue.
type QueuedOperationAtTime ¶
type QueuedOperationAtTime struct {
QueuedOperation
ProtocolVersion uint64
}
QueuedOperationAtTime contains queued operation info with protocol genesis time.
type QueuedOperationsAtTime ¶ added in v0.7.0
type QueuedOperationsAtTime []*QueuedOperationAtTime
QueuedOperationsAtTime contains a collection of queued operations with protocol genesis time.
func (QueuedOperationsAtTime) QueuedOperations ¶ added in v0.7.0
func (o QueuedOperationsAtTime) QueuedOperations() []*QueuedOperation
QueuedOperations returns a collection of QueuedOperation.
type Reference ¶ added in v0.6.0
type Reference struct {
// UniqueSuffix defines document unique suffix.
UniqueSuffix string
// Type defines operation type.
Type Type
// AnchorOrigin defines anchor origin.
AnchorOrigin interface{}
}
Reference holds minimum information about did operation (suffix and type).
type Type ¶
type Type string
Type defines valid values for operation type.
const ( // TypeCreate captures "create" operation type. TypeCreate Type = "create" // TypeUpdate captures "update" operation type. TypeUpdate Type = "update" // TypeDeactivate captures "deactivate" operation type. TypeDeactivate Type = "deactivate" // TypeRecover captures "recover" operation type. TypeRecover Type = "recover" )