common

package
v2.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: Apache-2.0 Imports: 5 Imported by: 30

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthCommon        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowCommon          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupCommon = fmt.Errorf("proto: unexpected end of group")
)
View Source
var CallType_name = map[int32]string{
	0: "REST",
	1: "GRPC",
}
View Source
var CallType_value = map[string]int32{
	"REST": 0,
	"GRPC": 1,
}
View Source
var ChainmakerRuntimeType_name = map[int32]string{
	0: "INVALID",
	1: "NATIVE",
	2: "WASMER",
	3: "WXVM",
	4: "GASM",
	5: "EVM",
	6: "DOCKER_GO",
	7: "DOCKER_JAVA",
}
View Source
var ChainmakerRuntimeType_value = map[string]int32{
	"INVALID":     0,
	"NATIVE":      1,
	"WASMER":      2,
	"WXVM":        3,
	"GASM":        4,
	"EVM":         5,
	"DOCKER_GO":   6,
	"DOCKER_JAVA": 7,
}
View Source
var Code_name = map[int32]string{
	0: "GATEWAY_SUCCESS",
	1: "GATEWAY_TIMEOUT",
	2: "INVALID_PARAMETER",
	3: "TX_PROVE_ERROR",
	4: "CONTRACT_FAIL",
	5: "INTERNAL_ERROR",
	6: "RELAY_CHAIN_ERROR",
}
View Source
var Code_value = map[string]int32{
	"GATEWAY_SUCCESS":   0,
	"GATEWAY_TIMEOUT":   1,
	"INVALID_PARAMETER": 2,
	"TX_PROVE_ERROR":    3,
	"CONTRACT_FAIL":     4,
	"INTERNAL_ERROR":    5,
	"RELAY_CHAIN_ERROR": 6,
}
View Source
var CrossChainStateValue_name = map[int32]string{
	0: "NEW",
	1: "WAIT_EXECUTE",
	2: "WAIT_CONFIRM",
	3: "CONFIRM_END",
	4: "CANCEL_END",
}
View Source
var CrossChainStateValue_value = map[string]int32{
	"NEW":          0,
	"WAIT_EXECUTE": 1,
	"WAIT_CONFIRM": 2,
	"CONFIRM_END":  3,
	"CANCEL_END":   4,
}
View Source
var CrossType_name = map[int32]string{
	0: "QUERY",
	1: "INVOKE",
}
View Source
var CrossType_value = map[string]int32{
	"QUERY":  0,
	"INVOKE": 1,
}
View Source
var EventDataType_name = map[int32]string{
	0: "STRING",
	1: "MAP",
	2: "BYTE",
	3: "BOOL",
	4: "INT",
	5: "FLOAT",
	6: "ARRAY",
	7: "HASH",
	8: "ADDRESS",
}
View Source
var EventDataType_value = map[string]int32{
	"STRING":  0,
	"MAP":     1,
	"BYTE":    2,
	"BOOL":    3,
	"INT":     4,
	"FLOAT":   5,
	"ARRAY":   6,
	"HASH":    7,
	"ADDRESS": 8,
}
View Source
var EventName_name = map[int32]string{
	0: "NEW_CROSS_CHAIN",
	1: "CROSS_CHAIN_TRY_END",
	2: "UPADATE_RESULT_END",
	3: "GATEWAY_CONFIRM_END",
	4: "SRC_GATEWAY_CONFIRM_END",
}
View Source
var EventName_value = map[string]int32{
	"NEW_CROSS_CHAIN":         0,
	"CROSS_CHAIN_TRY_END":     1,
	"UPADATE_RESULT_END":      2,
	"GATEWAY_CONFIRM_END":     3,
	"SRC_GATEWAY_CONFIRM_END": 4,
}
View Source
var Operate_name = map[int32]string{
	0: "SAVE",
	1: "UPDATE",
	2: "DELETE",
	3: "GET",
}
View Source
var Operate_value = map[string]int32{
	"SAVE":   0,
	"UPDATE": 1,
	"DELETE": 2,
	"GET":    3,
}
View Source
var TriggerCondition_name = map[int32]string{
	0: "COMPLETELY_CONTRACT_EVENT",
	1: "CONTRACT_EVENT",
	2: "TBIS_CONTRACT",
}
View Source
var TriggerCondition_value = map[string]int32{
	"COMPLETELY_CONTRACT_EVENT": 0,
	"CONTRACT_EVENT":            1,
	"TBIS_CONTRACT":             2,
}
View Source
var TryResult_name = map[int32]string{
	0: "TRY_RESULT",
}
View Source
var TryResult_value = map[string]int32{
	"TRY_RESULT": 0,
}
View Source
var TxResultValue_name = map[int32]string{
	0: "TX_SUCCESS",
	1: "TX_TIMEOUT",
	2: "TX_FAIL",
	3: "TX_NOT_EXIST",
	4: "TX_NO_PERMISSIONS",
	5: "GATEWAY_NOT_FOUND",
	6: "GATEWAY_PINGPONG_ERROR",
	7: "CHAIN_PING_ERROR",
	8: "SRC_GATEWAY_GET_ERROR",
}
View Source
var TxResultValue_value = map[string]int32{
	"TX_SUCCESS":             0,
	"TX_TIMEOUT":             1,
	"TX_FAIL":                2,
	"TX_NOT_EXIST":           3,
	"TX_NO_PERMISSIONS":      4,
	"GATEWAY_NOT_FOUND":      5,
	"GATEWAY_PINGPONG_ERROR": 6,
	"CHAIN_PING_ERROR":       7,
	"SRC_GATEWAY_GET_ERROR":  8,
}
View Source
var TxVerifyRsult_name = map[int32]string{
	0: "VERIFY_SUCCESS",
	1: "VERIFY_INVALID",
	2: "VERIFY_NOT_NEED",
}
View Source
var TxVerifyRsult_value = map[string]int32{
	"VERIFY_SUCCESS":  0,
	"VERIFY_INVALID":  1,
	"VERIFY_NOT_NEED": 2,
}
View Source
var TxVerifyType_name = map[int32]string{
	0: "SPV",
	1: "RPC_INTERFACE",
	2: "NOT_NEED",
}
View Source
var TxVerifyType_value = map[string]int32{
	"SPV":           0,
	"RPC_INTERFACE": 1,
	"NOT_NEED":      2,
}
View Source
var Version_name = map[int32]string{
	0: "V1_0_0",
}
View Source
var Version_value = map[string]int32{
	"V1_0_0": 0,
}

Functions

This section is empty.

Types

type BcosConfig

type BcosConfig struct {
	// 链资源Id
	ChainRid string `protobuf:"bytes,1,opt,name=chain_rid,json=chainRid,proto3" json:"chain_rid,omitempty"`
	// ca
	Ca string `protobuf:"bytes,2,opt,name=ca,proto3" json:"ca,omitempty"`
	// key
	TlsKey string `protobuf:"bytes,3,opt,name=tls_key,json=tlsKey,proto3" json:"tls_key,omitempty"`
	// cert
	TlsCert string `protobuf:"bytes,4,opt,name=tls_cert,json=tlsCert,proto3" json:"tls_cert,omitempty"`
	// private key
	PrivateKey string `protobuf:"bytes,5,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"`
	// group id
	GroupId string `protobuf:"bytes,6,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
	// 地址
	Address string `protobuf:"bytes,7,opt,name=address,proto3" json:"address,omitempty"`
	// chain id
	ChainId int64 `protobuf:"varint,8,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
	// http
	Http bool `protobuf:"varint,9,opt,name=http,proto3" json:"http,omitempty"`
	// sm
	IsSmCrypto bool `protobuf:"varint,10,opt,name=is_sm_crypto,json=isSmCrypto,proto3" json:"is_sm_crypto,omitempty"`
	// 状态,由网关设置用户不需要关系
	State bool `protobuf:"varint,11,opt,name=state,proto3" json:"state,omitempty"`
	// 状态描述,由网关设置,状态为true,此处是成功信息,状态为false,此处有错误信息
	StateMessage string `protobuf:"bytes,12,opt,name=state_message,json=stateMessage,proto3" json:"state_message,omitempty"`
}

bcos配置信息

func (*BcosConfig) Descriptor

func (*BcosConfig) Descriptor() ([]byte, []int)

func (*BcosConfig) GetAddress

func (m *BcosConfig) GetAddress() string

func (*BcosConfig) GetCa

func (m *BcosConfig) GetCa() string

func (*BcosConfig) GetChainId

func (m *BcosConfig) GetChainId() int64

func (*BcosConfig) GetChainRid

func (m *BcosConfig) GetChainRid() string

func (*BcosConfig) GetGroupId

func (m *BcosConfig) GetGroupId() string

func (*BcosConfig) GetHttp

func (m *BcosConfig) GetHttp() bool

func (*BcosConfig) GetIsSmCrypto

func (m *BcosConfig) GetIsSmCrypto() bool

func (*BcosConfig) GetPrivateKey

func (m *BcosConfig) GetPrivateKey() string

func (*BcosConfig) GetState

func (m *BcosConfig) GetState() bool

func (*BcosConfig) GetStateMessage

func (m *BcosConfig) GetStateMessage() string

func (*BcosConfig) GetTlsCert

func (m *BcosConfig) GetTlsCert() string

func (*BcosConfig) GetTlsKey

func (m *BcosConfig) GetTlsKey() string

func (*BcosConfig) Marshal

func (m *BcosConfig) Marshal() (dAtA []byte, err error)

func (*BcosConfig) MarshalTo

func (m *BcosConfig) MarshalTo(dAtA []byte) (int, error)

func (*BcosConfig) MarshalToSizedBuffer

func (m *BcosConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*BcosConfig) ProtoMessage

func (*BcosConfig) ProtoMessage()

func (*BcosConfig) Reset

func (m *BcosConfig) Reset()

func (*BcosConfig) Size

func (m *BcosConfig) Size() (n int)

func (*BcosConfig) String

func (m *BcosConfig) String() string

func (*BcosConfig) Unmarshal

func (m *BcosConfig) Unmarshal(dAtA []byte) error

func (*BcosConfig) XXX_DiscardUnknown

func (m *BcosConfig) XXX_DiscardUnknown()

func (*BcosConfig) XXX_Marshal

func (m *BcosConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BcosConfig) XXX_Merge

func (m *BcosConfig) XXX_Merge(src proto.Message)

func (*BcosConfig) XXX_Size

func (m *BcosConfig) XXX_Size() int

func (*BcosConfig) XXX_Unmarshal

func (m *BcosConfig) XXX_Unmarshal(b []byte) error

type CallType

type CallType int32

网关调用类型

const (
	// restful接口方式
	CallType_REST CallType = 0
	// grpc方式
	CallType_GRPC CallType = 1
)

func (CallType) EnumDescriptor

func (CallType) EnumDescriptor() ([]byte, []int)

func (CallType) String

func (x CallType) String() string

type CancelInfo

