chaincode

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCorePackage

func NewCorePackage(ccName string, lscc api.LSCC, fetcher api.CCFetcher, orderer api.Orderer, identity msp.SigningIdentity) api.ChaincodePackage

func NewInvokeBuilder

func NewInvokeBuilder(ccCore *Core, fn string) api.ChaincodeInvokeBuilder

func NewQueryBuilder

func NewQueryBuilder(ccCore *Core, identity msp.SigningIdentity, fn string, args ...string) api.ChaincodeQueryBuilder

func WithTxWaiter

func WithTxWaiter(builder TxWaitBuilder) api.DoOption

WithTxWaiter - add option for set custom tx waiter

Types

type Core

type Core struct {
	// contains filtered or unexported fields
}

func NewCore

func NewCore(mspId, ccName, channelName string, peerPool api.PeerPool, orderer api.Orderer, dp api.DiscoveryProvider, identity msp.SigningIdentity) *Core

func (*Core) Install

func (c *Core) Install(version string)

func (*Core) Invoke

func (c *Core) Invoke(fn string) api.ChaincodeInvokeBuilder

func (*Core) Query

func (c *Core) Query(fn string, args ...string) api.ChaincodeQueryBuilder

func (*Core) Subscribe

func (c *Core) Subscribe(ctx context.Context) (api.EventCCSubscription, error)

type QueryBuilder

type QueryBuilder struct {
	// contains filtered or unexported fields
}

func (*QueryBuilder) AsBytes

func (q *QueryBuilder) AsBytes(ctx context.Context) ([]byte, error)

TODO: think about interface in one style with Invoke

func (*QueryBuilder) AsJSON

func (q *QueryBuilder) AsJSON(ctx context.Context, out interface{}) error

func (*QueryBuilder) AsProposalResponse

func (q *QueryBuilder) AsProposalResponse(ctx context.Context) (*fabricPeer.ProposalResponse, error)

func (*QueryBuilder) Transient

func (q *QueryBuilder) Transient(args api.TransArgs) api.ChaincodeQueryBuilder

func (*QueryBuilder) WithIdentity

func (q *QueryBuilder) WithIdentity(identity msp.SigningIdentity) api.ChaincodeQueryBuilder

type TruncatableString

type TruncatableString struct {
	// The shortened string. For example, if the original string was 500 bytes long and
	// the limit of the string was 128 bytes, then this value contains the first 128
	// bytes of the 500-byte string. Note that truncation always happens on a
	// character boundary, to ensure that a truncated string is still valid UTF-8.
	// Because it may contain multi-byte characters, the size of the truncated string
	// may be less than the truncation limit.
	Value string

	// The number of bytes removed from the original string. If this
	// value is 0, then the string was not shortened.
	TruncatedByteCount int
}

A string that might be shortened to a specified length.

func (TruncatableString) String

func (t TruncatableString) String() string

type TxWaitBuilder

type TxWaitBuilder func(cfg *api.DoOptions) (api.TxWaiter, error)

TxWaitBuilder function signature for plugable setter on Do options

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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