Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnchorFile ¶
type AnchorFile struct { // BatchFileHash is encoded hash of the batch file BatchFileHash string `json:"batchFileHash"` // UniqueSuffixes is an array of suffixes (the unique portion of the ID string that differentiates // one document from another) for all documents that are declared to have operations within the associated batch file. UniqueSuffixes []string `json:"uniqueSuffixes"` }
AnchorFile defines the schema of a Anchor File
type BatchFile ¶
type BatchFile struct { // Operations included in this batch file, each operation is an encoded string Operations []string `json:"operations"` }
BatchFile defines the schema of a Batch File and its related operations.
type Ledger ¶
type Ledger interface {
RegisterForSidetreeTxn() <-chan []SidetreeTxn
}
Ledger interface to access ledger txn
type NoopOperationFilterProvider ¶ added in v0.1.3
type NoopOperationFilterProvider struct { }
NoopOperationFilterProvider is an operation filter provider that does not filter operations
func (*NoopOperationFilterProvider) Get ¶ added in v0.1.3
func (m *NoopOperationFilterProvider) Get(string) (OperationFilter, error)
Get returns a noop operation filter
type Observer ¶ added in v0.1.3
type Observer struct { *Providers // contains filtered or unexported fields }
Observer receives transactions over a channel and processes them by storing them to an operation store
type OperationFilter ¶ added in v0.1.3
type OperationFilter interface {
Filter(uniqueSuffix string, ops []*batch.Operation) ([]*batch.Operation, error)
}
OperationFilter filters out operations before they are persisted
type OperationFilterProvider ¶ added in v0.1.3
type OperationFilterProvider interface {
Get(namespace string) (OperationFilter, error)
}
OperationFilterProvider returns an operation filter for the given namespace
type OperationStore ¶
OperationStore interface to access operation store
type OperationStoreProvider ¶ added in v0.1.3
type OperationStoreProvider interface {
ForNamespace(namespace string) (OperationStore, error)
}
OperationStoreProvider returns an operation store for the given namespace
type Providers ¶ added in v0.1.3
type Providers struct { Ledger Ledger DCASClient DCAS OpStoreProvider OperationStoreProvider OpFilterProvider OperationFilterProvider }
Providers contains all of the providers required by the TxnProcessor
type SidetreeTxn ¶
SidetreeTxn defines info about sidetree transaction
type TxnProcessor ¶
type TxnProcessor struct {
*Providers
}
TxnProcessor processes Sidetree transactions by persisting them to an operation store
func NewTxnProcessor ¶
func NewTxnProcessor(providers *Providers) *TxnProcessor
NewTxnProcessor returns a new document operation processor
func (*TxnProcessor) Process ¶
func (p *TxnProcessor) Process(sidetreeTxn SidetreeTxn) error
Process persists all of the operations for the given anchor