type CancelInfo struct {
	// 链资源Id
	ChainRid string `protobuf:"bytes,2,opt,name=chain_rid,json=chainRid,proto3" json:"chain_rid,omitempty"`
	// 合约名称
	ContractName string `protobuf:"bytes,3,opt,name=contract_name,json=contractName,proto3" json:"contract_name,omitempty"`
	// 合约方法名称
	Method string `protobuf:"bytes,4,opt,name=method,proto3" json:"method,omitempty"`
	// 合约参数,json字符串,chainmaker为kv string json字符串,fabric为[]string json字符串,bcos为[]string json字符串
	// QUERY类型的跨链交易回调源网关的时候,失败不需要回写,不需要“TRY_RESULT”占位符,编写合约的时候需要注意参数设置
	Parameter string `protobuf:"bytes,5,opt,name=parameter,proto3" json:"parameter,omitempty"`
	// 参数数据在eventData数组中的索引,基于该字段生成的数组将被使用fmt.Sprintf方法与parameter参数共同组成目标合约参数,只用于交易触发模版
	// eventData是合约事件的具体内容生成的数组,chainmaker为具体的事件内容数组,fabric为具体时间内容经过string、map[string]string、[]string处理之后生成的数组
	ParamData []int32 `protobuf:"varint,6,rep,packed,name=param_data,json=paramData,proto3" json:"param_data,omitempty"`
	// bcos 需要指定每个参数的类型,QUERY类型的跨链交易失败不需要回写,不需要添加try_result的类型
	ParamDataType []EventDataType `` /* 136-byte string literal not displayed */
	// 扩展参数
	ExtraData string `protobuf:"bytes,8,opt,name=extra_data,json=extraData,proto3" json:"extra_data,omitempty"`
	// bcos abi
	Abi string `protobuf:"bytes,9,opt,name=abi,proto3" json:"abi,omitempty"`
}

cancel数据

func (*CancelInfo) Descriptor

func (*CancelInfo) Descriptor() ([]byte, []int)

func (*CancelInfo) GetAbi

func (m *CancelInfo) GetAbi() string

func (*CancelInfo) GetChainRid

func (m *CancelInfo) GetChainRid() string

func (*CancelInfo) GetContractName

func (m *CancelInfo) GetContractName() string

func (*CancelInfo) GetExtraData

func (m *CancelInfo) GetExtraData() string

func (*CancelInfo) GetMethod

func (m *CancelInfo) GetMethod() string

func (*CancelInfo) GetParamData

func (m *CancelInfo) GetParamData() []int32

func (*CancelInfo) GetParamDataType

func (m *CancelInfo) GetParamDataType() []EventDataType

func (*CancelInfo) GetParameter

func (m *CancelInfo) GetParameter() string

func (*CancelInfo) Marshal

func (m *CancelInfo) Marshal() (dAtA []byte, err error)

func (*CancelInfo) MarshalTo

func (m *CancelInfo) MarshalTo(dAtA []byte) (int, error)

func (*CancelInfo) MarshalToSizedBuffer

func (m *CancelInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CancelInfo) ProtoMessage

func (*CancelInfo) ProtoMessage()

func (*CancelInfo) Reset

func (m *CancelInfo) Reset()

func (*CancelInfo) Size

func (m *CancelInfo) Size() (n int)

func (*CancelInfo) String

func (m *CancelInfo) String() string

func (*CancelInfo) Unmarshal

func (m *CancelInfo) Unmarshal(dAtA []byte) error

func (*CancelInfo) XXX_DiscardUnknown

func (m *CancelInfo) XXX_DiscardUnknown()

func (*CancelInfo) XXX_Marshal

func (m *CancelInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CancelInfo) XXX_Merge

func (m *CancelInfo) XXX_Merge(src proto.Message)

func (*CancelInfo) XXX_Size

func (m *CancelInfo) XXX_Size() int

func (*CancelInfo) XXX_Unmarshal

func (m *CancelInfo) XXX_Unmarshal(b []byte) error

type ChainmakerConfig

type ChainmakerConfig struct {
	// 链资源Id
	ChainRid string `protobuf:"bytes,1,opt,name=chain_rid,json=chainRid,proto3" json:"chain_rid,omitempty"`
	// 链Id
	ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
	// 组织id
	OrgId string `protobuf:"bytes,3,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"`
	// 签名证书
	SignCert string `protobuf:"bytes,4,opt,name=sign_cert,json=signCert,proto3" json:"sign_cert,omitempty"`
	// 签名私钥
	SignKey string `protobuf:"bytes,5,opt,name=sign_key,json=signKey,proto3" json:"sign_key,omitempty"`
	// tls证书
	TlsCert string `protobuf:"bytes,6,opt,name=tls_cert,json=tlsCert,proto3" json:"tls_cert,omitempty"`
	// tls私钥
	TlsKey string `protobuf:"bytes,7,opt,name=tls_key,json=tlsKey,proto3" json:"tls_key,omitempty"`
	// chainmaker证书模式,保留字段,先支持证书模式,后续再支持其他模式
	AuthType string `protobuf:"bytes,8,opt,name=auth_type,json=authType,proto3" json:"auth_type,omitempty"`
	// 节点
	Node []*Node `protobuf:"bytes,9,rep,name=node,proto3" json:"node,omitempty"`
	// pkcs11 保留字段,先支持证书模式,后续再支持其他模式
	Pkcs11 *Pkcs11 `protobuf:"bytes,10,opt,name=pkcs11,proto3" json:"pkcs11,omitempty"`
	// 状态,由网关设置用户不需要关心
	State bool `protobuf:"varint,11,opt,name=state,proto3" json:"state,omitempty"`
	// 状态描述,由网关设置,状态为true,此处是成功信息,状态为false,此处有错误信息
	StateMessage string `protobuf:"bytes,12,opt,name=state_message,json=stateMessage,proto3" json:"state_message,omitempty"`
}

chainmaker配置信息

func (*ChainmakerConfig) Descriptor

func (*ChainmakerConfig) Descriptor() ([]byte, []int)

func (*ChainmakerConfig) GetAuthType

func (m *ChainmakerConfig) GetAuthType() string

func (*ChainmakerConfig) GetChainId

func (m *ChainmakerConfig) GetChainId() string

func (*ChainmakerConfig) GetChainRid

func (m *ChainmakerConfig) GetChainRid() string

func (*ChainmakerConfig) GetNode

func (m *ChainmakerConfig) GetNode() []*Node

func (*ChainmakerConfig) GetOrgId

func (m *ChainmakerConfig) GetOrgId() string

func (*ChainmakerConfig) GetPkcs11

func (m *ChainmakerConfig) GetPkcs11() *Pkcs11

func (*ChainmakerConfig) GetSignCert

func (m *ChainmakerConfig) GetSignCert() string

func (*ChainmakerConfig) GetSignKey

func (m *ChainmakerConfig) GetSignKey() string

func (*ChainmakerConfig) GetState

func (m *ChainmakerConfig) GetState() bool

func (*ChainmakerConfig) GetStateMessage

func (m *ChainmakerConfig) GetStateMessage() string

func (*ChainmakerConfig) GetTlsCert

func (m *ChainmakerConfig) GetTlsCert() string

func (*ChainmakerConfig) GetTlsKey

func (m *ChainmakerConfig) GetTlsKey() string

func (*ChainmakerConfig) Marshal

func (m *ChainmakerConfig) Marshal() (dAtA []byte, err error)

func (*ChainmakerConfig) MarshalTo

func (m *ChainmakerConfig) MarshalTo(dAtA []byte) (int, error)

func (*ChainmakerConfig) MarshalToSizedBuffer

func (m *ChainmakerConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ChainmakerConfig) ProtoMessage

func (*ChainmakerConfig) ProtoMessage()

func (*ChainmakerConfig) Reset

func (m *ChainmakerConfig) Reset()

func (*ChainmakerConfig) Size

func (m *ChainmakerConfig) Size() (n int)

func (*ChainmakerConfig) String

func (m *ChainmakerConfig) String() string

func (*ChainmakerConfig) Unmarshal

func (m *ChainmakerConfig) Unmarshal(dAtA []byte) error

func (*ChainmakerConfig) XXX_DiscardUnknown

func (m *ChainmakerConfig) XXX_DiscardUnknown()

func (*ChainmakerConfig) XXX_Marshal

func (m *ChainmakerConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ChainmakerConfig) XXX_Merge

func (m *ChainmakerConfig) XXX_Merge(src proto.Message)

func (*ChainmakerConfig) XXX_Size

func (m *ChainmakerConfig) XXX_Size() int

func (*ChainmakerConfig) XXX_Unmarshal

func (m *ChainmakerConfig) XXX_Unmarshal(b []byte) error

type ChainmakerRuntimeType

type ChainmakerRuntimeType int32

合约运行时

const (
	// 无效的
	ChainmakerRuntimeType_INVALID ChainmakerRuntimeType = 0
	// 长安链内部系统合约
	ChainmakerRuntimeType_NATIVE ChainmakerRuntimeType = 1
	// vm-wasmer, language-c++
	ChainmakerRuntimeType_WASMER ChainmakerRuntimeType = 2
	// vm-wxvm, language-cpp
	ChainmakerRuntimeType_WXVM ChainmakerRuntimeType = 3
	// wasm, tinygo
	ChainmakerRuntimeType_GASM ChainmakerRuntimeType = 4
	// vm-evm
	ChainmakerRuntimeType_EVM ChainmakerRuntimeType = 5
	// vm-docker, go语言
	ChainmakerRuntimeType_DOCKER_GO ChainmakerRuntimeType = 6
	// vm-docker, java语言
	ChainmakerRuntimeType_DOCKER_JAVA ChainmakerRuntimeType = 7
)

func (ChainmakerRuntimeType) EnumDescriptor

func (ChainmakerRuntimeType) EnumDescriptor() ([]byte, []int)

func (ChainmakerRuntimeType) String

func (x ChainmakerRuntimeType) String() string

type Code

type Code int32
const (
	// 网关返回成功
	Code_GATEWAY_SUCCESS Code = 0
	// 网关超时
	Code_GATEWAY_TIMEOUT Code = 1
	// 参数无效
	Code_INVALID_PARAMETER Code = 2
	// 交易认证失败
	Code_TX_PROVE_ERROR Code = 3
	// 合约执行失败
	Code_CONTRACT_FAIL Code = 4
	// 内部错误
	Code_INTERNAL_ERROR Code = 5
	// 中继链错误
	Code_RELAY_CHAIN_ERROR Code = 6
)

func (Code) EnumDescriptor

func (Code) EnumDescriptor() ([]byte, []int)

func (Code) String

func (x Code) String() string

type ConfirmInfo

type ConfirmInfo struct {
	// 链资源Id
	ChainRid string `protobuf:"bytes,2,opt,name=chain_rid,json=chainRid,proto3" json:"chain_rid,omitempty"`
	// 合约名称
	ContractName string `protobuf:"bytes,3,opt,name=contract_name,json=contractName,proto3" json:"contract_name,omitempty"`
	// 合约方法名称
	Method string `protobuf:"bytes,4,opt,name=method,proto3" json:"method,omitempty"`
	// 合约参数,json字符串,chainmaker为kv string json字符串,fabric为[]string json字符串,bcos为[]string json字符串
	// QUERY类型的跨链交易回调源网关的时候,添加“TRY_RESULT”占位符会将跨链交易的目标链返回值按照发起顺序替换掉,其他confirm流程不会触发,如"{\"key\":\"%s\",\"value\":\"TRY_RESULT\""}"或"[\"%s\","TRY_RESULT"]"
	// 占位符数量要和跨链交易数量相同,新建跨链event的时候会进行检测
	Parameter string `protobuf:"bytes,5,opt,name=parameter,proto3" json:"parameter,omitempty"`
	// 参数数据在eventData数组中的索引,基于该字段生成的数组将被使用fmt.Sprintf方法与parameter参数共同组成目标合约参数,只用于交易触发模版
	// eventData是合约事件的具体内容生成的数组,chainmaker为具体的事件内容,fabric为具体时间内容经过string、map[string]string、[]string处理之后生成的数组
	ParamData []int32 `protobuf:"varint,6,rep,packed,name=param_data,json=paramData,proto3" json:"param_data,omitempty"`
	// bcos 需要指定每个参数的类型,QUERY类型的跨链交易会将try_result值附加在后面,需要加上try_result的类型,合约的编写的时候需要注意参数设置
	ParamDataType []EventDataType `` /* 136-byte string literal not displayed */
	// 扩展参数
	ExtraData string `protobuf:"bytes,8,opt,name=extra_data,json=extraData,proto3" json:"extra_data,omitempty"`
	// bcos abi,只有bcos需要
	Abi string `protobuf:"bytes,9,opt,name=abi,proto3" json:"abi,omitempty"`
}

confirm数据

func (*ConfirmInfo) Descriptor

func (*ConfirmInfo) Descriptor() ([]byte, []int)

func (*ConfirmInfo) GetAbi

func (m *ConfirmInfo) GetAbi() string

func (*ConfirmInfo) GetChainRid

func (m *ConfirmInfo) GetChainRid() string

func (*ConfirmInfo) GetContractName

func (m *ConfirmInfo) GetContractName() string

func (*ConfirmInfo) GetExtraData

func (m *ConfirmInfo) GetExtraData() string

func (*ConfirmInfo) GetMethod

func (m *ConfirmInfo) GetMethod() string

func (*ConfirmInfo) GetParamData

func (m *ConfirmInfo) GetParamData() []int32

func (*ConfirmInfo) GetParamDataType

func (m *ConfirmInfo) GetParamDataType() []EventDataType

func (*ConfirmInfo) GetParameter

func (m *ConfirmInfo) GetParameter() string

func (*ConfirmInfo) Marshal

func (m *ConfirmInfo) Marshal() (dAtA []byte, err error)

func (*ConfirmInfo) MarshalTo

func (m *ConfirmInfo) MarshalTo(dAtA []byte) (int, error)

func (*ConfirmInfo) MarshalToSizedBuffer

func (m *ConfirmInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ConfirmInfo) ProtoMessage

func (*ConfirmInfo) ProtoMessage()

func (*ConfirmInfo) Reset

func (m *ConfirmInfo) Reset()

func (*ConfirmInfo) Size

func (m *ConfirmInfo) Size() (n int)

func (*ConfirmInfo) String

func (m *ConfirmInfo) String() string

func (*ConfirmInfo) Unmarshal

func (m *ConfirmInfo) Unmarshal(dAtA []byte) error

func (*ConfirmInfo) XXX_DiscardUnknown

func (m *ConfirmInfo) XXX_DiscardUnknown()

func (*ConfirmInfo) XXX_Marshal

func (m *ConfirmInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConfirmInfo) XXX_Merge

func (m *ConfirmInfo) XXX_Merge(src proto.Message)

func (*ConfirmInfo) XXX_Size

func (m *ConfirmInfo) XXX_Size() int

func (*ConfirmInfo) XXX_Unmarshal

func (m *ConfirmInfo) XXX_Unmarshal(b []byte) error

type ContractKeyValuePair

type ContractKeyValuePair struct {
	// 键
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// 值
	Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}

合约参数,k-v键值对

func (*ContractKeyValuePair) Descriptor

func (*ContractKeyValuePair) Descriptor() ([]byte, []int)

func (*ContractKeyValuePair) GetKey

func (m *ContractKeyValuePair) GetKey() string

func (*ContractKeyValuePair) GetValue

func (m *ContractKeyValuePair) GetValue() []byte

func (*ContractKeyValuePair) Marshal

func (m *ContractKeyValuePair) Marshal() (dAtA []byte, err error)

func (*ContractKeyValuePair) MarshalTo

func (m *ContractKeyValuePair) MarshalTo(dAtA []byte) (int, error)

func (*ContractKeyValuePair) MarshalToSizedBuffer

func (m *ContractKeyValuePair) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ContractKeyValuePair) ProtoMessage

func (*ContractKeyValuePair) ProtoMessage()

func (*ContractKeyValuePair) Reset

func (m *ContractKeyValuePair) Reset()

func (*ContractKeyValuePair) Size

func (m *ContractKeyValuePair) Size() (n int)

func (*ContractKeyValuePair) String

func (m *ContractKeyValuePair) String() string

func (*ContractKeyValuePair) Unmarshal

func (m *ContractKeyValuePair) Unmarshal(dAtA []byte) error

func (*ContractKeyValuePair) XXX_DiscardUnknown

func (m *ContractKeyValuePair) XXX_DiscardUnknown()

func (*ContractKeyValuePair) XXX_Marshal

func (m *ContractKeyValuePair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ContractKeyValuePair) XXX_Merge

func (m *ContractKeyValuePair) XXX_Merge(src proto.Message)

func (*ContractKeyValuePair) XXX_Size

func (m *ContractKeyValuePair) XXX_Size() int

func (*ContractKeyValuePair) XXX_Unmarshal

func (m *ContractKeyValuePair) XXX_Unmarshal(b []byte) error

type CrossChainConfirm

type CrossChainConfirm struct {
	// 执行结果code
	Code Code `protobuf:"varint,1,opt,name=code,proto3,enum=common.Code" json:"code,omitempty"`
	// 返回消息内容
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
}

各网关确认结果

func (*CrossChainConfirm) Descriptor

func (*CrossChainConfirm) Descriptor() ([]byte, []int)

func (*CrossChainConfirm) GetCode

func (m *CrossChainConfirm) GetCode() Code

func (*CrossChainConfirm) GetMessage

func (m *CrossChainConfirm) GetMessage() string

func (*CrossChainConfirm) Marshal

func (m *CrossChainConfirm) Marshal() (dAtA []byte, err error)

func (*CrossChainConfirm) MarshalTo

func (m *CrossChainConfirm) MarshalTo(dAtA []byte) (int, error)

func (*CrossChainConfirm) MarshalToSizedBuffer

func (m *CrossChainConfirm) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CrossChainConfirm) ProtoMessage

func (*CrossChainConfirm) ProtoMessage()

func (*CrossChainConfirm) Reset

func (m *CrossChainConfirm) Reset()

func (*CrossChainConfirm) Size

func (m *CrossChainConfirm) Size() (n int)

func (*CrossChainConfirm) String

func (m *CrossChainConfirm) String() string

func (*CrossChainConfirm) Unmarshal

func (m *CrossChainConfirm) Unmarshal(dAtA []byte) error

func (*CrossChainConfirm) XXX_DiscardUnknown

func (m *CrossChainConfirm) XXX_DiscardUnknown()

func (*CrossChainConfirm) XXX_Marshal

func (m *CrossChainConfirm) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CrossChainConfirm) XXX_Merge

func (m *CrossChainConfirm) XXX_Merge(src proto.Message)

func (*CrossChainConfirm) XXX_Size

func (m *CrossChainConfirm) XXX_Size() int

func (*CrossChainConfirm) XXX_Unmarshal

func (m *CrossChainConfirm) XXX_Unmarshal(b []byte) error

type CrossChainConfirmUpChain

type CrossChainConfirmUpChain struct {
	// 确认的索引
	Index int32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
	// 确认结果
	CrossChainConfirm *CrossChainConfirm `protobuf:"bytes,2,opt,name=cross_chain_confirm,json=crossChainConfirm,proto3" json:"cross_chain_confirm,omitempty"`
}

网关确认结果上链对象

func (*CrossChainConfirmUpChain) Descriptor

func (*CrossChainConfirmUpChain) Descriptor() ([]byte, []int)

func (*CrossChainConfirmUpChain) GetCrossChainConfirm

func (m *CrossChainConfirmUpChain) GetCrossChainConfirm() *CrossChainConfirm

func (*CrossChainConfirmUpChain) GetIndex

func (m *CrossChainConfirmUpChain) GetIndex() int32

func (*CrossChainConfirmUpChain) Marshal

func (m *CrossChainConfirmUpChain) Marshal() (dAtA []byte, err error)

func (*CrossChainConfirmUpChain) MarshalTo

func (m *CrossChainConfirmUpChain) MarshalTo(dAtA []byte) (int, error)

func (*CrossChainConfirmUpChain) MarshalToSizedBuffer

func (m *CrossChainConfirmUpChain) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CrossChainConfirmUpChain) ProtoMessage

func (*CrossChainConfirmUpChain) ProtoMessage()

func (*CrossChainConfirmUpChain) Reset

func (m *CrossChainConfirmUpChain) Reset()

func (*CrossChainConfirmUpChain) Size

func (m *CrossChainConfirmUpChain) Size() (n int)

func (*CrossChainConfirmUpChain) String

func (m *CrossChainConfirmUpChain) String() string

func (*CrossChainConfirmUpChain) Unmarshal

func (m *CrossChainConfirmUpChain) Unmarshal(dAtA []byte) error

func (*CrossChainConfirmUpChain) XXX_DiscardUnknown

func (m *CrossChainConfirmUpChain) XXX_DiscardUnknown()

func (*CrossChainConfirmUpChain) XXX_Marshal

func (m *CrossChainConfirmUpChain) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CrossChainConfirmUpChain) XXX_Merge

func (m *CrossChainConfirmUpChain) XXX_Merge(src proto.Message)

func (*CrossChainConfirmUpChain) XXX_Size

func (m *CrossChainConfirmUpChain) XXX_Size() int

func (*CrossChainConfirmUpChain) XXX_Unmarshal

func (m *CrossChainConfirmUpChain) XXX_Unmarshal(b []byte) error

type CrossChainEvent

