v20180416

package
v3.0.1223+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// The block does not exist.
	FAILEDOPERATION_FABRICBLOCKNOEXIST = "FailedOperation.FabricBlockNoExist"

	// Contract call failed.
	FAILEDOPERATION_FABRICCHAINCODEINVOKEFAILED = "FailedOperation.FabricChaincodeInvokeFailed"

	// The contract does not exist.
	FAILEDOPERATION_FABRICCHAINCODENOEXIST = "FailedOperation.FabricChaincodeNoExist"

	// Contract query failed.
	FAILEDOPERATION_FABRICCHAINCODEQUERYFAILED = "FailedOperation.FabricChaincodeQueryFailed"

	// The transaction does not exist.
	FAILEDOPERATION_FABRICTRANSACTIONNOEXIST = "FailedOperation.FabricTransactionNoExist"

	// User has no access permission.
	FAILEDOPERATION_INVALIDAUTH = "FailedOperation.InvalidAuth"

	// Internal error. please try again later or contact technical personnel.
	INTERNALERROR_SERVERERROR = "InternalError.ServerError"
)
View Source
const APIVersion = "2018-04-16"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	common.Client
}

func NewClient

func NewClient(credential common.CredentialIface, region string, clientProfile *profile.ClientProfile) (client *Client, err error)

func NewClientWithSecretId

func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, err error)

Deprecated

func (*Client) DescribeFabricBlock

func (c *Client) DescribeFabricBlock(request *DescribeFabricBlockRequest) (response *DescribeFabricBlockResponse, err error)

DescribeFabricBlock This API is used to retrieve the detailed information of a block in Fabric.

error code that may be returned:

FAILEDOPERATION_FABRICBLOCKNOEXIST = "FailedOperation.FabricBlockNoExist"
FAILEDOPERATION_INVALIDAUTH = "FailedOperation.InvalidAuth"
INTERNALERROR_SERVERERROR = "InternalError.ServerError"

func (*Client) DescribeFabricBlockWithContext

func (c *Client) DescribeFabricBlockWithContext(ctx context.Context, request *DescribeFabricBlockRequest) (response *DescribeFabricBlockResponse, err error)

DescribeFabricBlock This API is used to retrieve the detailed information of a block in Fabric.

error code that may be returned:

FAILEDOPERATION_FABRICBLOCKNOEXIST = "FailedOperation.FabricBlockNoExist"
FAILEDOPERATION_INVALIDAUTH = "FailedOperation.InvalidAuth"
INTERNALERROR_SERVERERROR = "InternalError.ServerError"

func (*Client) DescribeFabricTransaction

func (c *Client) DescribeFabricTransaction(request *DescribeFabricTransactionRequest) (response *DescribeFabricTransactionResponse, err error)

DescribeFabricTransaction This API is used to obtain detailed information of Fabric transactions.

error code that may be returned:

FAILEDOPERATION_FABRICTRANSACTIONNOEXIST = "FailedOperation.FabricTransactionNoExist"
FAILEDOPERATION_INVALIDAUTH = "FailedOperation.InvalidAuth"
INTERNALERROR_SERVERERROR = "InternalError.ServerError"

func (*Client) DescribeFabricTransactionWithContext

func (c *Client) DescribeFabricTransactionWithContext(ctx context.Context, request *DescribeFabricTransactionRequest) (response *DescribeFabricTransactionResponse, err error)

DescribeFabricTransaction This API is used to obtain detailed information of Fabric transactions.

error code that may be returned:

FAILEDOPERATION_FABRICTRANSACTIONNOEXIST = "FailedOperation.FabricTransactionNoExist"
FAILEDOPERATION_INVALIDAUTH = "FailedOperation.InvalidAuth"
INTERNALERROR_SERVERERROR = "InternalError.ServerError"

func (*Client) InvokeFabricChaincode

func (c *Client) InvokeFabricChaincode(request *InvokeFabricChaincodeRequest) (response *InvokeFabricChaincodeResponse, err error)

InvokeFabricChaincode This API is used to call a Fabric user contract to execute a transaction.

error code that may be returned:

