bddtests

package module
v0.0.0-...-bfcd41d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2021 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

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

func GenerateUUID

func GenerateUUID() string

GenerateUUID returns a UUID based on RFC 4122

func NewConfigSteps

func NewConfigSteps(context *bddtests.BDDContext) *configSteps

NewConfigSteps returns ledger config steps

Types

type AccountOperation

type AccountOperation struct {
	OperationType string `json:"operationType"`
	ID            string `json:"id"`
	Owner         string `json:"owner"`
	Balance       int    `json:"balance"`
	Order         int    `json:"order"`
}

AccountOperation contains account information

type App

type App struct {
	// Name is the name of the application
	AppName string
	// Version is the version of the config
	Version string
	// Format describes the format of the data
	Format Format
	// Config contains the actual configuration
	Config string
	// Tags contains optional tags that describe the data
	Tags []string `json:",omitempty"`
	// Components zero or more component configs
	Components []*Component `json:",omitempty"`
}

App contains the configuration for an application and/or multiple sub-components.

type CIDVersion

type CIDVersion = uint64

CIDVersion specifies the version of the content ID

const (
	CIDV0 CIDVersion = 0
	CIDV1 CIDVersion = 1
)

type Component

type Component struct {
	// Name is the name of the component
	Name string
	// Version is the version of the config
	Version string
	// Format describes the format of the data
	Format Format
	// Config contains the actual configuration
	Config string
	// Tags contains optional tags that describe the data
	Tags []string `json:",omitempty"`
}

Component contains the configuration for an application component.

type Config

type Config struct {
	// MspID is the ID of the MSP
	MspID string
	// Peers contains configuration for zero or more peers
	Peers []*Peer `json:",omitempty"`
	// Apps contains configuration for zero or more application
	Apps []*App `json:",omitempty"`
}

Config contains zero or more application configurations and zero or more peer-specific application configurations

type Format

type Format string

Format specifies the format of the configuration

type KV

type KV struct {
	Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Key       string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	Value     []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
}

KV -- QueryResult for range/execute query. Holds a key and corresponding value.

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 Peer

type Peer struct {
	// PeerID is the unique ID of the peer
	PeerID string
	// Apps contains configuration for one or more application
	Apps []*App
}

Peer contains a collection of application configurations for a given peer

type TransientDataSteps

type TransientDataSteps struct {
	BDDContext *bddtests.BDDContext
	// contains filtered or unexported fields
}

TransientDataSteps ...

func NewTransientDataSteps

func NewTransientDataSteps(context *bddtests.BDDContext) *TransientDataSteps

NewTransientDataSteps returns transient data BDD steps

func (*TransientDataSteps) DefineTransientCollectionConfig

func (d *TransientDataSteps) DefineTransientCollectionConfig(id, name, policy string, requiredPeerCount, maxPeerCount int32, timeToLive string)

DefineTransientCollectionConfig defines a new transient data collection configuration

func (*TransientDataSteps) RegisterSteps

func (d *TransientDataSteps) RegisterSteps(s *godog.Suite)

RegisterSteps registers transient data steps

type TxnSteps

type TxnSteps struct {
	BDDContext *bddtests.BDDContext
	// contains filtered or unexported fields
}

TxnSteps defines the transaction service steps

func NewTxnSteps

func NewTxnSteps(context *bddtests.BDDContext) *TxnSteps

NewTxnSteps returns a new TxnSteps

func (*TxnSteps) Peers

func (d *TxnSteps) Peers(peerIDs string) (bddtests.Peers, error)

func (*TxnSteps) RegisterSteps

func (d *TxnSteps) RegisterSteps(s *godog.Suite)

RegisterSteps registers off-ledger steps

Directories

Path Synopsis
fixtures

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL