Documentation ¶
Index ¶
- Variables
- func CreateEnvelope(proposal *fabricPeer.SignedProposal, ...) (*common.Envelope, error)
- func NewInvokeBuilder(ccCore *Core, fn string) api.ChaincodeInvokeBuilder
- func NewQueryBuilder(ccCore *Core, identity msp.SigningIdentity, fn string, args ...string) api.ChaincodeQueryBuilder
- func WithTxWaiter(builder TxWaitBuilder) api.DoOption
- type Core
- type QueryBuilder
- func (q *QueryBuilder) AsBytes(ctx context.Context) ([]byte, error)
- func (q *QueryBuilder) AsJSON(ctx context.Context, out interface{}) error
- func (q *QueryBuilder) AsProposalResponse(ctx context.Context) (*fabricPeer.ProposalResponse, error)
- func (q *QueryBuilder) Do(ctx context.Context) (*fabricPeer.Response, error)
- func (q *QueryBuilder) Transient(args api.TransArgs) api.ChaincodeQueryBuilder
- func (q *QueryBuilder) WithArguments(argBytes [][]byte) api.ChaincodeQueryBuilder
- func (q *QueryBuilder) WithIdentity(identity msp.SigningIdentity) api.ChaincodeQueryBuilder
- type TruncatableString
- type TxWaitBuilder
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrOrdererNotDefined = errors.New(`orderer not defined`) ErrNotEnoughEndorsements = errors.New(`not enough endorsements`) )
Functions ¶
func CreateEnvelope ¶ added in v0.7.4
func CreateEnvelope( proposal *fabricPeer.SignedProposal, peerResponses []*fabricPeer.ProposalResponse, identity msp.SigningIdentity) ( *common.Envelope, error)
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 ¶ added in v0.5.0
func WithTxWaiter(builder TxWaitBuilder) api.DoOption
WithTxWaiter - add option for set custom tx waiter
Types ¶
type QueryBuilder ¶
type QueryBuilder struct {
// contains filtered or unexported fields
}
func (*QueryBuilder) AsBytes ¶
func (q *QueryBuilder) AsBytes(ctx context.Context) ([]byte, error)
AsBytes 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) Do ¶ added in v0.7.0
func (q *QueryBuilder) Do(ctx context.Context) (*fabricPeer.Response, error)
Do makes invoke with built arguments
func (*QueryBuilder) Transient ¶
func (q *QueryBuilder) Transient(args api.TransArgs) api.ChaincodeQueryBuilder
func (*QueryBuilder) WithArguments ¶ added in v0.7.0
func (q *QueryBuilder) WithArguments(argBytes [][]byte) 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 }
TruncatableString a string that might be shortened to a specified length.
func (TruncatableString) String ¶
func (t TruncatableString) String() string
Click to show internal directories.
Click to hide internal directories.