FAILEDOPERATION_FABRICCHAINCODEINVOKEFAILED = "FailedOperation.FabricChaincodeInvokeFailed"
FAILEDOPERATION_FABRICCHAINCODENOEXIST = "FailedOperation.FabricChaincodeNoExist"
FAILEDOPERATION_INVALIDAUTH = "FailedOperation.InvalidAuth"
INTERNALERROR_SERVERERROR = "InternalError.ServerError"

func (*Client) InvokeFabricChaincodeWithContext

func (c *Client) InvokeFabricChaincodeWithContext(ctx context.Context, request *InvokeFabricChaincodeRequest) (response *InvokeFabricChaincodeResponse, err error)

InvokeFabricChaincode This API is used to call a Fabric user contract to execute a transaction.

error code that may be returned:

FAILEDOPERATION_FABRICCHAINCODEINVOKEFAILED = "FailedOperation.FabricChaincodeInvokeFailed"
FAILEDOPERATION_FABRICCHAINCODENOEXIST = "FailedOperation.FabricChaincodeNoExist"
FAILEDOPERATION_INVALIDAUTH = "FailedOperation.InvalidAuth"
INTERNALERROR_SERVERERROR = "InternalError.ServerError"

func (*Client) QueryFabricChaincode

func (c *Client) QueryFabricChaincode(request *QueryFabricChaincodeRequest) (response *QueryFabricChaincodeResponse, err error)

QueryFabricChaincode This API is used to make a user contract call in Fabric for querying.

error code that may be returned:

FAILEDOPERATION_FABRICCHAINCODENOEXIST = "FailedOperation.FabricChaincodeNoExist"
FAILEDOPERATION_FABRICCHAINCODEQUERYFAILED = "FailedOperation.FabricChaincodeQueryFailed"
FAILEDOPERATION_INVALIDAUTH = "FailedOperation.InvalidAuth"
INTERNALERROR_SERVERERROR = "InternalError.ServerError"

func (*Client) QueryFabricChaincodeWithContext

func (c *Client) QueryFabricChaincodeWithContext(ctx context.Context, request *QueryFabricChaincodeRequest) (response *QueryFabricChaincodeResponse, err error)

QueryFabricChaincode This API is used to make a user contract call in Fabric for querying.

error code that may be returned:

FAILEDOPERATION_FABRICCHAINCODENOEXIST = "FailedOperation.FabricChaincodeNoExist"
FAILEDOPERATION_FABRICCHAINCODEQUERYFAILED = "FailedOperation.FabricChaincodeQueryFailed"
FAILEDOPERATION_INVALIDAUTH = "FailedOperation.InvalidAuth"
INTERNALERROR_SERVERERROR = "InternalError.ServerError"

type DescribeFabricBlockRequest

type DescribeFabricBlockRequest struct {
	*tchttp.BaseRequest

	// Cluster ID, which can be obtained from the blockchain cluster details or in the list.
	ClusterId *string `json:"ClusterId,omitnil,omitempty" name:"ClusterId"`

	// Channel ID, which can be obtained from the channel list or channel detail.
	ChannelId *string `json:"ChannelId,omitnil,omitempty" name:"ChannelId"`

	// Block height, starting from 0.
	BlockHeight *int64 `json:"BlockHeight,omitnil,omitempty" name:"BlockHeight"`
}

func NewDescribeFabricBlockRequest

func NewDescribeFabricBlockRequest() (request *DescribeFabricBlockRequest)

func (*DescribeFabricBlockRequest) FromJsonString

func (r *DescribeFabricBlockRequest) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*DescribeFabricBlockRequest) ToJsonString

func (r *DescribeFabricBlockRequest) ToJsonString() string

type DescribeFabricBlockRequestParams

type DescribeFabricBlockRequestParams struct {
	// Cluster ID, which can be obtained from the blockchain cluster details or in the list.
	ClusterId *string `json:"ClusterId,omitnil,omitempty" name:"ClusterId"`

	// Channel ID, which can be obtained from the channel list or channel detail.
	ChannelId *string `json:"ChannelId,omitnil,omitempty" name:"ChannelId"`

	// Block height, starting from 0.
	BlockHeight *int64 `json:"BlockHeight,omitnil,omitempty" name:"BlockHeight"`
}

Predefined struct for user

type DescribeFabricBlockResponse