type CrossChainEvent struct {
	// 唯一ID,组成为“event_name#contract_name#chain_rid”,不需要用户设置
	CrossChainEventId string `protobuf:"bytes,1,opt,name=cross_chain_event_id,json=crossChainEventId,proto3" json:"cross_chain_event_id,omitempty"`
	// chain_rid链资源id
	ChainRid string `protobuf:"bytes,2,opt,name=chain_rid,json=chainRid,proto3" json:"chain_rid,omitempty"`
	// 合约名称, bcos为地址
	ContractName string `protobuf:"bytes,3,opt,name=contract_name,json=contractName,proto3" json:"contract_name,omitempty"`
	// 跨链名称
	CrossChainName string `protobuf:"bytes,4,opt,name=cross_chain_name,json=crossChainName,proto3" json:"cross_chain_name,omitempty"`
	// 跨链标记
	CrossChainFlag string `protobuf:"bytes,5,opt,name=cross_chain_flag,json=crossChainFlag,proto3" json:"cross_chain_flag,omitempty"`
	// 触发方式
	TriggerCondition TriggerCondition `` /* 139-byte string literal not displayed */
	// 事件名称, bcos为event,如 SetState(uint256,string)
	EventName string `protobuf:"bytes,7,opt,name=event_name,json=eventName,proto3" json:"event_name,omitempty"`
	// fabric事件数据类型,只支持string、map、array
	// string类型会生成只有一个元素的eventData数组
	// map类型会按照map[string]string反序列化,生成和MapEventDataType中key值对应顺序的eventData数组
	// array会按照[]string反序列化
	FabricEventDataType EventDataType `` /* 149-byte string literal not displayed */
	// fabric map事件数据类型,key的填写顺序会映射为eventData数组,跨链消息中的所有param_data字段需要填写为该数组字段的索引
	FabricMapEventDataType []*MapEventDataType `` /* 133-byte string literal not displayed */
	// fabric array事件数据类型,
	FabricArrayEventDataType []EventDataType `` /* 174-byte string literal not displayed */
	// chainmaker事件数据类型,eventData数组即事件的数组
	ChainmakerEventDataType []EventDataType `` /* 169-byte string literal not displayed */
	// fisco bcos 事件数据类型,这里会将topic中的数据一并计算进去,并且由topic的数据开头,生成eventData数组
	BcosEventDataType []EventDataType `` /* 151-byte string literal not displayed */
	// fisco bcos 事件abi,即事件中每个参数的abi,这里写错会导致网关无法接些event的具体内容
	Abi []string `protobuf:"bytes,13,rep,name=abi,proto3" json:"abi,omitempty"`
	// 是否为跨链交易,bcos、chainmaker、fabirc eventData数组的字段名称需要写成
	// "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten"这种形式,目前只支持到10,扩展只需要简单的修改代码即可
	// map的字段名称照实写就可以了
	// 例如 "one == \"lockaddress\""
	// bcos地址如果类型写为address,请务必实测fisco bcos go sdk监听到的具体字符串之后再填写
	//(判断字符串,参考https://github.com/Knetic/govaluate
	IsCrossChain string `protobuf:"bytes,14,opt,name=is_cross_chain,json=isCrossChain,proto3" json:"is_cross_chain,omitempty"`
	// 作为标识,中继网关向跨链网关发送确认操作
	ConfirmInfo *ConfirmInfo `protobuf:"bytes,15,opt,name=confirm_info,json=confirmInfo,proto3" json:"confirm_info,omitempty"`
	// 作为标识,中继网关向跨链网关发送取消操作
	CancelInfo *CancelInfo `protobuf:"bytes,16,opt,name=cancel_info,json=cancelInfo,proto3" json:"cancel_info,omitempty"`
	//目标网关id
	CrossChainCreate []*CrossChainMsg `protobuf:"bytes,17,rep,name=cross_chain_create,json=crossChainCreate,proto3" json:"cross_chain_create,omitempty"`
	//超时时间 s
	Timeout int64 `protobuf:"varint,18,opt,name=timeout,proto3" json:"timeout,omitempty"`
	// 跨链类型
	CrossType CrossType `protobuf:"varint,19,opt,name=cross_type,json=crossType,proto3,enum=common.CrossType" json:"cross_type,omitempty"`
	// 状态,由网关设置用户不需要关心
	State bool `protobuf:"varint,20,opt,name=state,proto3" json:"state,omitempty"`
	// 状态描述,由网关设置,状态为true,此处是成功信息,状态为false,此处有错误信息
	StateMessage string `protobuf:"bytes,21,opt,name=state_message,json=stateMessage,proto3" json:"state_message,omitempty"`
}

跨链触发器

func (*CrossChainEvent) Descriptor

func (*CrossChainEvent) Descriptor() ([]byte, []int)

func (*CrossChainEvent) GetAbi

func (m *CrossChainEvent) GetAbi() []string

func (*CrossChainEvent) GetBcosEventDataType

func (m *CrossChainEvent) GetBcosEventDataType() []EventDataType

func (*CrossChainEvent) GetCancelInfo

func (m *CrossChainEvent) GetCancelInfo() *CancelInfo

func (*CrossChainEvent) GetChainRid

func (m *CrossChainEvent) GetChainRid() string

func (*CrossChainEvent) GetChainmakerEventDataType

func (m *CrossChainEvent) GetChainmakerEventDataType() []EventDataType

func (*CrossChainEvent) GetConfirmInfo

func (m *CrossChainEvent) GetConfirmInfo() *ConfirmInfo

func (*CrossChainEvent) GetContractName

func (m *CrossChainEvent) GetContractName() string

func (*CrossChainEvent) GetCrossChainCreate

func (m *CrossChainEvent) GetCrossChainCreate() []*CrossChainMsg

func (*CrossChainEvent) GetCrossChainEventId

func (m *CrossChainEvent) GetCrossChainEventId() string

func (*CrossChainEvent) GetCrossChainFlag

func (m *CrossChainEvent) GetCrossChainFlag() string

func (*CrossChainEvent) GetCrossChainName

func (m *CrossChainEvent) GetCrossChainName() string

func (*CrossChainEvent) GetCrossType

func (m *CrossChainEvent) GetCrossType() CrossType

func (*CrossChainEvent) GetEventName

func (m *CrossChainEvent) GetEventName() string

func (*CrossChainEvent) GetFabricArrayEventDataType

func (m *CrossChainEvent) GetFabricArrayEventDataType() []EventDataType

func (*CrossChainEvent) GetFabricEventDataType

func (m *CrossChainEvent) GetFabricEventDataType() EventDataType

func (*CrossChainEvent) GetFabricMapEventDataType

func (m *CrossChainEvent) GetFabricMapEventDataType() []*MapEventDataType

func (*CrossChainEvent) GetIsCrossChain

func (m *CrossChainEvent) GetIsCrossChain() string

func (*CrossChainEvent) GetState

func (m *CrossChainEvent) GetState() bool

func (*CrossChainEvent) GetStateMessage

func (m *CrossChainEvent) GetStateMessage() string

func (*CrossChainEvent) GetTimeout

func (m *CrossChainEvent) GetTimeout() int64

func (*CrossChainEvent) GetTriggerCondition

func (m *CrossChainEvent) GetTriggerCondition() TriggerCondition

func (*CrossChainEvent) Marshal

func (m *CrossChainEvent) Marshal() (dAtA []byte, err error)

func (*CrossChainEvent) MarshalTo

func (m *CrossChainEvent) MarshalTo(dAtA []byte) (int, error)

func (*CrossChainEvent) MarshalToSizedBuffer

func (m *CrossChainEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CrossChainEvent) ProtoMessage

func (*CrossChainEvent) ProtoMessage()

func (*CrossChainEvent) Reset

func (m *CrossChainEvent) Reset()

func (*CrossChainEvent) Size

func (m *CrossChainEvent) Size() (n int)

func (*CrossChainEvent) String

func (m *CrossChainEvent) String() string

func (*CrossChainEvent) Unmarshal

func (m *CrossChainEvent) Unmarshal(dAtA []byte) error

func (*CrossChainEvent) XXX_DiscardUnknown

func (m *CrossChainEvent) XXX_DiscardUnknown()

func (*CrossChainEvent) XXX_Marshal

func (m *CrossChainEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CrossChainEvent) XXX_Merge

func (m *CrossChainEvent) XXX_Merge(src proto.Message)

func (*CrossChainEvent) XXX_Size

func (m *CrossChainEvent) XXX_Size() int

func (*CrossChainEvent) XXX_Unmarshal

func (m *CrossChainEvent) XXX_Unmarshal(b []byte) error

type CrossChainInfo

type CrossChainInfo struct {
	// 跨链Id
	CrossChainId string `protobuf:"bytes,1,opt,name=cross_chain_id,json=crossChainId,proto3" json:"cross_chain_id,omitempty"`
	// 跨链名称
	CrossChainName string `protobuf:"bytes,2,opt,name=cross_chain_name,json=crossChainName,proto3" json:"cross_chain_name,omitempty"`
	// 跨链标记
	CrossChainFlag string `protobuf:"bytes,3,opt,name=cross_chain_flag,json=crossChainFlag,proto3" json:"cross_chain_flag,omitempty"`
	// 发起跨链网关的id
	From string `protobuf:"bytes,4,opt,name=from,proto3" json:"from,omitempty"`
	// 跨链信息具体内容,该数组的下标和cross_chain_tx_content/gateway_confirm_result一一对应
	CrossChainMsg []*CrossChainMsg `protobuf:"bytes,5,rep,name=cross_chain_msg,json=crossChainMsg,proto3" json:"cross_chain_msg,omitempty"`
	// 跨链首笔交易内容
	FirstTxContent *TxContentWithVerify `protobuf:"bytes,6,opt,name=first_tx_content,json=firstTxContent,proto3" json:"first_tx_content,omitempty"`
	// 跨链交易的内容,包含各网关的交易结果
	CrossChainTxContent []*TxContentWithVerify `protobuf:"bytes,7,rep,name=cross_chain_tx_content,json=crossChainTxContent,proto3" json:"cross_chain_tx_content,omitempty"`
	// 跨链结果
	CrossChainResult bool `protobuf:"varint,8,opt,name=cross_chain_result,json=crossChainResult,proto3" json:"cross_chain_result,omitempty"`
	// 各网关确认结果
	GatewayConfirmResult []*CrossChainConfirm `protobuf:"bytes,9,rep,name=gateway_confirm_result,json=gatewayConfirmResult,proto3" json:"gateway_confirm_result,omitempty"`
	// 跨链状态
	State CrossChainStateValue `protobuf:"varint,10,opt,name=state,proto3,enum=common.CrossChainStateValue" json:"state,omitempty"`
	// 源网关confirm数据,作为标识,中继网关向跨链网关发送确认操作
	ConfirmInfo *ConfirmInfo `protobuf:"bytes,11,opt,name=confirm_info,json=confirmInfo,proto3" json:"confirm_info,omitempty"`
	// 源网关cancel数据,作为标识,中继网关向跨链网关发送取消操作
	CancelInfo *CancelInfo `protobuf:"bytes,12,opt,name=cancel_info,json=cancelInfo,proto3" json:"cancel_info,omitempty"`
	// 源网关确认结果
	ConfirmResult *CrossChainConfirm `protobuf:"bytes,13,opt,name=confirm_result,json=confirmResult,proto3" json:"confirm_result,omitempty"`
	// 超时时间 s
	Timeout int64 `protobuf:"varint,14,opt,name=timeout,proto3" json:"timeout,omitempty"`
	// 跨链类型
	CrossType CrossType `protobuf:"varint,19,opt,name=cross_type,json=crossType,proto3,enum=common.CrossType" json:"cross_type,omitempty"`
}

跨链信息在链上的存储结构

func (*CrossChainInfo) Descriptor

func (*CrossChainInfo) Descriptor() ([]byte, []int)

func (*CrossChainInfo) GetCancelInfo

func (m *CrossChainInfo) GetCancelInfo() *CancelInfo

func (*CrossChainInfo) GetConfirmInfo

func (m *CrossChainInfo) GetConfirmInfo() *ConfirmInfo

func (*CrossChainInfo) GetConfirmResult

func (m *CrossChainInfo) GetConfirmResult() *CrossChainConfirm

func (*CrossChainInfo) GetCrossChainFlag

func (m *CrossChainInfo) GetCrossChainFlag() string

func (*CrossChainInfo) GetCrossChainId

func (m *CrossChainInfo) GetCrossChainId() string

func (*CrossChainInfo) GetCrossChainMsg

func (m *CrossChainInfo) GetCrossChainMsg() []*CrossChainMsg

func (*CrossChainInfo) GetCrossChainName

func (m *CrossChainInfo) GetCrossChainName() string

func (*CrossChainInfo) GetCrossChainResult

func (m *CrossChainInfo) GetCrossChainResult() bool

func (*CrossChainInfo) GetCrossChainTxContent

func (m *CrossChainInfo) GetCrossChainTxContent() []*TxContentWithVerify

func (*CrossChainInfo) GetCrossType

func (m *CrossChainInfo) GetCrossType() CrossType

func (*CrossChainInfo) GetFirstTxContent

func (m *CrossChainInfo) GetFirstTxContent() *TxContentWithVerify

func (*CrossChainInfo) GetFrom

func (m *CrossChainInfo) GetFrom() string

func (*CrossChainInfo) GetGatewayConfirmResult

func (m *CrossChainInfo) GetGatewayConfirmResult() []*CrossChainConfirm

func (*CrossChainInfo) GetState

func (m *CrossChainInfo) GetState() CrossChainStateValue

func (*CrossChainInfo) GetTimeout

func (m *CrossChainInfo) GetTimeout() int64

func (*CrossChainInfo) Marshal

func (m *CrossChainInfo) Marshal() (dAtA []byte, err error)

