Documentation ¶
Index ¶
- func GenerateBytesUUID() []byte
- func GenerateUUID() string
- func GetCASKey(content []byte) string
- type AnchorFile
- type BatchFile
- type BlockchainSteps
- type DIDSideSteps
- type FabricCLI
- type FabricCLISteps
- type FileHandlerSteps
- type OffLedgerSteps
- func (d *OffLedgerSteps) DefineDCASCollectionConfig(id, name, policy string, requiredPeerCount, maxPeerCount int32, ...)
- func (d *OffLedgerSteps) DefineOffLedgerCollectionConfig(id, name, policy string, requiredPeerCount, maxPeerCount int32, ...)
- func (d *OffLedgerSteps) RegisterSteps(s *godog.Suite)
- type Operation
- type Request
- type Response
- type SidetreeTxnSteps
- type TxnInfo
- type UploadFile
- type WorkerPool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateBytesUUID ¶
func GenerateBytesUUID() []byte
GenerateBytesUUID returns a UUID based on RFC 4122 returning the generated bytes
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 and its related operations.
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 BlockchainSteps ¶
type BlockchainSteps struct {
// contains filtered or unexported fields
}
BlockchainSteps
func NewBlockchainSteps ¶
func NewBlockchainSteps(context *bddtests.BDDContext) *BlockchainSteps
NewBlockchainSteps
func (*BlockchainSteps) RegisterSteps ¶
func (d *BlockchainSteps) RegisterSteps(s *godog.Suite)
RegisterSteps registers did sidetree steps
type DIDSideSteps ¶
type DIDSideSteps struct {
// contains filtered or unexported fields
}
DIDSideSteps
func NewDIDSideSteps ¶
func NewDIDSideSteps(context *bddtests.BDDContext) *DIDSideSteps
NewDIDSideSteps
func (*DIDSideSteps) RegisterSteps ¶
func (d *DIDSideSteps) RegisterSteps(s *godog.Suite)
RegisterSteps registers did sidetree steps
type FabricCLISteps ¶
type FabricCLISteps struct {
BDDContext *bddtests.BDDContext
}
FabricCLISteps extend the BDD test with Fabric CLI steps
func NewFabricCLISteps ¶
func NewFabricCLISteps(context *bddtests.BDDContext) *FabricCLISteps
NewFabricCLISteps returns fabric-cli BDD steps
func (*FabricCLISteps) RegisterSteps ¶
func (d *FabricCLISteps) RegisterSteps(s *godog.Suite)
RegisterSteps registers transient data steps
type FileHandlerSteps ¶
type FileHandlerSteps struct {
// contains filtered or unexported fields
}
FileHandlerSteps
func NewFileHandlerSteps ¶
func NewFileHandlerSteps(context *bddtests.BDDContext) *FileHandlerSteps
NewFileHandlerSteps
func (*FileHandlerSteps) RegisterSteps ¶
func (d *FileHandlerSteps) RegisterSteps(s *godog.Suite)
RegisterSteps registers did sidetree steps
type OffLedgerSteps ¶
type OffLedgerSteps struct { BDDContext *bddtests.BDDContext // contains filtered or unexported fields }
OffLedgerSteps ...
func NewOffLedgerSteps ¶
func NewOffLedgerSteps(context *bddtests.BDDContext) *OffLedgerSteps
NewOffLedgerSteps ...
func (*OffLedgerSteps) DefineDCASCollectionConfig ¶
func (d *OffLedgerSteps) DefineDCASCollectionConfig(id, name, policy string, requiredPeerCount, maxPeerCount int32, timeToLive string)
DefineDCASCollectionConfig defines a new DCAS collection configuration
func (*OffLedgerSteps) DefineOffLedgerCollectionConfig ¶
func (d *OffLedgerSteps) DefineOffLedgerCollectionConfig(id, name, policy string, requiredPeerCount, maxPeerCount int32, timeToLive string)
DefineOffLedgerCollectionConfig defines a new off-ledger data collection configuration
func (*OffLedgerSteps) RegisterSteps ¶
func (d *OffLedgerSteps) RegisterSteps(s *godog.Suite)
RegisterSteps registers off-ledger steps
type Operation ¶
type Operation struct { //Operation type Type string `json:"type"` //ID is full ID for this document - includes namespace + unique suffix ID string `json:"id"` }
Operation defines sample operation
type Request ¶
type Request interface {
Invoke() (interface{}, error)
}
Request is a request that's submitted to the worker pool for processing
type SidetreeTxnSteps ¶
type SidetreeTxnSteps struct { BDDContext *bddtests.BDDContext // contains filtered or unexported fields }
SidetreeTxnSteps ...
func NewSidetreeSteps ¶
func NewSidetreeSteps(context *bddtests.BDDContext) *SidetreeTxnSteps
NewSidetreeSteps define custom steps
func (*SidetreeTxnSteps) RegisterSteps ¶
func (t *SidetreeTxnSteps) RegisterSteps(s *godog.Suite)
RegisterSteps registers sidetree txn steps
type TxnInfo ¶
type TxnInfo struct { AnchorString string `json:"anchorString"` Namespace string `json:"namespace"` }
TxnInfo
type UploadFile ¶
UploadFile contains the file upload request
type WorkerPool ¶
type WorkerPool struct {
// contains filtered or unexported fields
}
WorkerPool manages a pool of workers that processes requests concurrently and, at the end, gathers the responses
func NewWorkerPool ¶
func NewWorkerPool(num int) *WorkerPool
NewWorkerPool returns a new worker pool with the given number of workers
func (*WorkerPool) Responses ¶
func (p *WorkerPool) Responses() []*Response
Responses contains the responses after the pool is stopped
func (*WorkerPool) Start ¶
func (p *WorkerPool) Start()
Start starts all of the workers and listens for responses
func (*WorkerPool) Stop ¶
func (p *WorkerPool) Stop()
Stop stops the workers in the pool and stops listening for responses
func (*WorkerPool) Submit ¶
func (p *WorkerPool) Submit(req Request)
Submit submits a request for processing