type DescribeFabricBlockResponse struct {
	*tchttp.BaseResponse
	Response *DescribeFabricBlockResponseParams `json:"Response"`
}

func NewDescribeFabricBlockResponse

func NewDescribeFabricBlockResponse() (response *DescribeFabricBlockResponse)

func (*DescribeFabricBlockResponse) FromJsonString

func (r *DescribeFabricBlockResponse) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*DescribeFabricBlockResponse) ToJsonString

func (r *DescribeFabricBlockResponse) ToJsonString() string

type DescribeFabricBlockResponseParams

type DescribeFabricBlockResponseParams struct {
	// Block height.
	BlockHeight *int64 `json:"BlockHeight,omitnil,omitempty" name:"BlockHeight"`

	// Block Hash.
	BlockHash *string `json:"BlockHash,omitnil,omitempty" name:"BlockHash"`

	// Pre-Block Hash.
	PreBlockHash *string `json:"PreBlockHash,omitnil,omitempty" name:"PreBlockHash"`

	// The number of transactions in a block.
	TxCount *int64 `json:"TxCount,omitnil,omitempty" name:"TxCount"`

	// Transaction list in the block.
	TransactionList []*Transaction `json:"TransactionList,omitnil,omitempty" name:"TransactionList"`

	// Creation Timestamp
	CreateTimestamp *string `json:"CreateTimestamp,omitnil,omitempty" name:"CreateTimestamp"`

	// Proposal organization.
	ProposerOrg *string `json:"ProposerOrg,omitnil,omitempty" name:"ProposerOrg"`

	// The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
	RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
}

Predefined struct for user

type DescribeFabricTransactionRequest

type DescribeFabricTransactionRequest struct {
	*tchttp.BaseRequest

	// Cluster ID, which can be obtained from the blockchain cluster details or in the list.
	ClusterId *string `json:"ClusterId,omitnil,omitempty" name:"ClusterId"`

	// Channel ID, which can be obtained from the channel list or channel detail.
	ChannelId *string `json:"ChannelId,omitnil,omitempty" name:"ChannelId"`

	// Transaction ID
	TxId *string `json:"TxId,omitnil,omitempty" name:"TxId"`
}

func NewDescribeFabricTransactionRequest

func NewDescribeFabricTransactionRequest() (request *DescribeFabricTransactionRequest)

func (*DescribeFabricTransactionRequest) FromJsonString

func (r *DescribeFabricTransactionRequest) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*DescribeFabricTransactionRequest) ToJsonString

func (r *DescribeFabricTransactionRequest) ToJsonString() string

type DescribeFabricTransactionRequestParams

type DescribeFabricTransactionRequestParams struct {
	// Cluster ID, which can be obtained from the blockchain cluster details or in the list.
	ClusterId *string `json:"ClusterId,omitnil,omitempty" name:"ClusterId"`

	// Channel ID, which can be obtained from the channel list or channel detail.
	ChannelId *string `json:"ChannelId,omitnil,omitempty" name:"ChannelId"`

	// Transaction ID
	TxId *string `json:"TxId,omitnil,omitempty" name:"TxId"`
}

Predefined struct for user

type DescribeFabricTransactionResponse

type DescribeFabricTransactionResponse struct {
	*tchttp.BaseResponse
	Response *DescribeFabricTransactionResponseParams `json:"Response"`
}

func NewDescribeFabricTransactionResponse

func NewDescribeFabricTransactionResponse() (response *DescribeFabricTransactionResponse)

func (*DescribeFabricTransactionResponse) FromJsonString

func (r *DescribeFabricTransactionResponse) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*DescribeFabricTransactionResponse) ToJsonString

func (r *DescribeFabricTransactionResponse) ToJsonString() string

type DescribeFabricTransactionResponseParams