func (*CrossChainInfo) MarshalTo

func (m *CrossChainInfo) MarshalTo(dAtA []byte) (int, error)

func (*CrossChainInfo) MarshalToSizedBuffer

func (m *CrossChainInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CrossChainInfo) ProtoMessage

func (*CrossChainInfo) ProtoMessage()

func (*CrossChainInfo) Reset

func (m *CrossChainInfo) Reset()

func (*CrossChainInfo) Size

func (m *CrossChainInfo) Size() (n int)

func (*CrossChainInfo) String

func (m *CrossChainInfo) String() string

func (*CrossChainInfo) Unmarshal

func (m *CrossChainInfo) Unmarshal(dAtA []byte) error

func (*CrossChainInfo) XXX_DiscardUnknown

func (m *CrossChainInfo) XXX_DiscardUnknown()

func (*CrossChainInfo) XXX_Marshal

func (m *CrossChainInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CrossChainInfo) XXX_Merge

func (m *CrossChainInfo) XXX_Merge(src proto.Message)

func (*CrossChainInfo) XXX_Size

func (m *CrossChainInfo) XXX_Size() int

func (*CrossChainInfo) XXX_Unmarshal

func (m *CrossChainInfo) XXX_Unmarshal(b []byte) error

type CrossChainMsg

type CrossChainMsg struct {
	// 目标网关Id
	GatewayId string `protobuf:"bytes,1,opt,name=gateway_id,json=gatewayId,proto3" json:"gateway_id,omitempty"`
	// 目标链资源id
	ChainRid string `protobuf:"bytes,2,opt,name=chain_rid,json=chainRid,proto3" json:"chain_rid,omitempty"`
	// 目标链合约名称
	ContractName string `protobuf:"bytes,3,opt,name=contract_name,json=contractName,proto3" json:"contract_name,omitempty"`
	// 目标合约方法名称
	Method string `protobuf:"bytes,4,opt,name=method,proto3" json:"method,omitempty"`
	// 签名身份Id
	Identity []string `protobuf:"bytes,5,rep,name=identity,proto3" json:"identity,omitempty"`
	// 目标合约参数,json字符串,chainmaker为kv string json字符串,fabric为array string json字符串,bcos为array string json字符串
	Parameter string `protobuf:"bytes,6,opt,name=parameter,proto3" json:"parameter,omitempty"`
	// 参数数据在eventData数组中的索引,基于该字段生成的数组将被使用fmt.Sprintf方法与parameter参数共同组成目标合约参数,只用于交易触发模版
	// eventData是合约事件的具体内容生成的数组,chainmaker为具体的事件内容,fabric为具体时间内容经过string、map[string]string、[]string处理之后生成的数组
	ParamData []int32 `protobuf:"varint,7,rep,packed,name=param_data,json=paramData,proto3" json:"param_data,omitempty"`
	// bcos 需要指定每个参数的类型,其他不需要
	ParamDataType []EventDataType `` /* 136-byte string literal not displayed */
	// 扩展数据,由发起网关和目标网关商定,中继网关只负责传输
	ExtraData string `protobuf:"bytes,9,opt,name=extra_data,json=extraData,proto3" json:"extra_data,omitempty"`
	// QUERY类型指定无效,作为标识,中继网关向跨链网关发送确认操作
	ConfirmInfo *ConfirmInfo `protobuf:"bytes,10,opt,name=confirm_info,json=confirmInfo,proto3" json:"confirm_info,omitempty"`
	// QUERY类型指定无效, 作为标识,中继网关向跨链网关发送取消操作
	CancelInfo *CancelInfo `protobuf:"bytes,11,opt,name=cancel_info,json=cancelInfo,proto3" json:"cancel_info,omitempty"`
	// bcos abi,只有bcos需要
	Abi string `protobuf:"bytes,12,opt,name=abi,proto3" json:"abi,omitempty"`
}

func (*CrossChainMsg) Descriptor

func (*CrossChainMsg) Descriptor() ([]byte, []int)

func (*CrossChainMsg) GetAbi

func (m *CrossChainMsg) GetAbi() string

func (*CrossChainMsg) GetCancelInfo

func (m *CrossChainMsg) GetCancelInfo() *CancelInfo

func (*CrossChainMsg) GetChainRid

func (m *CrossChainMsg) GetChainRid() string

func (*CrossChainMsg) GetConfirmInfo

func (m *CrossChainMsg) GetConfirmInfo() *ConfirmInfo

func (*CrossChainMsg) GetContractName

func (m *CrossChainMsg) GetContractName() string

func (*CrossChainMsg) GetExtraData

func (m *CrossChainMsg) GetExtraData() string

func (*CrossChainMsg) GetGatewayId

func (m *CrossChainMsg) GetGatewayId() string

func (*CrossChainMsg) GetIdentity

func (m *CrossChainMsg) GetIdentity() []string

func (*CrossChainMsg) GetMethod

func (m *CrossChainMsg) GetMethod() string

func (*CrossChainMsg) GetParamData

func (m *CrossChainMsg) GetParamData() []int32

func (*CrossChainMsg) GetParamDataType

func (m *CrossChainMsg) GetParamDataType() []EventDataType

func (*CrossChainMsg) GetParameter

func (m *CrossChainMsg) GetParameter() string

func (*CrossChainMsg) Marshal

func (m *CrossChainMsg) Marshal() (dAtA []byte, err error)

func (*CrossChainMsg) MarshalTo

func (m *CrossChainMsg) MarshalTo(dAtA []byte) (int, error)

func (*CrossChainMsg) MarshalToSizedBuffer

func (m *CrossChainMsg) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CrossChainMsg) ProtoMessage

func (*CrossChainMsg) ProtoMessage()

func (*CrossChainMsg) Reset

func (m *CrossChainMsg) Reset()

func (*CrossChainMsg) Size

func (m *CrossChainMsg) Size() (n int)

func (*CrossChainMsg) String

func (m *CrossChainMsg) String() string

func (*CrossChainMsg) Unmarshal

func (m *CrossChainMsg) Unmarshal(dAtA []byte) error

func (*CrossChainMsg) XXX_DiscardUnknown

func (m *CrossChainMsg) XXX_DiscardUnknown()

func (*CrossChainMsg) XXX_Marshal

func (m *CrossChainMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CrossChainMsg) XXX_Merge

func (m *CrossChainMsg) XXX_Merge(src proto.Message)

func (*CrossChainMsg) XXX_Size

func (m *CrossChainMsg) XXX_Size() int

func (*CrossChainMsg) XXX_Unmarshal

func (m *CrossChainMsg) XXX_Unmarshal(b []byte) error

type CrossChainStateValue

type CrossChainStateValue int32

跨链状态

const (
	// 新建
	CrossChainStateValue_NEW CrossChainStateValue = 0
	// 待执行
	CrossChainStateValue_WAIT_EXECUTE CrossChainStateValue = 1
	// 待提交
	CrossChainStateValue_WAIT_CONFIRM CrossChainStateValue = 2
	// 确认结束
	CrossChainStateValue_CONFIRM_END CrossChainStateValue = 3
	// 回滚结束
	CrossChainStateValue_CANCEL_END CrossChainStateValue = 4
)

func (CrossChainStateValue) EnumDescriptor

func (CrossChainStateValue) EnumDescriptor() ([]byte, []int)

func (CrossChainStateValue) String

func (x CrossChainStateValue) String() string

type CrossChainTxUpChain

type CrossChainTxUpChain struct {
	// 确认的索引
	Index int32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
	// 交易结果
	TxContentWithVerify *TxContentWithVerify `protobuf:"bytes,2,opt,name=tx_content_with_verify,json=txContentWithVerify,proto3" json:"tx_content_with_verify,omitempty"`
}

网关交易结果上链对象

func (*CrossChainTxUpChain) Descriptor

func (*CrossChainTxUpChain) Descriptor() ([]byte, []int)

func (*CrossChainTxUpChain) GetIndex

func (m *CrossChainTxUpChain) GetIndex() int32

func (*CrossChainTxUpChain) GetTxContentWithVerify

func (m *CrossChainTxUpChain) GetTxContentWithVerify() *TxContentWithVerify

func (*CrossChainTxUpChain) Marshal

func (m *CrossChainTxUpChain) Marshal() (dAtA []byte, err error)

func (*CrossChainTxUpChain) MarshalTo

func (m *CrossChainTxUpChain) MarshalTo(dAtA []byte) (int, error)

func (*CrossChainTxUpChain) MarshalToSizedBuffer

func (m *CrossChainTxUpChain) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CrossChainTxUpChain) ProtoMessage

func (*CrossChainTxUpChain) ProtoMessage()

func (*CrossChainTxUpChain) Reset

func (m *CrossChainTxUpChain) Reset()

func (*CrossChainTxUpChain) Size

func (m *CrossChainTxUpChain) Size() (n int)

func (*CrossChainTxUpChain) String

func (m *CrossChainTxUpChain) String() string

func (*CrossChainTxUpChain) Unmarshal

func (m *CrossChainTxUpChain) Unmarshal(dAtA []byte) error

func (*CrossChainTxUpChain) XXX_DiscardUnknown

func (m *CrossChainTxUpChain) XXX_DiscardUnknown()

func (*CrossChainTxUpChain) XXX_Marshal

func (m *CrossChainTxUpChain) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CrossChainTxUpChain) XXX_Merge

func (m *CrossChainTxUpChain) XXX_Merge(src proto.Message)

func (*CrossChainTxUpChain) XXX_Size

func (m *CrossChainTxUpChain) XXX_Size() int

func (*CrossChainTxUpChain) XXX_Unmarshal

func (m *CrossChainTxUpChain) XXX_Unmarshal(b []byte) error

type CrossType

type CrossType int32
const (
	// 跨链查询
	CrossType_QUERY CrossType = 0
	// 跨链交易
	CrossType_INVOKE CrossType = 1
)

func (CrossType) EnumDescriptor

func (CrossType) EnumDescriptor() ([]byte, []int)

func (CrossType) String

func (x CrossType) String() string

type EventDataType

type EventDataType int32

事件数据类型

const (
	// string
	EventDataType_STRING EventDataType = 0
	// map
	EventDataType_MAP EventDataType = 1
	// byte
	EventDataType_BYTE EventDataType = 2
	// BOOL
	EventDataType_BOOL EventDataType = 3
	// int
	EventDataType_INT EventDataType = 4
	// float
	EventDataType_FLOAT EventDataType = 5
	// 数组
	EventDataType_ARRAY EventDataType = 6
	// hash, bcos专用
	EventDataType_HASH EventDataType = 7
	// ADDRESS, bcos专用
	EventDataType_ADDRESS EventDataType = 8
)

func (EventDataType) EnumDescriptor

func (EventDataType) EnumDescriptor() ([]byte, []int)

func (EventDataType) String

func (x EventDataType) String() string

type EventName

type EventName int32
const (
	// new
	EventName_NEW_CROSS_CHAIN EventName = 0
	// try end
	EventName_CROSS_CHAIN_TRY_END EventName = 1
	// 跨链结果更新完成
	EventName_UPADATE_RESULT_END EventName = 2
	// 提交完成
	EventName_GATEWAY_CONFIRM_END EventName = 3
	// 源网关提交完成
	EventName_SRC_GATEWAY_CONFIRM_END EventName = 4
)

func (EventName) EnumDescriptor

func (EventName) EnumDescriptor() ([]byte, []int)

func (EventName) String

func (x EventName) String() string

type FabricConfig

type FabricConfig struct {
	// 链资源Id
	ChainRid string `protobuf:"bytes,1,opt,name=chain_rid,json=chainRid,proto3" json:"chain_rid,omitempty"`
	// 链Id
	ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
	// 组织
	Org []*Org `protobuf:"bytes,3,rep,name=org,proto3" json:"org,omitempty"`
	// tls证书
	TlsCert string `protobuf:"bytes,4,opt,name=tls_cert,json=tlsCert,proto3" json:"tls_cert,omitempty"`
	// tls私钥
	TlsKey string `protobuf:"bytes,5,opt,name=tls_key,json=tlsKey,proto3" json:"tls_key,omitempty"`
	// orderer节点
	Orderers []*Orderer `protobuf:"bytes,6,rep,name=orderers,proto3" json:"orderers,omitempty"`
	// 状态,由网关设置用户不需要关系
	State bool `protobuf:"varint,7,opt,name=state,proto3" json:"state,omitempty"`
	// 状态描述,由网关设置,状态为true,此处是成功信息,状态为false,此处有错误信息
	StateMessage string `protobuf:"bytes,8,opt,name=state_message,json=stateMessage,proto3" json:"state_message,omitempty"`
}

fabric配置信息

func (*FabricConfig) Descriptor

func (*FabricConfig) Descriptor() ([]byte, []int)

func (*FabricConfig) GetChainId

func (m *FabricConfig) GetChainId() string

func (*FabricConfig) GetChainRid

func (m *FabricConfig) GetChainRid() string

func (*FabricConfig) GetOrderers

func (m *FabricConfig) GetOrderers() []*Orderer

func (*FabricConfig) GetOrg

func (m *FabricConfig) GetOrg() []*Org

func (*FabricConfig) GetState

func (m *FabricConfig) GetState() bool

func (*FabricConfig) GetStateMessage

func (m *FabricConfig) GetStateMessage() string

func (*FabricConfig) GetTlsCert

func (m *FabricConfig) GetTlsCert() string

func (*FabricConfig) GetTlsKey

func (m *FabricConfig) GetTlsKey() string

func (*FabricConfig) Marshal

func (m *FabricConfig) Marshal() (dAtA []byte, err error)

func (*FabricConfig) MarshalTo

func (m *FabricConfig) MarshalTo(dAtA []byte) (int, error)

func (*FabricConfig) MarshalToSizedBuffer

func (m *FabricConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*FabricConfig) ProtoMessage

func (*FabricConfig) ProtoMessage()

func (*FabricConfig) Reset

func (m *FabricConfig) Reset()

func (*FabricConfig) Size

func (m *FabricConfig) Size() (n int)

func (*FabricConfig) String

func (m *FabricConfig) String() string

func (*FabricConfig) Unmarshal

func (m *FabricConfig) Unmarshal(dAtA []byte) error

func (*FabricConfig) XXX_DiscardUnknown

func (m *FabricConfig) XXX_DiscardUnknown()

func (*FabricConfig) XXX_Marshal

func (m *FabricConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FabricConfig) XXX_Merge

func (m *FabricConfig) XXX_Merge(src proto.Message)

func (*FabricConfig) XXX_Size

func (m *FabricConfig) XXX_Size() int

func (*FabricConfig) XXX_Unmarshal

func (m *FabricConfig) XXX_Unmarshal(b []byte) error

type GatewayInfo

type GatewayInfo struct {
	// 网关id,注册的时候不需要写,由中继网关生成,保证唯一性
	GatewayId string `protobuf:"bytes,1,opt,name=gateway_id,json=gatewayId,proto3" json:"gateway_id,omitempty"`
	// 网关名称,客户自定义,也可以没有,只是一个标记,没有实际意义
	GatewayName string `protobuf:"bytes,2,opt,name=gateway_name,json=gatewayName,proto3" json:"gateway_name,omitempty"`
	// 网关地址
	Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
	// 网关的servername
	ServerName string `protobuf:"bytes,4,opt,name=server_name,json=serverName,proto3" json:"server_name,omitempty"`
	// 网关tlsca证书
	Tlsca string `protobuf:"bytes,5,opt,name=tlsca,proto3" json:"tlsca,omitempty"`
	// 网关客户端证书
	ClientCert string `protobuf:"bytes,6,opt,name=client_cert,json=clientCert,proto3" json:"client_cert,omitempty"`
	// 允许向哪些网关发起跨链请求,空表示不作限制
	ToGatewayList []string `protobuf:"bytes,7,rep,name=to_gateway_list,json=toGatewayList,proto3" json:"to_gateway_list,omitempty"`
	// 允许哪些网关向它发起跨链请求,空表示不作限制
	FromGatewayList []string `protobuf:"bytes,8,rep,name=from_gateway_list,json=fromGatewayList,proto3" json:"from_gateway_list,omitempty"`
	// 交易验证类型
	TxVerifyType TxVerifyType `protobuf:"varint,9,opt,name=tx_verify_type,json=txVerifyType,proto3,enum=common.TxVerifyType" json:"tx_verify_type,omitempty"`
	// 交易验证接口,先支持restful
	TxVerifyInterface *TxVerifyInterface `protobuf:"bytes,10,opt,name=TxVerifyInterface,proto3" json:"TxVerifyInterface,omitempty"`
	// 调用类型
	CallType CallType `protobuf:"varint,11,opt,name=call_type,json=callType,proto3,enum=common.CallType" json:"call_type,omitempty"`
	// 该跨链网关在注册于哪个中继网关
	RelayChainId string `protobuf:"bytes,12,opt,name=relay_chain_id,json=relayChainId,proto3" json:"relay_chain_id,omitempty"`
}

网关信息

func (*GatewayInfo) Descriptor

func (*GatewayInfo) Descriptor() ([]byte, []int)

func (*GatewayInfo) GetAddress

func (m *GatewayInfo) GetAddress() string

func (*GatewayInfo) GetCallType

func (m *GatewayInfo) GetCallType() CallType

func (*GatewayInfo) GetClientCert

func (m *GatewayInfo) GetClientCert() string

func (*GatewayInfo) GetFromGatewayList

func (m *GatewayInfo) GetFromGatewayList() []string

func (*GatewayInfo) GetGatewayId

func (m *GatewayInfo) GetGatewayId() string

func (*GatewayInfo) GetGatewayName

func (m *GatewayInfo) GetGatewayName() string

func (*GatewayInfo) GetRelayChainId

func (m *GatewayInfo) GetRelayChainId() string

func (*GatewayInfo) GetServerName

func (m *GatewayInfo) GetServerName() string

func (*GatewayInfo) GetTlsca

func (m *GatewayInfo) GetTlsca() string

func (*GatewayInfo) GetToGatewayList

func (m *GatewayInfo) GetToGatewayList() []string

func (*GatewayInfo) GetTxVerifyInterface

func (m *GatewayInfo) GetTxVerifyInterface() *TxVerifyInterface

func (*GatewayInfo) GetTxVerifyType

func (m *GatewayInfo) GetTxVerifyType() TxVerifyType

func (*GatewayInfo) Marshal

func (m *GatewayInfo) Marshal() (dAtA []byte, err error)

func (*GatewayInfo) MarshalTo

func (m *GatewayInfo) MarshalTo(dAtA []byte) (int, error)

func (*GatewayInfo) MarshalToSizedBuffer

func (m *GatewayInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GatewayInfo) ProtoMessage

func (*GatewayInfo) ProtoMessage()

func (*GatewayInfo) Reset

func (m *GatewayInfo) Reset()

func (*GatewayInfo) Size

func (m *GatewayInfo) Size() (n int)

func (*GatewayInfo) String

func (m *GatewayInfo) String() string

func (*GatewayInfo) Unmarshal

func (m *GatewayInfo) Unmarshal(dAtA []byte) error

func (*GatewayInfo) XXX_DiscardUnknown

func (m *GatewayInfo) XXX_DiscardUnknown()

func (*GatewayInfo) XXX_Marshal

func (m *GatewayInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GatewayInfo) XXX_Merge

func (m *GatewayInfo) XXX_Merge(src proto.Message)

func (*GatewayInfo) XXX_Size

func (m *GatewayInfo) XXX_Size() int

func (*GatewayInfo) XXX_Unmarshal

func (m *GatewayInfo) XXX_Unmarshal(b []byte) error

type MapEventDataType

type MapEventDataType struct {
	// key
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// 数据类型
	DataType EventDataType `protobuf:"varint,2,opt,name=data_type,json=dataType,proto3,enum=common.EventDataType" json:"data_type,omitempty"`
}

map类型的事件类型

func (*MapEventDataType) Descriptor

func (*MapEventDataType) Descriptor() ([]byte, []int)

func (*MapEventDataType) GetDataType

func (m *MapEventDataType) GetDataType() EventDataType

func (*MapEventDataType) GetKey

func (m *MapEventDataType) GetKey() string

func (*MapEventDataType) Marshal

func (m *MapEventDataType) Marshal() (dAtA []byte, err error)

func (*MapEventDataType) MarshalTo

func (m *MapEventDataType) MarshalTo(dAtA []byte) (int, error)

func (*MapEventDataType) MarshalToSizedBuffer

func (m *MapEventDataType) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MapEventDataType) ProtoMessage

func (*MapEventDataType) ProtoMessage()

func (*MapEventDataType) Reset

func (m *MapEventDataType) Reset()

func (*MapEventDataType) Size

func (m *MapEventDataType) Size() (n int)

func (*MapEventDataType) String

func (m *MapEventDataType) String() string

func (*MapEventDataType) Unmarshal

func (m *MapEventDataType) Unmarshal(dAtA []byte) error

func (*MapEventDataType) XXX_DiscardUnknown

func (m *MapEventDataType) XXX_DiscardUnknown()

func (*MapEventDataType) XXX_Marshal

func (m *MapEventDataType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MapEventDataType) XXX_Merge

func (m *MapEventDataType) XXX_Merge(src proto.Message)

func (*MapEventDataType) XXX_Size

func (m *MapEventDataType) XXX_Size() int

func (*MapEventDataType) XXX_Unmarshal

func (m *MapEventDataType) XXX_Unmarshal(b []byte) error

type Node

type Node struct {
	// 节点地址
	NodeAddr string `protobuf:"bytes,1,opt,name=node_addr,json=nodeAddr,proto3" json:"node_addr,omitempty"`
	// 连接池大小
	ConnCnt int32 `protobuf:"varint,2,opt,name=conn_cnt,json=connCnt,proto3" json:"conn_cnt,omitempty"`
	// 是否开启tls
	EnableTls bool `protobuf:"varint,3,opt,name=enable_tls,json=enableTls,proto3" json:"enable_tls,omitempty"`
	// trust_root_paths
	TrustRoot []string `protobuf:"bytes,4,rep,name=trust_root,json=trustRoot,proto3" json:"trust_root,omitempty"`
	// tls_host_name
	TlsHostName string `protobuf:"bytes,5,opt,name=tls_host_name,json=tlsHostName,proto3" json:"tls_host_name,omitempty"`
}

chainmaker节点信息

func (*Node) Descriptor

func (*Node) Descriptor() ([]byte, []int)

func (*Node) GetConnCnt

func (m *Node) GetConnCnt() int32

func (*Node) GetEnableTls

func (m *Node) GetEnableTls() bool

func (*Node) GetNodeAddr

func (m *Node) GetNodeAddr() string

func (*Node) GetTlsHostName

func (m *Node) GetTlsHostName() string

func (*Node) GetTrustRoot

func (m *Node) GetTrustRoot() []string

func (*Node) Marshal

func (m *Node) Marshal() (dAtA []byte, err error)

func (*Node) MarshalTo

func (m *Node) MarshalTo(dAtA []byte) (int, error)