type DescribeFabricTransactionResponseParams struct {
	// Transaction ID
	TxId *string `json:"TxId,omitnil,omitempty" name:"TxId"`

	// Transaction Hash.
	TxHash *string `json:"TxHash,omitnil,omitempty" name:"TxHash"`

	// Transaction status.
	TxStatus *string `json:"TxStatus,omitnil,omitempty" name:"TxStatus"`

	// Organization list involved.
	JoinOrgList []*string `json:"JoinOrgList,omitnil,omitempty" name:"JoinOrgList"`

	// Transaction sender.
	Sender *string `json:"Sender,omitnil,omitempty" name:"Sender"`

	// Creation time
	CreateTime *string `json:"CreateTime,omitnil,omitempty" name:"CreateTime"`

	// Block height.
	BlockHeight *int64 `json:"BlockHeight,omitnil,omitempty" name:"BlockHeight"`

	// The contract to which the exchange belongs.
	ChaincodeName *string `json:"ChaincodeName,omitnil,omitempty" name:"ChaincodeName"`

	// Transaction data, base64 encoded, decoded as a json string.
	TransactionData *string `json:"TransactionData,omitnil,omitempty" name:"TransactionData"`

	// The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
	RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
}

Predefined struct for user

type InvokeFabricChaincodeRequest

type InvokeFabricChaincodeRequest struct {
	*tchttp.BaseRequest

	// Cluster ID, which can be obtained from the blockchain cluster details.
	ClusterId *string `json:"ClusterId,omitnil,omitempty" name:"ClusterId"`

	// Channel ID, which can be obtained from the channel list or channel detail.
	ChannelId *string `json:"ChannelId,omitnil,omitempty" name:"ChannelId"`

	// Contract name. it can be obtained from the contract list or contract details.
	ChaincodeName *string `json:"ChaincodeName,omitnil,omitempty" name:"ChaincodeName"`

	// Contract method.
	FuncName *string `json:"FuncName,omitnil,omitempty" name:"FuncName"`

	// Contract method input parameter.
	FuncParam []*string `json:"FuncParam,omitnil,omitempty" name:"FuncParam"`

	// Whether to execute asynchronously. if so, use the transaction TxID in the return value to query the execution result.
	WithAsyncResult *bool `json:"WithAsyncResult,omitnil,omitempty" name:"WithAsyncResult"`
}

func NewInvokeFabricChaincodeRequest

func NewInvokeFabricChaincodeRequest() (request *InvokeFabricChaincodeRequest)

func (*InvokeFabricChaincodeRequest) FromJsonString

func (r *InvokeFabricChaincodeRequest) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*InvokeFabricChaincodeRequest) ToJsonString

func (r *InvokeFabricChaincodeRequest) ToJsonString() string

type InvokeFabricChaincodeRequestParams

type InvokeFabricChaincodeRequestParams struct {
	// Cluster ID, which can be obtained from the blockchain cluster details.
	ClusterId *string `json:"ClusterId,omitnil,omitempty" name:"ClusterId"`

	// Channel ID, which can be obtained from the channel list or channel detail.
	ChannelId *string `json:"ChannelId,omitnil,omitempty" name:"ChannelId"`

	// Contract name. it can be obtained from the contract list or contract details.
	ChaincodeName *string `json:"ChaincodeName,omitnil,omitempty" name:"ChaincodeName"`

	// Contract method.
	FuncName *string `json:"FuncName,omitnil,omitempty" name:"FuncName"`

	// Contract method input parameter.
	FuncParam []*string `json:"FuncParam,omitnil,omitempty" name:"FuncParam"`

	// Whether to execute asynchronously. if so, use the transaction TxID in the return value to query the execution result.
	WithAsyncResult *bool `json:"WithAsyncResult,omitnil,omitempty" name:"WithAsyncResult"`
}

Predefined struct for user

type InvokeFabricChaincodeResponse

type InvokeFabricChaincodeResponse struct {
	*tchttp.BaseResponse
	Response *InvokeFabricChaincodeResponseParams `json:"Response"`
}

func NewInvokeFabricChaincodeResponse

func NewInvokeFabricChaincodeResponse() (response *InvokeFabricChaincodeResponse)

func (*InvokeFabricChaincodeResponse) FromJsonString

func (r *InvokeFabricChaincodeResponse) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*InvokeFabricChaincodeResponse) ToJsonString

func (r *InvokeFabricChaincodeResponse) ToJsonString() string

type InvokeFabricChaincodeResponseParams

type InvokeFabricChaincodeResponseParams struct {
	// Transaction ID
	TxId *string `json:"TxId,omitnil,omitempty" name:"TxId"`

	// Transaction status.
	TxStatus *string `json:"TxStatus,omitnil,omitempty" name:"TxStatus"`

	// Transaction result.
	TxResult *string `json:"TxResult,omitnil,omitempty" name:"TxResult"`

	// The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
	RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
}