func (*Node) MarshalToSizedBuffer

func (m *Node) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) Reset

func (m *Node) Reset()

func (*Node) Size

func (m *Node) Size() (n int)

func (*Node) String

func (m *Node) String() string

func (*Node) Unmarshal

func (m *Node) Unmarshal(dAtA []byte) error

func (*Node) XXX_DiscardUnknown

func (m *Node) XXX_DiscardUnknown()

func (*Node) XXX_Marshal

func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Node) XXX_Merge

func (m *Node) XXX_Merge(src proto.Message)

func (*Node) XXX_Size

func (m *Node) XXX_Size() int

func (*Node) XXX_Unmarshal

func (m *Node) XXX_Unmarshal(b []byte) error

type Operate

type Operate int32

跨链事件管理操作

const (
	// 新建
	Operate_SAVE Operate = 0
	// 更新
	Operate_UPDATE Operate = 1
	// 删除
	Operate_DELETE Operate = 2
	// 获取
	Operate_GET Operate = 3
)

func (Operate) EnumDescriptor

func (Operate) EnumDescriptor() ([]byte, []int)

func (Operate) String

func (x Operate) String() string

type Orderer

type Orderer struct {
	// 节点地址
	NodeAddr string `protobuf:"bytes,1,opt,name=node_addr,json=nodeAddr,proto3" json:"node_addr,omitempty"`
	// trust_root_paths
	TrustRoot []string `protobuf:"bytes,2,rep,name=trust_root,json=trustRoot,proto3" json:"trust_root,omitempty"`
	// tls_host_name
	TlsHostName string `protobuf:"bytes,3,opt,name=tls_host_name,json=tlsHostName,proto3" json:"tls_host_name,omitempty"`
}

fabric orderer 节点信息

func (*Orderer) Descriptor

func (*Orderer) Descriptor() ([]byte, []int)

func (*Orderer) GetNodeAddr

func (m *Orderer) GetNodeAddr() string

func (*Orderer) GetTlsHostName

func (m *Orderer) GetTlsHostName() string

func (*Orderer) GetTrustRoot

func (m *Orderer) GetTrustRoot() []string

func (*Orderer) Marshal

func (m *Orderer) Marshal() (dAtA []byte, err error)

func (*Orderer) MarshalTo

func (m *Orderer) MarshalTo(dAtA []byte) (int, error)

func (*Orderer) MarshalToSizedBuffer

func (m *Orderer) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Orderer) ProtoMessage

func (*Orderer) ProtoMessage()

func (*Orderer) Reset

func (m *Orderer) Reset()

func (*Orderer) Size

func (m *Orderer) Size() (n int)

func (*Orderer) String

func (m *Orderer) String() string

func (*Orderer) Unmarshal

func (m *Orderer) Unmarshal(dAtA []byte) error

func (*Orderer) XXX_DiscardUnknown

func (m *Orderer) XXX_DiscardUnknown()

func (*Orderer) XXX_Marshal

func (m *Orderer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Orderer) XXX_Merge

func (m *Orderer) XXX_Merge(src proto.Message)

func (*Orderer) XXX_Size

func (m *Orderer) XXX_Size() int

func (*Orderer) XXX_Unmarshal

func (m *Orderer) XXX_Unmarshal(b []byte) error

type Org

type Org struct {
	// org id
	OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"`
	// mspId
	MspId string `protobuf:"bytes,2,opt,name=msp_id,json=mspId,proto3" json:"msp_id,omitempty"`
	// 签名证书
	SignCert string `protobuf:"bytes,3,opt,name=sign_cert,json=signCert,proto3" json:"sign_cert,omitempty"`
	// 签名私钥
	SignKey string `protobuf:"bytes,4,opt,name=sign_key,json=signKey,proto3" json:"sign_key,omitempty"`
	// peer节点
	Peers []*Peer `protobuf:"bytes,5,rep,name=peers,proto3" json:"peers,omitempty"`
}

fabric org 信息

func (*Org) Descriptor

func (*Org) Descriptor() ([]byte, []int)

func (*Org) GetMspId

func (m *Org) GetMspId() string

func (*Org) GetOrgId

func (m *Org) GetOrgId() string

func (*Org) GetPeers

func (m *Org) GetPeers() []*Peer

func (*Org) GetSignCert

func (m *Org) GetSignCert() string

func (*Org) GetSignKey

func (m *Org) GetSignKey() string

func (*Org) Marshal

func (m *Org) Marshal() (dAtA []byte, err error)

func (*Org) MarshalTo

func (m *Org) MarshalTo(dAtA []byte) (int, error)

func (*Org) MarshalToSizedBuffer

func (m *Org) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Org) ProtoMessage

func (*Org) ProtoMessage()

func (*Org) Reset

func (m *Org) Reset()

func (*Org) Size

func (m *Org) Size() (n int)

func (*Org) String

func (m *Org) String() string

func (*Org) Unmarshal

func (m *Org) Unmarshal(dAtA []byte) error

func (*Org) XXX_DiscardUnknown

func (m *Org) XXX_DiscardUnknown()

func (*Org) XXX_Marshal

func (m *Org) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Org) XXX_Merge

func (m *Org) XXX_Merge(src proto.Message)

func (*Org) XXX_Size

func (m *Org) XXX_Size() int

func (*Org) XXX_Unmarshal

func (m *Org) XXX_Unmarshal(b []byte) error

type PageInfo

type PageInfo struct {
	// 每页多少数据
	PageSize uint64 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// 第几页
	PageNumber uint64 `protobuf:"varint,2,opt,name=page_number,json=pageNumber,proto3" json:"page_number,omitempty"`
	// 总共有多少数据
	TotalCount uint64 `protobuf:"varint,3,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"`
	// 总共有多少页
	Limit uint64 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"`
}

分页信息

func (*PageInfo) Descriptor

func (*PageInfo) Descriptor() ([]byte, []int)

func (*PageInfo) GetLimit

func (m *PageInfo) GetLimit() uint64

func (*PageInfo) GetPageNumber

func (m *PageInfo) GetPageNumber() uint64

func (*PageInfo) GetPageSize

func (m *PageInfo) GetPageSize() uint64

func (*PageInfo) GetTotalCount

func (m *PageInfo) GetTotalCount() uint64

func (*PageInfo) Marshal

func (m *PageInfo) Marshal() (dAtA []byte, err error)

func (*PageInfo) MarshalTo

func (m *PageInfo) MarshalTo(dAtA []byte) (int, error)

func (*PageInfo) MarshalToSizedBuffer

func (m *PageInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PageInfo) ProtoMessage

func (*PageInfo) ProtoMessage()

func (*PageInfo) Reset

func (m *PageInfo) Reset()

func (*PageInfo) Size

func (m *PageInfo) Size() (n int)

func (*PageInfo) String

func (m *PageInfo) String() string

func (*PageInfo) Unmarshal

func (m *PageInfo) Unmarshal(dAtA []byte) error

func (*PageInfo) XXX_DiscardUnknown

func (m *PageInfo) XXX_DiscardUnknown()

func (*PageInfo) XXX_Marshal

func (m *PageInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PageInfo) XXX_Merge

func (m *PageInfo) XXX_Merge(src proto.Message)

func (*PageInfo) XXX_Size

func (m *PageInfo) XXX_Size() int

func (*PageInfo) XXX_Unmarshal

func (m *PageInfo) XXX_Unmarshal(b []byte) error

type Peer

type Peer struct {
	// 节点地址
	NodeAddr string `protobuf:"bytes,1,opt,name=node_addr,json=nodeAddr,proto3" json:"node_addr,omitempty"`
	// trust_root_paths
	TrustRoot []string `protobuf:"bytes,2,rep,name=trust_root,json=trustRoot,proto3" json:"trust_root,omitempty"`
	// tls_host_name
	TlsHostName string `protobuf:"bytes,3,opt,name=tls_host_name,json=tlsHostName,proto3" json:"tls_host_name,omitempty"`
}

fabric peer 节点信息

func (*Peer) Descriptor

func (*Peer) Descriptor() ([]byte, []int)

func (*Peer) GetNodeAddr

func (m *Peer) GetNodeAddr() string

func (*Peer) GetTlsHostName

func (m *Peer) GetTlsHostName() string

func (*Peer) GetTrustRoot

func (m *Peer) GetTrustRoot() []string

func (*Peer) Marshal

func (m *Peer) Marshal() (dAtA []byte, err error)

func (*Peer) MarshalTo

func (m *Peer) MarshalTo(dAtA []byte) (int, error)

func (*Peer) MarshalToSizedBuffer

func (m *Peer) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Peer) ProtoMessage

func (*Peer) ProtoMessage()

func (*Peer) Reset

func (m *Peer) Reset()

func (*Peer) Size

func (m *Peer) Size() (n int)

func (*Peer) String

func (m *Peer) String() string

func (*Peer) Unmarshal

func (m *Peer) Unmarshal(dAtA []byte) error

func (*Peer) XXX_DiscardUnknown

func (m *Peer) XXX_DiscardUnknown()

func (*Peer) XXX_Marshal

func (m *Peer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Peer) XXX_Merge

func (m *Peer) XXX_Merge(src proto.Message)

func (*Peer) XXX_Size

func (m *Peer) XXX_Size() int

func (*Peer) XXX_Unmarshal

func (m *Peer) XXX_Unmarshal(b []byte) error

type Pkcs11

type Pkcs11 struct {
	// 是否开启,现在一律关闭不做处理
	Enable bool `protobuf:"varint,1,opt,name=enable,proto3" json:"enable,omitempty"`
}

pkcs11 密码机相关

func (*Pkcs11) Descriptor

func (*Pkcs11) Descriptor() ([]byte, []int)

func (*Pkcs11) GetEnable

func (m *Pkcs11) GetEnable() bool

func (*Pkcs11) Marshal

func (m *Pkcs11) Marshal() (dAtA []byte, err error)

func (*Pkcs11) MarshalTo

func (m *Pkcs11) MarshalTo(dAtA []byte) (int, error)

func (*Pkcs11) MarshalToSizedBuffer

func (m *Pkcs11) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Pkcs11) ProtoMessage

func (*Pkcs11) ProtoMessage()

func (*Pkcs11) Reset

func (m *Pkcs11) Reset()

func (*Pkcs11) Size

func (m *Pkcs11) Size() (n int)

func (*Pkcs11) String

func (m *Pkcs11) String() string

func (*Pkcs11) Unmarshal

func (m *Pkcs11) Unmarshal(dAtA []byte) error

func (*Pkcs11) XXX_DiscardUnknown

func (m *Pkcs11) XXX_DiscardUnknown()

func (*Pkcs11) XXX_Marshal

func (m *Pkcs11) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Pkcs11) XXX_Merge

func (m *Pkcs11) XXX_Merge(src proto.Message)

func (*Pkcs11) XXX_Size

func (m *Pkcs11) XXX_Size() int

func (*Pkcs11) XXX_Unmarshal

func (m *Pkcs11) XXX_Unmarshal(b []byte) error

type TriggerCondition

type TriggerCondition int32

跨链触发方式

const (
	// 完全用户合约事件触发,用户需要将relaye_chain.BeginCrossChainRequest结构自行在合约中组装,通过pb序列化后base64编码用事件发送出来(包含跨链数据,不需要其他信息)
	// chainmaker为事件数组第一个,fabric为数组payload,bcos为事件第一个参数
	TriggerCondition_COMPLETELY_CONTRACT_EVENT TriggerCondition = 0
	// 用户合约事件触发(不包含跨链数据,需要跨链触发器提供其他信息)
	TriggerCondition_CONTRACT_EVENT TriggerCondition = 1
	// TBIS协议合约适配
	TriggerCondition_TBIS_CONTRACT TriggerCondition = 2
)