Predefined struct for user

type QueryFabricChaincodeRequest

type QueryFabricChaincodeRequest struct {
	*tchttp.BaseRequest

	// Cluster ID, which can be obtained from the blockchain cluster details.
	ClusterId *string `json:"ClusterId,omitnil,omitempty" name:"ClusterId"`

	// Channel ID, which can be obtained from the channel list or channel details.
	ChannelId *string `json:"ChannelId,omitnil,omitempty" name:"ChannelId"`

	// Contract name. it can be obtained from the contract list or contract details.
	ChaincodeName *string `json:"ChaincodeName,omitnil,omitempty" name:"ChaincodeName"`

	// Contract method.
	FuncName *string `json:"FuncName,omitnil,omitempty" name:"FuncName"`

	// Contract method input parameter.
	FuncParam []*string `json:"FuncParam,omitnil,omitempty" name:"FuncParam"`
}

func NewQueryFabricChaincodeRequest

func NewQueryFabricChaincodeRequest() (request *QueryFabricChaincodeRequest)

func (*QueryFabricChaincodeRequest) FromJsonString

func (r *QueryFabricChaincodeRequest) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*QueryFabricChaincodeRequest) ToJsonString

func (r *QueryFabricChaincodeRequest) ToJsonString() string

type QueryFabricChaincodeRequestParams

type QueryFabricChaincodeRequestParams struct {
	// Cluster ID, which can be obtained from the blockchain cluster details.
	ClusterId *string `json:"ClusterId,omitnil,omitempty" name:"ClusterId"`

	// Channel ID, which can be obtained from the channel list or channel details.
	ChannelId *string `json:"ChannelId,omitnil,omitempty" name:"ChannelId"`

	// Contract name. it can be obtained from the contract list or contract details.
	ChaincodeName *string `json:"ChaincodeName,omitnil,omitempty" name:"ChaincodeName"`

	// Contract method.
	FuncName *string `json:"FuncName,omitnil,omitempty" name:"FuncName"`

	// Contract method input parameter.
	FuncParam []*string `json:"FuncParam,omitnil,omitempty" name:"FuncParam"`
}

Predefined struct for user

type QueryFabricChaincodeResponse

type QueryFabricChaincodeResponse struct {
	*tchttp.BaseResponse
	Response *QueryFabricChaincodeResponseParams `json:"Response"`
}

func NewQueryFabricChaincodeResponse

func NewQueryFabricChaincodeResponse() (response *QueryFabricChaincodeResponse)

func (*QueryFabricChaincodeResponse) FromJsonString

func (r *QueryFabricChaincodeResponse) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*QueryFabricChaincodeResponse) ToJsonString

func (r *QueryFabricChaincodeResponse) ToJsonString() string

type QueryFabricChaincodeResponseParams

type QueryFabricChaincodeResponseParams struct {
	// Transaction ID
	TxId *string `json:"TxId,omitnil,omitempty" name:"TxId"`

	// Transaction status.
	TxStatus *string `json:"TxStatus,omitnil,omitempty" name:"TxStatus"`

	// Transaction result.
	TxResult *string `json:"TxResult,omitnil,omitempty" name:"TxResult"`

	// The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
	RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
}

Predefined struct for user

type Transaction

type Transaction struct {
	// Transaction ID
	TxId *string `json:"TxId,omitnil,omitempty" name:"TxId"`

	// Contract name.
	ChaincodeName *string `json:"ChaincodeName,omitnil,omitempty" name:"ChaincodeName"`

	// Transaction sender.
	Sender *string `json:"Sender,omitnil,omitempty" name:"Sender"`

	// Transaction creation time.
	CreateTime *string `json:"CreateTime,omitnil,omitempty" name:"CreateTime"`

	// The block height where the trading platform is located.
	BlockHeight *int64 `json:"BlockHeight,omitnil,omitempty" name:"BlockHeight"`

	// The serial number of a transaction in a block.
	TxIndex *int64 `json:"TxIndex,omitnil,omitempty" name:"TxIndex"`
}

Jump to

Keyboard shortcuts

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