func (TriggerCondition) EnumDescriptor

func (TriggerCondition) EnumDescriptor() ([]byte, []int)

func (TriggerCondition) String

func (x TriggerCondition) String() string

type TryResult

type TryResult int32
const (
	// try reult,该字段的名称在参数字段中为目标链的返回值占位
	TryResult_TRY_RESULT TryResult = 0
)

func (TryResult) EnumDescriptor

func (TryResult) EnumDescriptor() ([]byte, []int)

func (TryResult) String

func (x TryResult) String() string

type TxContent

type TxContent struct {
	// 交易id
	TxId string `protobuf:"bytes,1,opt,name=tx_id,json=txId,proto3" json:"tx_id,omitempty"`
	// 交易实际内容,json字符串
	Tx []byte `protobuf:"bytes,2,opt,name=tx,proto3" json:"tx,omitempty"`
	// 交易执行结果
	TxResult TxResultValue `protobuf:"varint,3,opt,name=tx_result,json=txResult,proto3,enum=common.TxResultValue" json:"tx_result,omitempty"`
	// 执行该交易的网关Id
	GatewayId string `protobuf:"bytes,4,opt,name=gateway_id,json=gatewayId,proto3" json:"gateway_id,omitempty"`
	// 执行该交易的链资源Id
	ChainRid string `protobuf:"bytes,5,opt,name=chain_rid,json=chainRid,proto3" json:"chain_rid,omitempty"`
	// json字符串,这里是验证的参数,不管什么认证方式都会直接传给spv或者认证接口
	TxProve string `protobuf:"bytes,6,opt,name=tx_prove,json=txProve,proto3" json:"tx_prove,omitempty"`
	// 在哪个块中
	BlockHeight int64 `protobuf:"varint,7,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
}

交易内容

func (*TxContent) Descriptor

func (*TxContent) Descriptor() ([]byte, []int)

func (*TxContent) GetBlockHeight

func (m *TxContent) GetBlockHeight() int64

func (*TxContent) GetChainRid

func (m *TxContent) GetChainRid() string

func (*TxContent) GetGatewayId

func (m *TxContent) GetGatewayId() string

func (*TxContent) GetTx

func (m *TxContent) GetTx() []byte

func (*TxContent) GetTxId

func (m *TxContent) GetTxId() string

func (*TxContent) GetTxProve

func (m *TxContent) GetTxProve() string

func (*TxContent) GetTxResult

func (m *TxContent) GetTxResult() TxResultValue

func (*TxContent) Marshal

func (m *TxContent) Marshal() (dAtA []byte, err error)

func (*TxContent) MarshalTo

func (m *TxContent) MarshalTo(dAtA []byte) (int, error)

func (*TxContent) MarshalToSizedBuffer

func (m *TxContent) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TxContent) ProtoMessage

func (*TxContent) ProtoMessage()

func (*TxContent) Reset

func (m *TxContent) Reset()

func (*TxContent) Size

func (m *TxContent) Size() (n int)

func (*TxContent) String

func (m *TxContent) String() string

func (*TxContent) Unmarshal

func (m *TxContent) Unmarshal(dAtA []byte) error

func (*TxContent) XXX_DiscardUnknown

func (m *TxContent) XXX_DiscardUnknown()

func (*TxContent) XXX_Marshal

func (m *TxContent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TxContent) XXX_Merge

func (m *TxContent) XXX_Merge(src proto.Message)

func (*TxContent) XXX_Size

func (m *TxContent) XXX_Size() int

func (*TxContent) XXX_Unmarshal

func (m *TxContent) XXX_Unmarshal(b []byte) error

type TxContentWithVerify

type TxContentWithVerify struct {
	// 交易的具体结果和内容
	TxContent *TxContent `protobuf:"bytes,1,opt,name=tx_content,json=txContent,proto3" json:"tx_content,omitempty"`
	// try result
	TryResult []string `protobuf:"bytes,2,rep,name=try_result,json=tryResult,proto3" json:"try_result,omitempty"`
	// 中继网关对交易的认证结果
	TxVerifyResult TxVerifyRsult `` /* 132-byte string literal not displayed */
}

交易内容,包括验证结果

func (*TxContentWithVerify) Descriptor

func (*TxContentWithVerify) Descriptor() ([]byte, []int)

func (*TxContentWithVerify) GetTryResult

func (m *TxContentWithVerify) GetTryResult() []string

func (*TxContentWithVerify) GetTxContent

func (m *TxContentWithVerify) GetTxContent() *TxContent

func (*TxContentWithVerify) GetTxVerifyResult

func (m *TxContentWithVerify) GetTxVerifyResult() TxVerifyRsult

func (*TxContentWithVerify) Marshal

func (m *TxContentWithVerify) Marshal() (dAtA []byte, err error)

func (*TxContentWithVerify) MarshalTo

func (m *TxContentWithVerify) MarshalTo(dAtA []byte) (int, error)

func (*TxContentWithVerify) MarshalToSizedBuffer

func (m *TxContentWithVerify) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TxContentWithVerify) ProtoMessage

func (*TxContentWithVerify) ProtoMessage()

func (*TxContentWithVerify) Reset

func (m *TxContentWithVerify) Reset()

func (*TxContentWithVerify) Size

func (m *TxContentWithVerify) Size() (n int)

func (*TxContentWithVerify) String

func (m *TxContentWithVerify) String() string

func (*TxContentWithVerify) Unmarshal

func (m *TxContentWithVerify) Unmarshal(dAtA []byte) error

func (*TxContentWithVerify) XXX_DiscardUnknown

func (m *TxContentWithVerify) XXX_DiscardUnknown()

func (*TxContentWithVerify) XXX_Marshal

func (m *TxContentWithVerify) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TxContentWithVerify) XXX_Merge

func (m *TxContentWithVerify) XXX_Merge(src proto.Message)

func (*TxContentWithVerify) XXX_Size

func (m *TxContentWithVerify) XXX_Size() int

func (*TxContentWithVerify) XXX_Unmarshal

func (m *TxContentWithVerify) XXX_Unmarshal(b []byte) error

type TxResultValue

type TxResultValue int32

tx执行结果

const (
	// 交易执行成功
	TxResultValue_TX_SUCCESS TxResultValue = 0
	// 交易超时
	TxResultValue_TX_TIMEOUT TxResultValue = 1
	// 交易失败
	TxResultValue_TX_FAIL TxResultValue = 2
	// 交易不存在
	TxResultValue_TX_NOT_EXIST TxResultValue = 3
	// 交易权限不足
	TxResultValue_TX_NO_PERMISSIONS TxResultValue = 4
	// 网关不存在
	TxResultValue_GATEWAY_NOT_FOUND TxResultValue = 5
	// 目标网关验活错误
	TxResultValue_GATEWAY_PINGPONG_ERROR TxResultValue = 6
	// 目标链验活错误
	TxResultValue_CHAIN_PING_ERROR TxResultValue = 7
	// 源网关获取失败
	TxResultValue_SRC_GATEWAY_GET_ERROR TxResultValue = 8
)

func (TxResultValue) EnumDescriptor

func (TxResultValue) EnumDescriptor() ([]byte, []int)

func (TxResultValue) String

func (x TxResultValue) String() string

type TxVerifyInterface

type TxVerifyInterface struct {
	// address,如,不需要写http或者https,127.0.0.1:8080/txverify
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// 是否开启tls
	TlsEnable bool `protobuf:"varint,2,opt,name=tls_enable,json=tlsEnable,proto3" json:"tls_enable,omitempty"`
	// 交易验证接口tlsca证书
	Tlsca string `protobuf:"bytes,3,opt,name=tlsca,proto3" json:"tlsca,omitempty"`
	// 交易验证接口客户端证书
	ClientCert string `protobuf:"bytes,4,opt,name=client_cert,json=clientCert,proto3" json:"client_cert,omitempty"`
	// 服务名
	HostName string `protobuf:"bytes,5,opt,name=host_name,json=hostName,proto3" json:"host_name,omitempty"`
}

交易验证接口,先支持restful

func (*TxVerifyInterface) Descriptor

func (*TxVerifyInterface) Descriptor() ([]byte, []int)

func (*TxVerifyInterface) GetAddress

func (m *TxVerifyInterface) GetAddress() string

func (*TxVerifyInterface) GetClientCert

func (m *TxVerifyInterface) GetClientCert() string

func (*TxVerifyInterface) GetHostName

func (m *TxVerifyInterface) GetHostName() string

func (*TxVerifyInterface) GetTlsEnable

func (m *TxVerifyInterface) GetTlsEnable() bool

func (*TxVerifyInterface) GetTlsca

func (m *TxVerifyInterface) GetTlsca() string

func (*TxVerifyInterface) Marshal

func (m *TxVerifyInterface) Marshal() (dAtA []byte, err error)

func (*TxVerifyInterface) MarshalTo

func (m *TxVerifyInterface) MarshalTo(dAtA []byte) (int, error)

func (*TxVerifyInterface) MarshalToSizedBuffer

func (m *TxVerifyInterface) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TxVerifyInterface) ProtoMessage

func (*TxVerifyInterface) ProtoMessage()

func (*TxVerifyInterface) Reset

func (m *TxVerifyInterface) Reset()

func (*TxVerifyInterface) Size

func (m *TxVerifyInterface) Size() (n int)

func (*TxVerifyInterface) String

func (m *TxVerifyInterface) String() string

func (*TxVerifyInterface) Unmarshal

func (m *TxVerifyInterface) Unmarshal(dAtA []byte) error

func (*TxVerifyInterface) XXX_DiscardUnknown

func (m *TxVerifyInterface) XXX_DiscardUnknown()

func (*TxVerifyInterface) XXX_Marshal

func (m *TxVerifyInterface) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TxVerifyInterface) XXX_Merge

func (m *TxVerifyInterface) XXX_Merge(src proto.Message)

func (*TxVerifyInterface) XXX_Size

func (m *TxVerifyInterface) XXX_Size() int

func (*TxVerifyInterface) XXX_Unmarshal

func (m *TxVerifyInterface) XXX_Unmarshal(b []byte) error

type TxVerifyRsult

type TxVerifyRsult int32

中继网关对交易的认证结果

const (
	// 认证成功
	TxVerifyRsult_VERIFY_SUCCESS TxVerifyRsult = 0
	// 认证失败
	TxVerifyRsult_VERIFY_INVALID TxVerifyRsult = 1
	// 不需要认证
	TxVerifyRsult_VERIFY_NOT_NEED TxVerifyRsult = 2
)

func (TxVerifyRsult) EnumDescriptor

func (TxVerifyRsult) EnumDescriptor() ([]byte, []int)

func (TxVerifyRsult) String

func (x TxVerifyRsult) String() string

type TxVerifyType

type TxVerifyType int32
const (
	// spv方式认证
	TxVerifyType_SPV TxVerifyType = 0
	// rpc接口认证
	TxVerifyType_RPC_INTERFACE TxVerifyType = 1
	// 不需要认证
	TxVerifyType_NOT_NEED TxVerifyType = 2
)

func (TxVerifyType) EnumDescriptor

func (TxVerifyType) EnumDescriptor() ([]byte, []int)

func (TxVerifyType) String

func (x TxVerifyType) String() string

type Version

type Version int32

版本号

const (
	// v1.0.0
	Version_V1_0_0 Version = 0
)

func (Version) EnumDescriptor

func (Version) EnumDescriptor() ([]byte, []int)

func (Version) String

func (x Version) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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