protos

package
v0.0.0-...-667e438 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2019 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventName_TxError = "_TXERROR"
	TxCode_Success    = 0
	TxCode_Error      = 1
)

Variables

View Source
var BuildResult_StatusCode_name = map[int32]string{
	0: "UNDEFINED",
	1: "SUCCESS",
	2: "FAILURE",
}
View Source
var BuildResult_StatusCode_value = map[string]int32{
	"UNDEFINED": 0,
	"SUCCESS":   1,
	"FAILURE":   2,
}
View Source
var ChaincodeDeploymentSpec_ExecutionEnvironment_name = map[int32]string{
	0: "DOCKER",
	1: "SYSTEM",
}
View Source
var ChaincodeDeploymentSpec_ExecutionEnvironment_value = map[string]int32{
	"DOCKER": 0,
	"SYSTEM": 1,
}
View Source
var ChaincodeMessage_Type_name = map[int32]string{
	0:  "UNDEFINED",
	1:  "REGISTER",
	2:  "REGISTERED",
	3:  "INIT",
	4:  "READY",
	5:  "TRANSACTION",
	6:  "COMPLETED",
	7:  "ERROR",
	8:  "GET_STATE",
	9:  "PUT_STATE",
	10: "DEL_STATE",
	11: "INVOKE_CHAINCODE",
	12: "INVOKE_QUERY",
	13: "RESPONSE",
	14: "QUERY",
	15: "QUERY_COMPLETED",
	16: "QUERY_ERROR",
	17: "RANGE_QUERY_STATE",
	18: "RANGE_QUERY_STATE_NEXT",
	19: "RANGE_QUERY_STATE_CLOSE",
	20: "KEEPALIVE",
	21: "REGISTER2",
}
View Source
var ChaincodeMessage_Type_value = map[string]int32{
	"UNDEFINED":               0,
	"REGISTER":                1,
	"REGISTERED":              2,
	"INIT":                    3,
	"READY":                   4,
	"TRANSACTION":             5,
	"COMPLETED":               6,
	"ERROR":                   7,
	"GET_STATE":               8,
	"PUT_STATE":               9,
	"DEL_STATE":               10,
	"INVOKE_CHAINCODE":        11,
	"INVOKE_QUERY":            12,
	"RESPONSE":                13,
	"QUERY":                   14,
	"QUERY_COMPLETED":         15,
	"QUERY_ERROR":             16,
	"RANGE_QUERY_STATE":       17,
	"RANGE_QUERY_STATE_NEXT":  18,
	"RANGE_QUERY_STATE_CLOSE": 19,
	"KEEPALIVE":               20,
	"REGISTER2":               21,
}
View Source
var ChaincodeSpec_Type_name = map[int32]string{
	0: "UNDEFINED",
	1: "GOLANG",
	2: "NODE",
	3: "CAR",
	4: "JAVA",
}
View Source
var ChaincodeSpec_Type_value = map[string]int32{
	"UNDEFINED": 0,
	"GOLANG":    1,
	"NODE":      2,
	"CAR":       3,
	"JAVA":      4,
}
View Source
var ConfidentialityLevel_name = map[int32]string{
	0: "PUBLIC",
	1: "CONFIDENTIAL",
}
View Source
var ConfidentialityLevel_value = map[string]int32{
	"PUBLIC":       0,
	"CONFIDENTIAL": 1,
}

default handler provided a base routine for picking a tx into execution enviroment again (e.g. when we need execute a tx read from the txdb)

View Source
var EventType_name = map[int32]string{
	0: "REGISTER",
	1: "BLOCK",
	2: "CHAINCODE",
	3: "REJECTION",
}
View Source
var EventType_value = map[string]int32{
	"REGISTER":  0,
	"BLOCK":     1,
	"CHAINCODE": 2,
	"REJECTION": 3,
}
View Source
var Message_Type_name = map[int32]string{
	0:  "UNDEFINED",
	1:  "DISC_HELLO",
	2:  "DISC_DISCONNECT",
	3:  "DISC_GET_PEERS",
	4:  "DISC_PEERS",
	5:  "DISC_GET_CRED",
	6:  "CHAIN_TRANSACTION",
	11: "SYNC_GET_BLOCKS",
	12: "SYNC_BLOCKS",
	13: "SYNC_BLOCK_ADDED",
	14: "SYNC_STATE_GET_SNAPSHOT",
	15: "SYNC_STATE_SNAPSHOT",
	16: "SYNC_STATE_GET_DELTAS",
	17: "SYNC_STATE_DELTAS",
	20: "RESPONSE",
	21: "CONSENSUS",
}
View Source
var Message_Type_value = map[string]int32{
	"UNDEFINED":               0,
	"DISC_HELLO":              1,
	"DISC_DISCONNECT":         2,
	"DISC_GET_PEERS":          3,
	"DISC_PEERS":              4,
	"DISC_GET_CRED":           5,
	"CHAIN_TRANSACTION":       6,
	"SYNC_GET_BLOCKS":         11,
	"SYNC_BLOCKS":             12,
	"SYNC_BLOCK_ADDED":        13,
	"SYNC_STATE_GET_SNAPSHOT": 14,
	"SYNC_STATE_SNAPSHOT":     15,
	"SYNC_STATE_GET_DELTAS":   16,
	"SYNC_STATE_DELTAS":       17,
	"RESPONSE":                20,
	"CONSENSUS":               21,
}
View Source
var NilValidator = TxFuncAsTxPreHandler(func(tx *Transaction) (*Transaction, error) { return tx, nil })
View Source
var PeerEndpoint_Type_name = map[int32]string{
	0: "UNDEFINED",
	1: "VALIDATOR",
	2: "NON_VALIDATOR",
}
View Source
var PeerEndpoint_Type_value = map[string]int32{
	"UNDEFINED":     0,
	"VALIDATOR":     1,
	"NON_VALIDATOR": 2,
}
View Source
var PlainTxHandler = FuncAsTxPreHandler(mustParsePlainTx)
View Source
var Response_StatusCode_name = map[int32]string{
	0:   "UNDEFINED",
	200: "SUCCESS",
	500: "FAILURE",
}
View Source
var Response_StatusCode_value = map[string]int32{
	"UNDEFINED": 0,
	"SUCCESS":   200,
	"FAILURE":   500,
}
View Source
var ServerStatus_StatusCode_name = map[int32]string{
	0: "UNDEFINED",
	1: "STARTED",
	2: "STOPPED",
	3: "PAUSED",
	4: "ERROR",
	5: "UNKNOWN",
}
View Source
var ServerStatus_StatusCode_value = map[string]int32{
	"UNDEFINED": 0,
	"STARTED":   1,
	"STOPPED":   2,
	"PAUSED":    3,
	"ERROR":     4,
	"UNKNOWN":   5,
}
View Source
var SyncMsg_Type_name = map[int32]string{
	0:  "UNDEFINED",
	1:  "CLIENT_SIMPLE",
	2:  "CLIENT_SESSION_OPEN",
	3:  "CLIENT_SESSION",
	4:  "CLIENT_SESSION_ACK",
	5:  "CLIENT_SESSION_CLOSE",
	9:  "SERVER_ERROR",
	10: "SERVER_SIMPLE",
	11: "SERVER_SESSION_ACCEPT",
	12: "SERVER_SESSION",
	13: "SERVER_SESSION_ERROR",
}
View Source
var SyncMsg_Type_value = map[string]int32{
	"UNDEFINED":             0,
	"CLIENT_SIMPLE":         1,
	"CLIENT_SESSION_OPEN":   2,
	"CLIENT_SESSION":        3,
	"CLIENT_SESSION_ACK":    4,
	"CLIENT_SESSION_CLOSE":  5,
	"SERVER_ERROR":          9,
	"SERVER_SIMPLE":         10,
	"SERVER_SESSION_ACCEPT": 11,
	"SERVER_SESSION":        12,
	"SERVER_SESSION_ERROR":  13,
}
View Source
var Transaction_Type_name = map[int32]string{
	0: "UNDEFINED",
	1: "CHAINCODE_DEPLOY",
	2: "CHAINCODE_INVOKE",
	3: "CHAINCODE_QUERY",
	4: "CHAINCODE_TERMINATE",
}
View Source
var Transaction_Type_value = map[string]int32{
	"UNDEFINED":           0,
	"CHAINCODE_DEPLOY":    1,
	"CHAINCODE_INVOKE":    2,
	"CHAINCODE_QUERY":     3,
	"CHAINCODE_TERMINATE": 4,
}
View Source
var ValidateInterrupt = interruptErr{}

allowing interrupt among a prehandler array and set the whold result as correct

View Source
var YFCCNameHandler = FuncAsTxPreHandler(parseChaincodeName)

name handler should be the very first one before any working handling (Except simple tagging) start, so handling specfied by ccname can work

Functions

func ConvertToTimestamp

func ConvertToTimestamp(t time.Time) *timestamp.Timestamp

func CreateUtcTimestamp

func CreateUtcTimestamp() *timestamp.Timestamp

func DefaultBlockVer

func DefaultBlockVer() uint32

func DefaultTxNormalizedFunc

func DefaultTxNormalizedFunc() func(*Transaction) string

func GetUnixTime

func GetUnixTime(ts *timestamp.Timestamp) time.Time

func HandleDummyBiComm

func HandleDummyBiComm(ctx context.Context, h1 *StreamHandler, h2 *StreamHandler) error

func HandleDummyBiComm2

func HandleDummyBiComm2(ctx context.Context, h1 *StreamHandler, h2 *StreamHandler, copyHelper func(proto.Message) proto.Message) error

integrate the bi-direction comm into one func, but may lead to unexpected dead lock

func HandleDummyComm

func HandleDummyComm(ctx context.Context, hfrom *StreamHandler, hto *StreamHandler) error

func HandleDummyWrite

func HandleDummyWrite(ctx context.Context, h *StreamHandler) error

func MustGetUUID

func MustGetUUID() (uuid [16]byte)

func ParseYFCCName

func ParseYFCCName(ccfullName string) (ccName, templateName string, ledgerName []string)

parse the chaincode name in YA-fabric 0.9's standard form: [templateName:]ccName[@LedgerName]

func RegisterAdminServer

func RegisterAdminServer(s *grpc.Server, srv AdminServer)

func RegisterChaincodeSupportServer

func RegisterChaincodeSupportServer(s *grpc.Server, srv ChaincodeSupportServer)

func RegisterDevopsServer

func RegisterDevopsServer(s *grpc.Server, srv DevopsServer)

func RegisterEventsServer

func RegisterEventsServer(s *grpc.Server, srv EventsServer)

func RegisterGossipServer

func RegisterGossipServer(s *grpc.Server, srv GossipServer)

func RegisterOpenchainServer

func RegisterOpenchainServer(s *grpc.Server, srv OpenchainServer)

func RegisterPeerServer

func RegisterPeerServer(s *grpc.Server, srv PeerServer)

func RegisterSyncServer

func RegisterSyncServer(s *grpc.Server, srv SyncServer)

func SetDefaultBlockVer

func SetDefaultBlockVer(v uint32)

func TxidFromDigest

func TxidFromDigest(digest []byte) string

Types

type AcceptSession

type AcceptSession struct {
	States   *LedgerState    `protobuf:"bytes,1,opt,name=states,proto3" json:"states,omitempty"`
	Transfer *TransferDetail `protobuf:"bytes,2,opt,name=transfer,proto3" json:"transfer,omitempty"`
	// Types that are valid to be assigned to Detail:
	//	*AcceptSession_State
	Detail               isAcceptSession_Detail `protobuf_oneof:"detail"`
	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
	XXX_unrecognized     []byte                 `json:"-"`
	XXX_sizecache        int32                  `json:"-"`
}

reponse for the opensession message, more detail may be provided so client can prepare a better plan in transferring

func (*AcceptSession) Descriptor

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

func (*AcceptSession) GetDetail

func (m *AcceptSession) GetDetail() isAcceptSession_Detail

func (*AcceptSession) GetState

func (*AcceptSession) GetStates

func (m *AcceptSession) GetStates() *LedgerState

func (*AcceptSession) GetTransfer

func (m *AcceptSession) GetTransfer() *TransferDetail

func (*AcceptSession) ProtoMessage

func (*AcceptSession) ProtoMessage()

func (*AcceptSession) Reset

func (m *AcceptSession) Reset()

func (*AcceptSession) String

func (m *AcceptSession) String() string

func (*AcceptSession) XXX_DiscardUnknown

func (m *AcceptSession) XXX_DiscardUnknown()

func (*AcceptSession) XXX_Marshal

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

func (*AcceptSession) XXX_Merge

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

func (*AcceptSession) XXX_OneofFuncs

func (*AcceptSession) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*AcceptSession) XXX_Size

func (m *AcceptSession) XXX_Size() int

func (*AcceptSession) XXX_Unmarshal

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

type AcceptSession_State

type AcceptSession_State struct {
	State *AcceptSession_StateStatus `protobuf:"bytes,4,opt,name=state,proto3,oneof"`
}

type AcceptSession_StateStatus

type AcceptSession_StateStatus struct {
	EstimatedSize        uint64   `protobuf:"varint,1,opt,name=estimatedSize,proto3" json:"estimatedSize,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AcceptSession_StateStatus) Descriptor

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

func (*AcceptSession_StateStatus) GetEstimatedSize

func (m *AcceptSession_StateStatus) GetEstimatedSize() uint64

func (*AcceptSession_StateStatus) ProtoMessage

func (*AcceptSession_StateStatus) ProtoMessage()

func (*AcceptSession_StateStatus) Reset

func (m *AcceptSession_StateStatus) Reset()

func (*AcceptSession_StateStatus) String

func (m *AcceptSession_StateStatus) String() string

func (*AcceptSession_StateStatus) XXX_DiscardUnknown

func (m *AcceptSession_StateStatus) XXX_DiscardUnknown()

func (*AcceptSession_StateStatus) XXX_Marshal

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

func (*AcceptSession_StateStatus) XXX_Merge

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

func (*AcceptSession_StateStatus) XXX_Size

func (m *AcceptSession_StateStatus) XXX_Size() int

func (*AcceptSession_StateStatus) XXX_Unmarshal

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

type AdminClient

type AdminClient interface {
	// Return the serve status.
	GetStatus(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ServerStatus, error)
	StartServer(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ServerStatus, error)
	StopServer(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ServerStatus, error)
}

AdminClient is the client API for Admin service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewAdminClient

func NewAdminClient(cc *grpc.ClientConn) AdminClient

type AdminServer

type AdminServer interface {
	// Return the serve status.
	GetStatus(context.Context, *empty.Empty) (*ServerStatus, error)
	StartServer(context.Context, *empty.Empty) (*ServerStatus, error)
	StopServer(context.Context, *empty.Empty) (*ServerStatus, error)
}

AdminServer is the server API for Admin service.

type Block

type Block struct {
	Version              uint32               `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	Timestamp            *timestamp.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Transactions         []*Transaction       `protobuf:"bytes,3,rep,name=transactions,proto3" json:"transactions,omitempty"`
	StateHash            []byte               `protobuf:"bytes,4,opt,name=stateHash,proto3" json:"stateHash,omitempty"`
	PreviousBlockHash    []byte               `protobuf:"bytes,5,opt,name=previousBlockHash,proto3" json:"previousBlockHash,omitempty"`
	ConsensusMetadata    []byte               `protobuf:"bytes,6,opt,name=consensusMetadata,proto3" json:"consensusMetadata,omitempty"`
	NonHashData          *NonHashData         `protobuf:"bytes,7,opt,name=nonHashData,proto3" json:"nonHashData,omitempty"`
	Txids                []string             `protobuf:"bytes,8,rep,name=txids,proto3" json:"txids,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

Block carries The data that describes a block in the blockchain. version - Version used to track any protocol changes. timestamp - The time at which the block or transaction order was proposed. This may not be used by all consensus modules. transactions - The ordered list of transactions in the block. stateHash - The state hash after running transactions in this block. previousBlockHash - The hash of the previous block in the chain. consensusMetadata - Consensus modules may optionally store any additional metadata in this field. nonHashData - Data stored with the block, but not included in the blocks hash. This allows this data to be different per peer or discarded without impacting the blockchain.

func NewBlock

func NewBlock(transactions []*Transaction, metadata []byte) *Block

NewBlock creates a new Block given the input parameters.

func NewBlockV

func NewBlockV(ver uint32, transactions []*Transaction, metadata []byte) *Block

NewBlock creates a new Block given the input parameters.

func UnmarshallBlock

func UnmarshallBlock(blockBytes []byte) (*Block, error)

UnmarshallBlock converts a byte array generated by Bytes() back to a block.

func (*Block) CloneBlock

func (block *Block) CloneBlock() (*Block, error)

func (*Block) Descriptor

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

func (*Block) FullBytes

func (block *Block) FullBytes() ([]byte, error)

include all bytes (embedded transactions)

func (*Block) GetBlockBytes

func (block *Block) GetBlockBytes() ([]byte, error)

Bytes returns this block as an array of bytes.

func (*Block) GetConsensusMetadata

func (m *Block) GetConsensusMetadata() []byte

func (*Block) GetHash

func (block *Block) GetHash() ([]byte, error)

GetHash returns the hash of this block.

func (*Block) GetNonHashData

func (m *Block) GetNonHashData() *NonHashData

func (*Block) GetPreviousBlockHash

func (m *Block) GetPreviousBlockHash() []byte

func (*Block) GetPruneDeployment

func (block *Block) GetPruneDeployment() *Block

Remove payload from deploy transactions. This is done to make block events more lightweight as the payload for these types of transactions can be very large.

func (*Block) GetStateHash

func (m *Block) GetStateHash() []byte

func (*Block) GetTimestamp

func (m *Block) GetTimestamp() *timestamp.Timestamp

func (*Block) GetTransactions

func (m *Block) GetTransactions() []*Transaction

func (*Block) GetTxids

func (m *Block) GetTxids() []string

func (*Block) GetVersion

func (m *Block) GetVersion() uint32

func (*Block) Normalize

func (block *Block) Normalize()

build all tx

func (*Block) NormalizeByCustom

func (block *Block) NormalizeByCustom(nf func(*Transaction) string)

func (*Block) ProtoMessage

func (*Block) ProtoMessage()

func (*Block) Prune

func (block *Block) Prune()

clean unnecessary data (txid) for a better transfer format

func (*Block) Reset

func (m *Block) Reset()

func (*Block) SetPreviousBlockHash

func (block *Block) SetPreviousBlockHash(previousBlockHash []byte)

SetPreviousBlockHash sets the hash of the previous block. This will be called by blockchain.AddBlock when then the block is added.

func (*Block) String

func (m *Block) String() string

func (*Block) Verify

func (block *Block) Verify(expectedhash []byte) error

func (*Block) VerifyRaw

func (block *Block) VerifyRaw(expectedhash []byte) error

func (*Block) XXX_DiscardUnknown

func (m *Block) XXX_DiscardUnknown()

func (*Block) XXX_Marshal

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

func (*Block) XXX_Merge

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

func (*Block) XXX_Size

func (m *Block) XXX_Size() int

func (*Block) XXX_Unmarshal

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

type BlockCount

type BlockCount struct {
	Count                uint64   `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Specifies the current number of blocks in the blockchain.

func (*BlockCount) Descriptor

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

func (*BlockCount) GetCount

func (m *BlockCount) GetCount() uint64

func (*BlockCount) ProtoMessage

func (*BlockCount) ProtoMessage()

func (*BlockCount) Reset

func (m *BlockCount) Reset()

func (*BlockCount) String

func (m *BlockCount) String() string

func (*BlockCount) XXX_DiscardUnknown

func (m *BlockCount) XXX_DiscardUnknown()

func (*BlockCount) XXX_Marshal

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

func (*BlockCount) XXX_Merge

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

func (*BlockCount) XXX_Size

func (m *BlockCount) XXX_Size() int

func (*BlockCount) XXX_Unmarshal

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

type BlockNumber

type BlockNumber struct {
	Number               uint64   `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Specifies the block number to be returned from the blockchain.

func (*BlockNumber) Descriptor

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

func (*BlockNumber) GetNumber

func (m *BlockNumber) GetNumber() uint64

func (*BlockNumber) ProtoMessage

func (*BlockNumber) ProtoMessage()

func (*BlockNumber) Reset

func (m *BlockNumber) Reset()

func (*BlockNumber) String

func (m *BlockNumber) String() string

func (*BlockNumber) XXX_DiscardUnknown

func (m *BlockNumber) XXX_DiscardUnknown()

func (*BlockNumber) XXX_Marshal

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

func (*BlockNumber) XXX_Merge

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

func (*BlockNumber) XXX_Size

func (m *BlockNumber) XXX_Size() int

func (*BlockNumber) XXX_Unmarshal

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

type BlockOffset

type BlockOffset struct {
	StartNum             uint64   `protobuf:"varint,1,opt,name=startNum,proto3" json:"startNum,omitempty"`
	EndNum               uint64   `protobuf:"varint,2,opt,name=endNum,proto3" json:"endNum,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*BlockOffset) Descriptor

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

func (*BlockOffset) GetEndNum

func (m *BlockOffset) GetEndNum() uint64

func (*BlockOffset) GetStartNum

func (m *BlockOffset) GetStartNum() uint64

func (*BlockOffset) ProtoMessage

func (*BlockOffset) ProtoMessage()

func (*BlockOffset) Reset

func (m *BlockOffset) Reset()

func (*BlockOffset) String

func (m *BlockOffset) String() string

func (*BlockOffset) XXX_DiscardUnknown

func (m *BlockOffset) XXX_DiscardUnknown()

func (*BlockOffset) XXX_Marshal

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

func (*BlockOffset) XXX_Merge

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

func (*BlockOffset) XXX_Size

func (m *BlockOffset) XXX_Size() int

func (*BlockOffset) XXX_Unmarshal

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

type BlockchainInfo

type BlockchainInfo struct {
	Height               uint64   `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
	CurrentBlockHash     []byte   `protobuf:"bytes,2,opt,name=currentBlockHash,proto3" json:"currentBlockHash,omitempty"`
	PreviousBlockHash    []byte   `protobuf:"bytes,3,opt,name=previousBlockHash,proto3" json:"previousBlockHash,omitempty"`
	CurrentStateHash     []byte   `protobuf:"bytes,4,opt,name=currentStateHash,proto3" json:"currentStateHash,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Contains information about the blockchain ledger such as height, current block hash, and previous block hash.

func (*BlockchainInfo) Descriptor

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

func (*BlockchainInfo) GetCurrentBlockHash

func (m *BlockchainInfo) GetCurrentBlockHash() []byte

func (*BlockchainInfo) GetCurrentStateHash

func (m *BlockchainInfo) GetCurrentStateHash() []byte

func (*BlockchainInfo) GetHeight

func (m *BlockchainInfo) GetHeight() uint64

func (*BlockchainInfo) GetPreviousBlockHash

func (m *BlockchainInfo) GetPreviousBlockHash() []byte

func (*BlockchainInfo) ProtoMessage

func (*BlockchainInfo) ProtoMessage()

func (*BlockchainInfo) Reset

func (m *BlockchainInfo) Reset()

func (*BlockchainInfo) String

func (m *BlockchainInfo) String() string

func (*BlockchainInfo) XXX_DiscardUnknown

func (m *BlockchainInfo) XXX_DiscardUnknown()

func (*BlockchainInfo) XXX_Marshal

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

func (*BlockchainInfo) XXX_Merge

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

func (*BlockchainInfo) XXX_Size

func (m *BlockchainInfo) XXX_Size() int

func (*BlockchainInfo) XXX_Unmarshal

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

type BucketNode

type BucketNode struct {
	Level                uint64   `protobuf:"varint,1,opt,name=level,proto3" json:"level,omitempty"`
	BucketNum            uint64   `protobuf:"varint,2,opt,name=bucketNum,proto3" json:"bucketNum,omitempty"`
	CryptoHash           []byte   `protobuf:"bytes,3,opt,name=cryptoHash,proto3" json:"cryptoHash,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*BucketNode) Descriptor

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

func (*BucketNode) GetBucketNum

func (m *BucketNode) GetBucketNum() uint64

func (*BucketNode) GetCryptoHash

func (m *BucketNode) GetCryptoHash() []byte

func (*BucketNode) GetLevel

func (m *BucketNode) GetLevel() uint64

func (*BucketNode) ProtoMessage

func (*BucketNode) ProtoMessage()

func (*BucketNode) Reset

func (m *BucketNode) Reset()

func (*BucketNode) String

func (m *BucketNode) String() string

func (*BucketNode) XXX_DiscardUnknown

func (m *BucketNode) XXX_DiscardUnknown()

func (*BucketNode) XXX_Marshal

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

func (*BucketNode) XXX_Merge

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

func (*BucketNode) XXX_Size

func (m *BucketNode) XXX_Size() int

func (*BucketNode) XXX_Unmarshal

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

type BucketNodes

type BucketNodes struct {
	Nodes                []*BucketNode `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

func (*BucketNodes) Descriptor

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

func (*BucketNodes) GetNodes

func (m *BucketNodes) GetNodes() []*BucketNode

func (*BucketNodes) ProtoMessage

func (*BucketNodes) ProtoMessage()

func (*BucketNodes) Reset

func (m *BucketNodes) Reset()

func (*BucketNodes) String

func (m *BucketNodes) String() string

func (*BucketNodes) XXX_DiscardUnknown

func (m *BucketNodes) XXX_DiscardUnknown()

func (*BucketNodes) XXX_Marshal

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

func (*BucketNodes) XXX_Merge

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

func (*BucketNodes) XXX_Size

func (m *BucketNodes) XXX_Size() int

func (*BucketNodes) XXX_Unmarshal

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

type BucketTreeOffset

type BucketTreeOffset struct {
	Level                uint64   `protobuf:"varint,1,opt,name=level,proto3" json:"level,omitempty"`
	BucketNum            uint64   `protobuf:"varint,2,opt,name=bucketNum,proto3" json:"bucketNum,omitempty"`
	Delta                uint64   `protobuf:"varint,3,opt,name=delta,proto3" json:"delta,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func UnmarshalBucketTree

func UnmarshalBucketTree(b []byte) (*BucketTreeOffset, error)

func (*BucketTreeOffset) Byte

func (m *BucketTreeOffset) Byte() ([]byte, error)

func (*BucketTreeOffset) Descriptor

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

func (*BucketTreeOffset) GetBucketNum

func (m *BucketTreeOffset) GetBucketNum() uint64

func (*BucketTreeOffset) GetDelta

func (m *BucketTreeOffset) GetDelta() uint64

func (*BucketTreeOffset) GetLevel

func (m *BucketTreeOffset) GetLevel() uint64

func (*BucketTreeOffset) ProtoMessage

func (*BucketTreeOffset) ProtoMessage()

func (*BucketTreeOffset) Reset

func (m *BucketTreeOffset) Reset()

func (*BucketTreeOffset) String

func (m *BucketTreeOffset) String() string

func (*BucketTreeOffset) XXX_DiscardUnknown

func (m *BucketTreeOffset) XXX_DiscardUnknown()

func (*BucketTreeOffset) XXX_Marshal

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

func (*BucketTreeOffset) XXX_Merge

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

func (*BucketTreeOffset) XXX_Size

func (m *BucketTreeOffset) XXX_Size() int

func (*BucketTreeOffset) XXX_Unmarshal

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

type BuildResult

type BuildResult struct {
	Status               BuildResult_StatusCode   `protobuf:"varint,1,opt,name=status,proto3,enum=protos.BuildResult_StatusCode" json:"status,omitempty"`
	Msg                  string                   `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	DeploymentSpec       *ChaincodeDeploymentSpec `protobuf:"bytes,3,opt,name=deploymentSpec,proto3" json:"deploymentSpec,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                 `json:"-"`
	XXX_unrecognized     []byte                   `json:"-"`
	XXX_sizecache        int32                    `json:"-"`
}

func (*BuildResult) Descriptor

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

func (*BuildResult) GetDeploymentSpec

func (m *BuildResult) GetDeploymentSpec() *ChaincodeDeploymentSpec

func (*BuildResult) GetMsg

func (m *BuildResult) GetMsg() string

func (*BuildResult) GetStatus

func (m *BuildResult) GetStatus() BuildResult_StatusCode

func (*BuildResult) ProtoMessage

func (*BuildResult) ProtoMessage()

func (*BuildResult) Reset

func (m *BuildResult) Reset()

func (*BuildResult) String

func (m *BuildResult) String() string

func (*BuildResult) XXX_DiscardUnknown

func (m *BuildResult) XXX_DiscardUnknown()

func (*BuildResult) XXX_Marshal

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

func (*BuildResult) XXX_Merge

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

func (*BuildResult) XXX_Size

func (m *BuildResult) XXX_Size() int

func (*BuildResult) XXX_Unmarshal

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

type BuildResult_StatusCode

type BuildResult_StatusCode int32
const (
	BuildResult_UNDEFINED BuildResult_StatusCode = 0
	BuildResult_SUCCESS   BuildResult_StatusCode = 1
	BuildResult_FAILURE   BuildResult_StatusCode = 2
)

func (BuildResult_StatusCode) EnumDescriptor

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

func (BuildResult_StatusCode) String

func (x BuildResult_StatusCode) String() string

type CCRegister

type CCRegister struct {
	CcID                 *ChaincodeID `protobuf:"bytes,1,opt,name=ccID,proto3" json:"ccID,omitempty"`
	NetworkID            string       `protobuf:"bytes,2,opt,name=networkID,proto3" json:"networkID,omitempty"`
	NodeID               string       `protobuf:"bytes,3,opt,name=nodeID,proto3" json:"nodeID,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*CCRegister) Descriptor

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

func (*CCRegister) GetCcID

func (m *CCRegister) GetCcID() *ChaincodeID

func (*CCRegister) GetNetworkID

func (m *CCRegister) GetNetworkID() string

func (*CCRegister) GetNodeID

func (m *CCRegister) GetNodeID() string

func (*CCRegister) ProtoMessage

func (*CCRegister) ProtoMessage()

func (*CCRegister) Reset

func (m *CCRegister) Reset()

func (*CCRegister) String

func (m *CCRegister) String() string

func (*CCRegister) XXX_DiscardUnknown

func (m *CCRegister) XXX_DiscardUnknown()

func (*CCRegister) XXX_Marshal

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

func (*CCRegister) XXX_Merge

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

func (*CCRegister) XXX_Size

func (m *CCRegister) XXX_Size() int

func (*CCRegister) XXX_Unmarshal

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

type ChaincodeDeploymentSpec

type ChaincodeDeploymentSpec struct {
	ChaincodeSpec *ChaincodeSpec `protobuf:"bytes,1,opt,name=chaincodeSpec,proto3" json:"chaincodeSpec,omitempty"`
	// Controls when the chaincode becomes executable.
	EffectiveDate        *timestamp.Timestamp                         `protobuf:"bytes,2,opt,name=effectiveDate,proto3" json:"effectiveDate,omitempty"`
	CodePackage          []byte                                       `protobuf:"bytes,3,opt,name=codePackage,proto3" json:"codePackage,omitempty"`
	ExecEnv              ChaincodeDeploymentSpec_ExecutionEnvironment `protobuf:"varint,4,opt,name=execEnv,proto3,enum=protos.ChaincodeDeploymentSpec_ExecutionEnvironment" json:"execEnv,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                                     `json:"-"`
	XXX_unrecognized     []byte                                       `json:"-"`
	XXX_sizecache        int32                                        `json:"-"`
}

Specify the deployment of a chaincode. TODO: Define `codePackage`.

func (*ChaincodeDeploymentSpec) Descriptor

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

func (*ChaincodeDeploymentSpec) GetChaincodeSpec

func (m *ChaincodeDeploymentSpec) GetChaincodeSpec() *ChaincodeSpec

func (*ChaincodeDeploymentSpec) GetCodePackage

func (m *ChaincodeDeploymentSpec) GetCodePackage() []byte

func (*ChaincodeDeploymentSpec) GetEffectiveDate

func (m *ChaincodeDeploymentSpec) GetEffectiveDate() *timestamp.Timestamp

func (*ChaincodeDeploymentSpec) GetExecEnv

func (*ChaincodeDeploymentSpec) ProtoMessage

func (*ChaincodeDeploymentSpec) ProtoMessage()

func (*ChaincodeDeploymentSpec) Reset

func (m *ChaincodeDeploymentSpec) Reset()

func (*ChaincodeDeploymentSpec) String

func (m *ChaincodeDeploymentSpec) String() string

func (*ChaincodeDeploymentSpec) XXX_DiscardUnknown

func (m *ChaincodeDeploymentSpec) XXX_DiscardUnknown()

func (*ChaincodeDeploymentSpec) XXX_Marshal

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

func (*ChaincodeDeploymentSpec) XXX_Merge

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

func (*ChaincodeDeploymentSpec) XXX_Size

func (m *ChaincodeDeploymentSpec) XXX_Size() int

func (*ChaincodeDeploymentSpec) XXX_Unmarshal

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

type ChaincodeDeploymentSpec_ExecutionEnvironment

type ChaincodeDeploymentSpec_ExecutionEnvironment int32
const (
	ChaincodeDeploymentSpec_DOCKER ChaincodeDeploymentSpec_ExecutionEnvironment = 0
	ChaincodeDeploymentSpec_SYSTEM ChaincodeDeploymentSpec_ExecutionEnvironment = 1
)

func (ChaincodeDeploymentSpec_ExecutionEnvironment) EnumDescriptor

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

func (ChaincodeDeploymentSpec_ExecutionEnvironment) String

type ChaincodeEvent

type ChaincodeEvent struct {
	ChaincodeID          string   `protobuf:"bytes,1,opt,name=chaincodeID,proto3" json:"chaincodeID,omitempty"`
	TxID                 string   `protobuf:"bytes,2,opt,name=txID,proto3" json:"txID,omitempty"`
	EventName            string   `protobuf:"bytes,3,opt,name=eventName,proto3" json:"eventName,omitempty"`
	Payload              []byte   `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

ChaincodeEvent is used for events and registrations that are specific to chaincode string type - "chaincode"

func (*ChaincodeEvent) Descriptor

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

func (*ChaincodeEvent) GetChaincodeID

func (m *ChaincodeEvent) GetChaincodeID() string

func (*ChaincodeEvent) GetEventName

func (m *ChaincodeEvent) GetEventName() string

func (*ChaincodeEvent) GetPayload

func (m *ChaincodeEvent) GetPayload() []byte

func (*ChaincodeEvent) GetTxID

func (m *ChaincodeEvent) GetTxID() string

func (*ChaincodeEvent) ProtoMessage

func (*ChaincodeEvent) ProtoMessage()

func (*ChaincodeEvent) Reset

func (m *ChaincodeEvent) Reset()

func (*ChaincodeEvent) String

func (m *ChaincodeEvent) String() string

func (*ChaincodeEvent) XXX_DiscardUnknown

func (m *ChaincodeEvent) XXX_DiscardUnknown()

func (*ChaincodeEvent) XXX_Marshal

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

func (*ChaincodeEvent) XXX_Merge

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

func (*ChaincodeEvent) XXX_Size

func (m *ChaincodeEvent) XXX_Size() int

func (*ChaincodeEvent) XXX_Unmarshal

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

type ChaincodeID

type ChaincodeID struct {
	//deploy transaction will use the path
	Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	//all other requests will use the name (really a hashcode) generated by
	//the deploy transaction
	Name                 string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

ChaincodeID contains the path as specified by the deploy transaction that created it as well as the hashCode that is generated by the system for the path. From the user level (ie, CLI, REST API and so on) deploy transaction is expected to provide the path and other requests are expected to provide the hashCode. The other value will be ignored. Internally, the structure could contain both values. For instance, the hashCode will be set when first generated using the path

func (*ChaincodeID) Descriptor

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

func (*ChaincodeID) GetName

func (m *ChaincodeID) GetName() string

func (*ChaincodeID) GetPath

func (m *ChaincodeID) GetPath() string

func (*ChaincodeID) ProtoMessage

func (*ChaincodeID) ProtoMessage()

func (*ChaincodeID) Reset

func (m *ChaincodeID) Reset()

func (*ChaincodeID) String

func (m *ChaincodeID) String() string

func (*ChaincodeID) XXX_DiscardUnknown

func (m *ChaincodeID) XXX_DiscardUnknown()

func (*ChaincodeID) XXX_Marshal

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

func (*ChaincodeID) XXX_Merge

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

func (*ChaincodeID) XXX_Size

func (m *ChaincodeID) XXX_Size() int

func (*ChaincodeID) XXX_Unmarshal

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

type ChaincodeInput

type ChaincodeInput struct {
	Args                 [][]byte `protobuf:"bytes,1,rep,name=args,proto3" json:"args,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Carries the chaincode function and its arguments. UnmarshalJSON in transaction.go converts the string-based REST/JSON input to the []byte-based current ChaincodeInput structure.

func (*ChaincodeInput) Descriptor

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

func (*ChaincodeInput) GetArgs

func (m *ChaincodeInput) GetArgs() [][]byte

func (*ChaincodeInput) ProtoMessage

func (*ChaincodeInput) ProtoMessage()

func (*ChaincodeInput) Reset

func (m *ChaincodeInput) Reset()

func (*ChaincodeInput) String

func (m *ChaincodeInput) String() string

func (*ChaincodeInput) UnmarshalJSON

func (c *ChaincodeInput) UnmarshalJSON(b []byte) error

UnmarshalJSON converts the string-based REST/JSON input to the []byte-based current ChaincodeInput structure.

func (*ChaincodeInput) XXX_DiscardUnknown

func (m *ChaincodeInput) XXX_DiscardUnknown()

func (*ChaincodeInput) XXX_Marshal

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

func (*ChaincodeInput) XXX_Merge

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

func (*ChaincodeInput) XXX_Size

func (m *ChaincodeInput) XXX_Size() int

func (*ChaincodeInput) XXX_Unmarshal

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

type ChaincodeInvocationSpec

type ChaincodeInvocationSpec struct {
	ChaincodeSpec *ChaincodeSpec `protobuf:"bytes,1,opt,name=chaincodeSpec,proto3" json:"chaincodeSpec,omitempty"`
	// This field can contain a user-specified ID generation algorithm
	// If supplied, this will be used to generate a ID
	// If not supplied (left empty), sha256base64 will be used
	// The algorithm consists of two parts:
	//  1, a hash function
	//  2, a decoding used to decode user (string) input to bytes
	// Currently, SHA256 with BASE64 is supported (e.g. idGenerationAlg='sha256base64')
	IdGenerationAlg      string   `protobuf:"bytes,2,opt,name=idGenerationAlg,proto3" json:"idGenerationAlg,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Carries the chaincode function and its arguments.

func (*ChaincodeInvocationSpec) Descriptor

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

func (*ChaincodeInvocationSpec) GetChaincodeSpec

func (m *ChaincodeInvocationSpec) GetChaincodeSpec() *ChaincodeSpec

func (*ChaincodeInvocationSpec) GetIdGenerationAlg

func (m *ChaincodeInvocationSpec) GetIdGenerationAlg() string

func (*ChaincodeInvocationSpec) ProtoMessage

func (*ChaincodeInvocationSpec) ProtoMessage()

func (*ChaincodeInvocationSpec) Reset

func (m *ChaincodeInvocationSpec) Reset()

func (*ChaincodeInvocationSpec) String

func (m *ChaincodeInvocationSpec) String() string

func (*ChaincodeInvocationSpec) XXX_DiscardUnknown

func (m *ChaincodeInvocationSpec) XXX_DiscardUnknown()

func (*ChaincodeInvocationSpec) XXX_Marshal

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

func (*ChaincodeInvocationSpec) XXX_Merge

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

func (*ChaincodeInvocationSpec) XXX_Size

func (m *ChaincodeInvocationSpec) XXX_Size() int

func (*ChaincodeInvocationSpec) XXX_Unmarshal

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

type ChaincodeMessage

type ChaincodeMessage struct {
	Type            ChaincodeMessage_Type     `protobuf:"varint,1,opt,name=type,proto3,enum=protos.ChaincodeMessage_Type" json:"type,omitempty"`
	Timestamp       *timestamp.Timestamp      `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Payload         []byte                    `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
	Txid            string                    `protobuf:"bytes,4,opt,name=txid,proto3" json:"txid,omitempty"`
	SecurityContext *ChaincodeSecurityContext `protobuf:"bytes,5,opt,name=securityContext,proto3" json:"securityContext,omitempty"`
	//event emmited by chaincode. Used only with Init or Invoke.
	// This event is then stored (currently)
	//with Block.NonHashData.TransactionResult
	ChaincodeEvent *ChaincodeEvent `protobuf:"bytes,6,opt,name=chaincodeEvent,proto3" json:"chaincodeEvent,omitempty"`
	//Extended chaincodeEvent
	ChaincodeEvents      []*ChaincodeEvent `protobuf:"bytes,7,rep,name=chaincodeEvents,proto3" json:"chaincodeEvents,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*ChaincodeMessage) Descriptor

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

func (*ChaincodeMessage) GetChaincodeEvent

func (m *ChaincodeMessage) GetChaincodeEvent() *ChaincodeEvent

func (*ChaincodeMessage) GetChaincodeEvents

func (m *ChaincodeMessage) GetChaincodeEvents() []*ChaincodeEvent

func (*ChaincodeMessage) GetPayload

func (m *ChaincodeMessage) GetPayload() []byte

func (*ChaincodeMessage) GetSecurityContext

func (m *ChaincodeMessage) GetSecurityContext() *ChaincodeSecurityContext

func (*ChaincodeMessage) GetTimestamp

func (m *ChaincodeMessage) GetTimestamp() *timestamp.Timestamp

func (*ChaincodeMessage) GetTxid

func (m *ChaincodeMessage) GetTxid() string

func (*ChaincodeMessage) GetType

func (*ChaincodeMessage) ProtoMessage

func (*ChaincodeMessage) ProtoMessage()

func (*ChaincodeMessage) Reset

func (m *ChaincodeMessage) Reset()

func (*ChaincodeMessage) String

func (m *ChaincodeMessage) String() string

func (*ChaincodeMessage) XXX_DiscardUnknown

func (m *ChaincodeMessage) XXX_DiscardUnknown()

func (*ChaincodeMessage) XXX_Marshal

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

func (*ChaincodeMessage) XXX_Merge

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

func (*ChaincodeMessage) XXX_Size

func (m *ChaincodeMessage) XXX_Size() int

func (*ChaincodeMessage) XXX_Unmarshal

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

type ChaincodeMessage_Type

type ChaincodeMessage_Type int32
const (
	ChaincodeMessage_UNDEFINED               ChaincodeMessage_Type = 0
	ChaincodeMessage_REGISTER                ChaincodeMessage_Type = 1
	ChaincodeMessage_REGISTERED              ChaincodeMessage_Type = 2
	ChaincodeMessage_INIT                    ChaincodeMessage_Type = 3
	ChaincodeMessage_READY                   ChaincodeMessage_Type = 4
	ChaincodeMessage_TRANSACTION             ChaincodeMessage_Type = 5
	ChaincodeMessage_COMPLETED               ChaincodeMessage_Type = 6
	ChaincodeMessage_ERROR                   ChaincodeMessage_Type = 7
	ChaincodeMessage_GET_STATE               ChaincodeMessage_Type = 8
	ChaincodeMessage_PUT_STATE               ChaincodeMessage_Type = 9
	ChaincodeMessage_DEL_STATE               ChaincodeMessage_Type = 10
	ChaincodeMessage_INVOKE_CHAINCODE        ChaincodeMessage_Type = 11
	ChaincodeMessage_INVOKE_QUERY            ChaincodeMessage_Type = 12
	ChaincodeMessage_RESPONSE                ChaincodeMessage_Type = 13
	ChaincodeMessage_QUERY                   ChaincodeMessage_Type = 14
	ChaincodeMessage_QUERY_COMPLETED         ChaincodeMessage_Type = 15
	ChaincodeMessage_QUERY_ERROR             ChaincodeMessage_Type = 16
	ChaincodeMessage_RANGE_QUERY_STATE       ChaincodeMessage_Type = 17
	ChaincodeMessage_RANGE_QUERY_STATE_NEXT  ChaincodeMessage_Type = 18
	ChaincodeMessage_RANGE_QUERY_STATE_CLOSE ChaincodeMessage_Type = 19
	ChaincodeMessage_KEEPALIVE               ChaincodeMessage_Type = 20
	//new register, using a extended struct instead of chaincodeID
	ChaincodeMessage_REGISTER2 ChaincodeMessage_Type = 21
)

func (ChaincodeMessage_Type) EnumDescriptor

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

func (ChaincodeMessage_Type) String

func (x ChaincodeMessage_Type) String() string

type ChaincodeReg

type ChaincodeReg struct {
	ChaincodeID          string   `protobuf:"bytes,1,opt,name=chaincodeID,proto3" json:"chaincodeID,omitempty"`
	EventName            string   `protobuf:"bytes,2,opt,name=eventName,proto3" json:"eventName,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

ChaincodeReg is used for registering chaincode Interests when EventType is CHAINCODE

func (*ChaincodeReg) Descriptor

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

func (*ChaincodeReg) GetChaincodeID

func (m *ChaincodeReg) GetChaincodeID() string

func (*ChaincodeReg) GetEventName

func (m *ChaincodeReg) GetEventName() string

func (*ChaincodeReg) ProtoMessage

func (*ChaincodeReg) ProtoMessage()

func (*ChaincodeReg) Reset

func (m *ChaincodeReg) Reset()

func (*ChaincodeReg) String

func (m *ChaincodeReg) String() string

func (*ChaincodeReg) XXX_DiscardUnknown

func (m *ChaincodeReg) XXX_DiscardUnknown()

func (*ChaincodeReg) XXX_Marshal

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

func (*ChaincodeReg) XXX_Merge

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

func (*ChaincodeReg) XXX_Size

func (m *ChaincodeReg) XXX_Size() int

func (*ChaincodeReg) XXX_Unmarshal

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

type ChaincodeSecurityContext

type ChaincodeSecurityContext struct {
	CallerCert           []byte               `protobuf:"bytes,1,opt,name=callerCert,proto3" json:"callerCert,omitempty"`
	CallerSign           []byte               `protobuf:"bytes,2,opt,name=callerSign,proto3" json:"callerSign,omitempty"`
	Payload              []byte               `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
	Binding              []byte               `protobuf:"bytes,4,opt,name=binding,proto3" json:"binding,omitempty"`
	Metadata             []byte               `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"`
	ParentMetadata       []byte               `protobuf:"bytes,6,opt,name=parentMetadata,proto3" json:"parentMetadata,omitempty"`
	TxTimestamp          *timestamp.Timestamp `protobuf:"bytes,7,opt,name=txTimestamp,proto3" json:"txTimestamp,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

This structure contain transaction data that we send to the chaincode container shim and allow the chaincode to access through the shim interface. TODO: Consider remove this message and just pass the transaction object to the shim and/or allow the chaincode to query transactions.

func (*ChaincodeSecurityContext) Descriptor

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

func (*ChaincodeSecurityContext) GetBinding

func (m *ChaincodeSecurityContext) GetBinding() []byte

func (*ChaincodeSecurityContext) GetCallerCert

func (m *ChaincodeSecurityContext) GetCallerCert() []byte

func (*ChaincodeSecurityContext) GetCallerSign

func (m *ChaincodeSecurityContext) GetCallerSign() []byte

func (*ChaincodeSecurityContext) GetMetadata

func (m *ChaincodeSecurityContext) GetMetadata() []byte

func (*ChaincodeSecurityContext) GetParentMetadata

func (m *ChaincodeSecurityContext) GetParentMetadata() []byte

func (*ChaincodeSecurityContext) GetPayload

func (m *ChaincodeSecurityContext) GetPayload() []byte

func (*ChaincodeSecurityContext) GetTxTimestamp

func (m *ChaincodeSecurityContext) GetTxTimestamp() *timestamp.Timestamp

func (*ChaincodeSecurityContext) ProtoMessage

func (*ChaincodeSecurityContext) ProtoMessage()

func (*ChaincodeSecurityContext) Reset

func (m *ChaincodeSecurityContext) Reset()

func (*ChaincodeSecurityContext) String

func (m *ChaincodeSecurityContext) String() string

func (*ChaincodeSecurityContext) XXX_DiscardUnknown

func (m *ChaincodeSecurityContext) XXX_DiscardUnknown()

func (*ChaincodeSecurityContext) XXX_Marshal

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

func (*ChaincodeSecurityContext) XXX_Merge

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

func (*ChaincodeSecurityContext) XXX_Size

func (m *ChaincodeSecurityContext) XXX_Size() int

func (*ChaincodeSecurityContext) XXX_Unmarshal

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

type ChaincodeSpec

type ChaincodeSpec struct {
	Type                 ChaincodeSpec_Type   `protobuf:"varint,1,opt,name=type,proto3,enum=protos.ChaincodeSpec_Type" json:"type,omitempty"`
	ChaincodeID          *ChaincodeID         `protobuf:"bytes,2,opt,name=chaincodeID,proto3" json:"chaincodeID,omitempty"`
	CtorMsg              *ChaincodeInput      `protobuf:"bytes,3,opt,name=ctorMsg,proto3" json:"ctorMsg,omitempty"`
	Timeout              int32                `protobuf:"varint,4,opt,name=timeout,proto3" json:"timeout,omitempty"`
	SecureContext        string               `protobuf:"bytes,5,opt,name=secureContext,proto3" json:"secureContext,omitempty"`
	ConfidentialityLevel ConfidentialityLevel `` /* 127-byte string literal not displayed */
	Metadata             []byte               `protobuf:"bytes,7,opt,name=metadata,proto3" json:"metadata,omitempty"`
	Attributes           []string             `protobuf:"bytes,8,rep,name=attributes,proto3" json:"attributes,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

Carries the chaincode specification. This is the actual metadata required for defining a chaincode.

func (*ChaincodeSpec) Descriptor

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

func (*ChaincodeSpec) GetAttributes

func (m *ChaincodeSpec) GetAttributes() []string

func (*ChaincodeSpec) GetChaincodeID

func (m *ChaincodeSpec) GetChaincodeID() *ChaincodeID

func (*ChaincodeSpec) GetConfidentialityLevel

func (m *ChaincodeSpec) GetConfidentialityLevel() ConfidentialityLevel

func (*ChaincodeSpec) GetCtorMsg

func (m *ChaincodeSpec) GetCtorMsg() *ChaincodeInput

func (*ChaincodeSpec) GetMetadata

func (m *ChaincodeSpec) GetMetadata() []byte

func (*ChaincodeSpec) GetSecureContext

func (m *ChaincodeSpec) GetSecureContext() string

func (*ChaincodeSpec) GetTimeout

func (m *ChaincodeSpec) GetTimeout() int32

func (*ChaincodeSpec) GetType

func (m *ChaincodeSpec) GetType() ChaincodeSpec_Type

func (*ChaincodeSpec) ProtoMessage

func (*ChaincodeSpec) ProtoMessage()

func (*ChaincodeSpec) Reset

func (m *ChaincodeSpec) Reset()

func (*ChaincodeSpec) String

func (m *ChaincodeSpec) String() string

func (*ChaincodeSpec) XXX_DiscardUnknown

func (m *ChaincodeSpec) XXX_DiscardUnknown()

func (*ChaincodeSpec) XXX_Marshal

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

func (*ChaincodeSpec) XXX_Merge

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

func (*ChaincodeSpec) XXX_Size

func (m *ChaincodeSpec) XXX_Size() int

func (*ChaincodeSpec) XXX_Unmarshal

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

type ChaincodeSpec_Type

type ChaincodeSpec_Type int32
const (
	ChaincodeSpec_UNDEFINED ChaincodeSpec_Type = 0
	ChaincodeSpec_GOLANG    ChaincodeSpec_Type = 1
	ChaincodeSpec_NODE      ChaincodeSpec_Type = 2
	ChaincodeSpec_CAR       ChaincodeSpec_Type = 3
	ChaincodeSpec_JAVA      ChaincodeSpec_Type = 4
)

func (ChaincodeSpec_Type) EnumDescriptor

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

func (ChaincodeSpec_Type) String

func (x ChaincodeSpec_Type) String() string

type ChaincodeStateDelta

type ChaincodeStateDelta struct {
	UpdatedKVs           map[string]*UpdatedValue `` /* 161-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}                 `json:"-"`
	XXX_unrecognized     []byte                   `json:"-"`
	XXX_sizecache        int32                    `json:"-"`
}

func NewChaincodeStateDelta

func NewChaincodeStateDelta() *ChaincodeStateDelta

func (*ChaincodeStateDelta) Descriptor

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

func (*ChaincodeStateDelta) Get

func (chaincodeStateDelta *ChaincodeStateDelta) Get(key string) *UpdatedValue

func (*ChaincodeStateDelta) GetSortedKeys

func (chaincodeStateDelta *ChaincodeStateDelta) GetSortedKeys() []string

func (*ChaincodeStateDelta) GetUpdatedKVs

func (m *ChaincodeStateDelta) GetUpdatedKVs() map[string]*UpdatedValue

func (*ChaincodeStateDelta) HasChanges

func (chaincodeStateDelta *ChaincodeStateDelta) HasChanges() bool

func (*ChaincodeStateDelta) ProtoMessage

func (*ChaincodeStateDelta) ProtoMessage()

func (*ChaincodeStateDelta) Remove

func (chaincodeStateDelta *ChaincodeStateDelta) Remove(key string, previousValue []byte)

func (*ChaincodeStateDelta) Reset

func (m *ChaincodeStateDelta) Reset()

func (*ChaincodeStateDelta) Set

func (chaincodeStateDelta *ChaincodeStateDelta) Set(key string, updatedValue, previousValue []byte)

func (*ChaincodeStateDelta) String

func (m *ChaincodeStateDelta) String() string

func (*ChaincodeStateDelta) XXX_DiscardUnknown

func (m *ChaincodeStateDelta) XXX_DiscardUnknown()

func (*ChaincodeStateDelta) XXX_Marshal

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

func (*ChaincodeStateDelta) XXX_Merge

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

func (*ChaincodeStateDelta) XXX_Size

func (m *ChaincodeStateDelta) XXX_Size() int

func (*ChaincodeStateDelta) XXX_Unmarshal

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

type ChaincodeSupportClient

type ChaincodeSupportClient interface {
	Register(ctx context.Context, opts ...grpc.CallOption) (ChaincodeSupport_RegisterClient, error)
}

ChaincodeSupportClient is the client API for ChaincodeSupport service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewChaincodeSupportClient

func NewChaincodeSupportClient(cc *grpc.ClientConn) ChaincodeSupportClient

type ChaincodeSupportServer

type ChaincodeSupportServer interface {
	Register(ChaincodeSupport_RegisterServer) error
}

ChaincodeSupportServer is the server API for ChaincodeSupport service.

type ChaincodeSupport_RegisterClient

type ChaincodeSupport_RegisterClient interface {
	Send(*ChaincodeMessage) error
	Recv() (*ChaincodeMessage, error)
	grpc.ClientStream
}

type ChaincodeSupport_RegisterServer

type ChaincodeSupport_RegisterServer interface {
	Send(*ChaincodeMessage) error
	Recv() (*ChaincodeMessage, error)
	grpc.ServerStream
}

type ConfidentialityLevel

type ConfidentialityLevel int32

Confidentiality Levels

const (
	ConfidentialityLevel_PUBLIC       ConfidentialityLevel = 0
	ConfidentialityLevel_CONFIDENTIAL ConfidentialityLevel = 1
)

func (ConfidentialityLevel) EnumDescriptor

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

func (ConfidentialityLevel) String

func (x ConfidentialityLevel) String() string

type DevopsClient

type DevopsClient interface {
	// Log in - passed Secret object and returns Response object, where
	// msg is the security context to be used in subsequent invocations
	Login(ctx context.Context, in *Secret, opts ...grpc.CallOption) (*Response, error)
	// Build the chaincode package.
	Build(ctx context.Context, in *ChaincodeSpec, opts ...grpc.CallOption) (*ChaincodeDeploymentSpec, error)
	// Deploy the chaincode package to the chain.
	Deploy(ctx context.Context, in *ChaincodeSpec, opts ...grpc.CallOption) (*ChaincodeDeploymentSpec, error)
	// Invoke chaincode.
	Invoke(ctx context.Context, in *ChaincodeInvocationSpec, opts ...grpc.CallOption) (*Response, error)
	// Query chaincode.
	Query(ctx context.Context, in *ChaincodeInvocationSpec, opts ...grpc.CallOption) (*Response, error)
}

DevopsClient is the client API for Devops service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewDevopsClient

func NewDevopsClient(cc *grpc.ClientConn) DevopsClient

type DevopsServer

type DevopsServer interface {
	// Log in - passed Secret object and returns Response object, where
	// msg is the security context to be used in subsequent invocations
	Login(context.Context, *Secret) (*Response, error)
	// Build the chaincode package.
	Build(context.Context, *ChaincodeSpec) (*ChaincodeDeploymentSpec, error)
	// Deploy the chaincode package to the chain.
	Deploy(context.Context, *ChaincodeSpec) (*ChaincodeDeploymentSpec, error)
	// Invoke chaincode.
	Invoke(context.Context, *ChaincodeInvocationSpec) (*Response, error)
	// Query chaincode.
	Query(context.Context, *ChaincodeInvocationSpec) (*Response, error)
}

DevopsServer is the server API for Devops service.

type Event

type Event struct {
	// Types that are valid to be assigned to Event:
	//	*Event_Register
	//	*Event_Block
	//	*Event_ChaincodeEvent
	//	*Event_Rejection
	//	*Event_Unregister
	Event                isEvent_Event `protobuf_oneof:"Event"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

Event is used by

  • consumers (adapters) to send Register
  • producer to advertise supported types and events

func (*Event) Descriptor

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

func (*Event) GetBlock

func (m *Event) GetBlock() *Block

func (*Event) GetChaincodeEvent

func (m *Event) GetChaincodeEvent() *ChaincodeEvent

func (*Event) GetEvent

func (m *Event) GetEvent() isEvent_Event

func (*Event) GetRegister

func (m *Event) GetRegister() *Register

func (*Event) GetRejection

func (m *Event) GetRejection() *Rejection

func (*Event) GetUnregister

func (m *Event) GetUnregister() *Unregister

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) Reset

func (m *Event) Reset()

func (*Event) String

func (m *Event) String() string

func (*Event) XXX_DiscardUnknown

func (m *Event) XXX_DiscardUnknown()

func (*Event) XXX_Marshal

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

func (*Event) XXX_Merge

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

func (*Event) XXX_OneofFuncs

func (*Event) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*Event) XXX_Size

func (m *Event) XXX_Size() int

func (*Event) XXX_Unmarshal

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

type EventType

type EventType int32
const (
	EventType_REGISTER  EventType = 0
	EventType_BLOCK     EventType = 1
	EventType_CHAINCODE EventType = 2
	EventType_REJECTION EventType = 3
)

func (EventType) EnumDescriptor

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

func (EventType) String

func (x EventType) String() string

type Event_Block

type Event_Block struct {
	Block *Block `protobuf:"bytes,2,opt,name=block,proto3,oneof"`
}

type Event_ChaincodeEvent

type Event_ChaincodeEvent struct {
	ChaincodeEvent *ChaincodeEvent `protobuf:"bytes,3,opt,name=chaincodeEvent,proto3,oneof"`
}

type Event_Register

type Event_Register struct {
	Register *Register `protobuf:"bytes,1,opt,name=register,proto3,oneof"`
}

type Event_Rejection

type Event_Rejection struct {
	Rejection *Rejection `protobuf:"bytes,4,opt,name=rejection,proto3,oneof"`
}

type Event_Unregister

type Event_Unregister struct {
	Unregister *Unregister `protobuf:"bytes,5,opt,name=unregister,proto3,oneof"`
}

type EventsClient

type EventsClient interface {
	// event chatting using Event
	Chat(ctx context.Context, opts ...grpc.CallOption) (Events_ChatClient, error)
}

EventsClient is the client API for Events service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewEventsClient

func NewEventsClient(cc *grpc.ClientConn) EventsClient

type EventsServer

type EventsServer interface {
	// event chatting using Event
	Chat(Events_ChatServer) error
}

EventsServer is the server API for Events service.

type Events_ChatClient

type Events_ChatClient interface {
	Send(*Event) error
	Recv() (*Event, error)
	grpc.ClientStream
}

type Events_ChatServer

type Events_ChatServer interface {
	Send(*Event) error
	Recv() (*Event, error)
	grpc.ServerStream
}

type ExecuteWithBinding

type ExecuteWithBinding struct {
	ChaincodeInvocationSpec *ChaincodeInvocationSpec `protobuf:"bytes,1,opt,name=chaincodeInvocationSpec,proto3" json:"chaincodeInvocationSpec,omitempty"`
	Binding                 []byte                   `protobuf:"bytes,2,opt,name=binding,proto3" json:"binding,omitempty"`
	XXX_NoUnkeyedLiteral    struct{}                 `json:"-"`
	XXX_unrecognized        []byte                   `json:"-"`
	XXX_sizecache           int32                    `json:"-"`
}

func (*ExecuteWithBinding) Descriptor

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

func (*ExecuteWithBinding) GetBinding

func (m *ExecuteWithBinding) GetBinding() []byte

func (*ExecuteWithBinding) GetChaincodeInvocationSpec

func (m *ExecuteWithBinding) GetChaincodeInvocationSpec() *ChaincodeInvocationSpec

func (*ExecuteWithBinding) ProtoMessage

func (*ExecuteWithBinding) ProtoMessage()

func (*ExecuteWithBinding) Reset

func (m *ExecuteWithBinding) Reset()

func (*ExecuteWithBinding) String

func (m *ExecuteWithBinding) String() string

func (*ExecuteWithBinding) XXX_DiscardUnknown

func (m *ExecuteWithBinding) XXX_DiscardUnknown()

func (*ExecuteWithBinding) XXX_Marshal

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

func (*ExecuteWithBinding) XXX_Merge

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

func (*ExecuteWithBinding) XXX_Size

func (m *ExecuteWithBinding) XXX_Size() int

func (*ExecuteWithBinding) XXX_Unmarshal

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

type FailureHandler

type FailureHandler struct {
	Err error
}

type FuncAsTxPreHandler

type FuncAsTxPreHandler func(*TransactionHandlingContext) (*TransactionHandlingContext, error)

convert a function to a prehandler interface

func (FuncAsTxPreHandler) Handle

type GlobalState

type GlobalState struct {
	Count                   uint64   `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
	NextNodeStateHash       [][]byte `protobuf:"bytes,3,rep,name=nextNodeStateHash,proto3" json:"nextNodeStateHash,omitempty"`
	ParentNodeStateHash     [][]byte `protobuf:"bytes,4,rep,name=parentNodeStateHash,proto3" json:"parentNodeStateHash,omitempty"`
	LastBranchNodeStateHash []byte   `protobuf:"bytes,5,opt,name=lastBranchNodeStateHash,proto3" json:"lastBranchNodeStateHash,omitempty"`
	NextBranchNodeStateHash []byte   `protobuf:"bytes,7,opt,name=nextBranchNodeStateHash,proto3" json:"nextBranchNodeStateHash,omitempty"`
	XXX_NoUnkeyedLiteral    struct{} `json:"-"`
	XXX_unrecognized        []byte   `json:"-"`
	XXX_sizecache           int32    `json:"-"`
}

Globalstate defines the global graph of all states

func NewGlobalState

func NewGlobalState() *GlobalState

NewBlock creates a new Block given the input parameters.

func UnmarshallGS

func UnmarshallGS(gsBytes []byte) (*GlobalState, error)

func (*GlobalState) BackwardBranched

func (gs *GlobalState) BackwardBranched() bool

func (*GlobalState) Branched

func (gs *GlobalState) Branched() bool

Test state is a branch (or a node in the state graphic)

func (*GlobalState) BranchedSelf

func (gs *GlobalState) BranchedSelf() []byte

func (*GlobalState) Bytes

func (gs *GlobalState) Bytes() ([]byte, error)

Bytes returns this GlobalState as an array of bytes.

func (*GlobalState) Descriptor

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

func (*GlobalState) ForwardBranched

func (gs *GlobalState) ForwardBranched() bool

func (*GlobalState) GetCount

func (m *GlobalState) GetCount() uint64

func (*GlobalState) GetLastBranchNodeStateHash

func (m *GlobalState) GetLastBranchNodeStateHash() []byte

func (*GlobalState) GetNextBranchNodeStateHash

func (m *GlobalState) GetNextBranchNodeStateHash() []byte

func (*GlobalState) GetNextNodeStateHash

func (m *GlobalState) GetNextNodeStateHash() [][]byte

func (*GlobalState) GetParentNodeStateHash

func (m *GlobalState) GetParentNodeStateHash() [][]byte

func (*GlobalState) Isolated

func (gs *GlobalState) Isolated() bool

func (*GlobalState) NextNode

func (gs *GlobalState) NextNode() []byte

func (*GlobalState) ParentNode

func (gs *GlobalState) ParentNode() []byte

func (*GlobalState) ProtoMessage

func (*GlobalState) ProtoMessage()

func (*GlobalState) Reset

func (m *GlobalState) Reset()

func (*GlobalState) String

func (m *GlobalState) String() string

func (*GlobalState) XXX_DiscardUnknown

func (m *GlobalState) XXX_DiscardUnknown()

func (*GlobalState) XXX_Marshal

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

func (*GlobalState) XXX_Merge

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

func (*GlobalState) XXX_Size

func (m *GlobalState) XXX_Size() int

func (*GlobalState) XXX_Unmarshal

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

type GlobalStateUpdateTask

type GlobalStateUpdateTask struct {
	Target               []byte   `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"`
	TargetEdgeBeg        []byte   `protobuf:"bytes,2,opt,name=targetEdgeBeg,proto3" json:"targetEdgeBeg,omitempty"`
	TargetEdgeEnd        []byte   `protobuf:"bytes,3,opt,name=targetEdgeEnd,proto3" json:"targetEdgeEnd,omitempty"`
	TargetId             uint64   `protobuf:"varint,4,opt,name=targetId,proto3" json:"targetId,omitempty"`
	IsBackward           bool     `protobuf:"varint,6,opt,name=isBackward,proto3" json:"isBackward,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GlobalStateUpdateTask) Bytes

func (tsk *GlobalStateUpdateTask) Bytes() ([]byte, error)

func (*GlobalStateUpdateTask) Descriptor

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

func (*GlobalStateUpdateTask) GetIsBackward

func (m *GlobalStateUpdateTask) GetIsBackward() bool

func (*GlobalStateUpdateTask) GetTarget

func (m *GlobalStateUpdateTask) GetTarget() []byte

func (*GlobalStateUpdateTask) GetTargetEdgeBeg

func (m *GlobalStateUpdateTask) GetTargetEdgeBeg() []byte

func (*GlobalStateUpdateTask) GetTargetEdgeEnd

func (m *GlobalStateUpdateTask) GetTargetEdgeEnd() []byte

func (*GlobalStateUpdateTask) GetTargetId

func (m *GlobalStateUpdateTask) GetTargetId() uint64

func (*GlobalStateUpdateTask) ProtoMessage

func (*GlobalStateUpdateTask) ProtoMessage()

func (*GlobalStateUpdateTask) Reset

func (m *GlobalStateUpdateTask) Reset()

func (*GlobalStateUpdateTask) String

func (m *GlobalStateUpdateTask) String() string

func (*GlobalStateUpdateTask) XXX_DiscardUnknown

func (m *GlobalStateUpdateTask) XXX_DiscardUnknown()

func (*GlobalStateUpdateTask) XXX_Marshal

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

func (*GlobalStateUpdateTask) XXX_Merge

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

func (*GlobalStateUpdateTask) XXX_Size

func (m *GlobalStateUpdateTask) XXX_Size() int

func (*GlobalStateUpdateTask) XXX_Unmarshal

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

type GossipClient

type GossipClient interface {
	// Request a new stream for bi-direction gossip
	// We must sent a peerId first for merging the stream with chatting,
	// This can't be achieve by protobuf and we had to imple it manually
	In(ctx context.Context, opts ...grpc.CallOption) (Gossip_InClient, error)
}

GossipClient is the client API for Gossip service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewGossipClient

func NewGossipClient(cc *grpc.ClientConn) GossipClient

type GossipMsg

type GossipMsg struct {
	//all the gossip message (with different catalog) MUST share the
	//same series of seq
	Seq     uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"`
	Catalog string `protobuf:"bytes,2,opt,name=catalog,proto3" json:"catalog,omitempty"`
	// Types that are valid to be assigned to M:
	//	*GossipMsg_Dig
	//	*GossipMsg_Ud
	M                    isGossipMsg_M `protobuf_oneof:"m"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

func (*GossipMsg) Descriptor

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

func (*GossipMsg) EstimateSize

func (m *GossipMsg) EstimateSize() (total int)

the max size is limited by the msg size in grpc, so no overflow problem it was just an estimation of the whole size of package

func (*GossipMsg) GetCatalog

func (m *GossipMsg) GetCatalog() string

func (*GossipMsg) GetDig

func (m *GossipMsg) GetDig() *GossipMsg_Digest

func (*GossipMsg) GetM

func (m *GossipMsg) GetM() isGossipMsg_M

func (*GossipMsg) GetSeq

func (m *GossipMsg) GetSeq() uint64

func (*GossipMsg) GetUd

func (m *GossipMsg) GetUd() *GossipMsg_Update

func (*GossipMsg) ProtoMessage

func (*GossipMsg) ProtoMessage()

func (*GossipMsg) Reset

func (m *GossipMsg) Reset()

func (*GossipMsg) String

func (m *GossipMsg) String() string

func (*GossipMsg) XXX_DiscardUnknown

func (m *GossipMsg) XXX_DiscardUnknown()

func (*GossipMsg) XXX_Marshal

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

func (*GossipMsg) XXX_Merge

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

func (*GossipMsg) XXX_OneofFuncs

func (*GossipMsg) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*GossipMsg) XXX_Size

func (m *GossipMsg) XXX_Size() int

func (*GossipMsg) XXX_Unmarshal

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

type GossipMsg_Dig

type GossipMsg_Dig struct {
	Dig *GossipMsg_Digest `protobuf:"bytes,3,opt,name=dig,proto3,oneof"`
}

type GossipMsg_Digest

type GossipMsg_Digest struct {
	// Types that are valid to be assigned to D:
	//	*GossipMsg_Digest_Peer
	//	*GossipMsg_Digest_Tx
	D                    isGossipMsg_Digest_D `protobuf_oneof:"d"`
	NoResp               bool                 `protobuf:"varint,4,opt,name=noResp,proto3" json:"noResp,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*GossipMsg_Digest) Descriptor

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

func (*GossipMsg_Digest) GetD

func (m *GossipMsg_Digest) GetD() isGossipMsg_Digest_D

func (*GossipMsg_Digest) GetNoResp

func (m *GossipMsg_Digest) GetNoResp() bool

func (*GossipMsg_Digest) GetPeer

func (*GossipMsg_Digest) GetTx

func (*GossipMsg_Digest) ProtoMessage

func (*GossipMsg_Digest) ProtoMessage()

func (*GossipMsg_Digest) Reset

func (m *GossipMsg_Digest) Reset()

func (*GossipMsg_Digest) String

func (m *GossipMsg_Digest) String() string

func (*GossipMsg_Digest) XXX_DiscardUnknown

func (m *GossipMsg_Digest) XXX_DiscardUnknown()

func (*GossipMsg_Digest) XXX_Marshal

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

func (*GossipMsg_Digest) XXX_Merge

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

func (*GossipMsg_Digest) XXX_OneofFuncs

func (*GossipMsg_Digest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*GossipMsg_Digest) XXX_Size

func (m *GossipMsg_Digest) XXX_Size() int

func (*GossipMsg_Digest) XXX_Unmarshal

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

type GossipMsg_Digest_Peer

type GossipMsg_Digest_Peer struct {
	Peer *GossipMsg_Digest_PeerStates `protobuf:"bytes,6,opt,name=peer,proto3,oneof"`
}

type GossipMsg_Digest_PeerState

type GossipMsg_Digest_PeerState struct {
	State                []byte   `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"`
	Num                  uint64   `protobuf:"varint,2,opt,name=num,proto3" json:"num,omitempty"`
	PeerName             string   `protobuf:"bytes,3,opt,name=peerName,proto3" json:"peerName,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GossipMsg_Digest_PeerState) Descriptor

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

func (*GossipMsg_Digest_PeerState) GetNum

func (m *GossipMsg_Digest_PeerState) GetNum() uint64

func (*GossipMsg_Digest_PeerState) GetPeerName

func (m *GossipMsg_Digest_PeerState) GetPeerName() string

func (*GossipMsg_Digest_PeerState) GetState

func (m *GossipMsg_Digest_PeerState) GetState() []byte

func (*GossipMsg_Digest_PeerState) ProtoMessage

func (*GossipMsg_Digest_PeerState) ProtoMessage()

func (*GossipMsg_Digest_PeerState) Reset

func (m *GossipMsg_Digest_PeerState) Reset()

func (*GossipMsg_Digest_PeerState) String

func (m *GossipMsg_Digest_PeerState) String() string

func (*GossipMsg_Digest_PeerState) XXX_DiscardUnknown

func (m *GossipMsg_Digest_PeerState) XXX_DiscardUnknown()

func (*GossipMsg_Digest_PeerState) XXX_Marshal

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

func (*GossipMsg_Digest_PeerState) XXX_Merge

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

func (*GossipMsg_Digest_PeerState) XXX_Size

func (m *GossipMsg_Digest_PeerState) XXX_Size() int

func (*GossipMsg_Digest_PeerState) XXX_Unmarshal

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

type GossipMsg_Digest_PeerStates

type GossipMsg_Digest_PeerStates struct {
	Epoch                []byte                        `protobuf:"bytes,1,opt,name=epoch,proto3" json:"epoch,omitempty"`
	IsFull               bool                          `protobuf:"varint,2,opt,name=isFull,proto3" json:"isFull,omitempty"`
	PeerD                []*GossipMsg_Digest_PeerState `protobuf:"bytes,3,rep,name=peerD,proto3" json:"peerD,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                      `json:"-"`
	XXX_unrecognized     []byte                        `json:"-"`
	XXX_sizecache        int32                         `json:"-"`
}

func (*GossipMsg_Digest_PeerStates) Descriptor

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

func (*GossipMsg_Digest_PeerStates) GetEpoch

func (m *GossipMsg_Digest_PeerStates) GetEpoch() []byte

func (*GossipMsg_Digest_PeerStates) GetIsFull

func (m *GossipMsg_Digest_PeerStates) GetIsFull() bool

func (*GossipMsg_Digest_PeerStates) GetPeerD

func (*GossipMsg_Digest_PeerStates) ProtoMessage

func (*GossipMsg_Digest_PeerStates) ProtoMessage()

func (*GossipMsg_Digest_PeerStates) Reset

func (m *GossipMsg_Digest_PeerStates) Reset()

func (*GossipMsg_Digest_PeerStates) String

func (m *GossipMsg_Digest_PeerStates) String() string

func (*GossipMsg_Digest_PeerStates) XXX_DiscardUnknown

func (m *GossipMsg_Digest_PeerStates) XXX_DiscardUnknown()

func (*GossipMsg_Digest_PeerStates) XXX_Marshal

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

func (*GossipMsg_Digest_PeerStates) XXX_Merge

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

func (*GossipMsg_Digest_PeerStates) XXX_Size

func (m *GossipMsg_Digest_PeerStates) XXX_Size() int

func (*GossipMsg_Digest_PeerStates) XXX_Unmarshal

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

type GossipMsg_Digest_Tx

type GossipMsg_Digest_Tx struct {
	Tx *GossipMsg_Digest_TxStates `protobuf:"bytes,7,opt,name=tx,proto3,oneof"`
}

type GossipMsg_Digest_TxStates

type GossipMsg_Digest_TxStates struct {
	TxID                 []string `protobuf:"bytes,1,rep,name=txID,proto3" json:"txID,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GossipMsg_Digest_TxStates) Descriptor

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

func (*GossipMsg_Digest_TxStates) GetTxID

func (m *GossipMsg_Digest_TxStates) GetTxID() []string

func (*GossipMsg_Digest_TxStates) ProtoMessage

func (*GossipMsg_Digest_TxStates) ProtoMessage()

func (*GossipMsg_Digest_TxStates) Reset

func (m *GossipMsg_Digest_TxStates) Reset()

func (*GossipMsg_Digest_TxStates) String

func (m *GossipMsg_Digest_TxStates) String() string

func (*GossipMsg_Digest_TxStates) XXX_DiscardUnknown

func (m *GossipMsg_Digest_TxStates) XXX_DiscardUnknown()

func (*GossipMsg_Digest_TxStates) XXX_Marshal

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

func (*GossipMsg_Digest_TxStates) XXX_Merge

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

func (*GossipMsg_Digest_TxStates) XXX_Size

func (m *GossipMsg_Digest_TxStates) XXX_Size() int

func (*GossipMsg_Digest_TxStates) XXX_Unmarshal

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

type GossipMsg_Ud

type GossipMsg_Ud struct {
	Ud *GossipMsg_Update `protobuf:"bytes,4,opt,name=ud,proto3,oneof"`
}

type GossipMsg_Update

type GossipMsg_Update struct {
	// Types that are valid to be assigned to U:
	//	*GossipMsg_Update_Txs
	//	*GossipMsg_Update_State
	//	*GossipMsg_Update_TxBlock
	U isGossipMsg_Update_U `protobuf_oneof:"u"`
	//we still keep payload field for some extended using (i.e. testing)
	Payload              []byte   `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GossipMsg_Update) Descriptor

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

func (*GossipMsg_Update) GetPayload

func (m *GossipMsg_Update) GetPayload() []byte

func (*GossipMsg_Update) GetState

func (m *GossipMsg_Update) GetState() *Gossip_TxState

func (*GossipMsg_Update) GetTxBlock

func (m *GossipMsg_Update) GetTxBlock() *HotTransactionBlock

func (*GossipMsg_Update) GetTxs

func (m *GossipMsg_Update) GetTxs() *Gossip_Tx

func (*GossipMsg_Update) GetU

func (m *GossipMsg_Update) GetU() isGossipMsg_Update_U

func (*GossipMsg_Update) ProtoMessage

func (*GossipMsg_Update) ProtoMessage()

func (*GossipMsg_Update) Reset

func (m *GossipMsg_Update) Reset()

func (*GossipMsg_Update) String

func (m *GossipMsg_Update) String() string

func (*GossipMsg_Update) XXX_DiscardUnknown

func (m *GossipMsg_Update) XXX_DiscardUnknown()

func (*GossipMsg_Update) XXX_Marshal

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

func (*GossipMsg_Update) XXX_Merge

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

func (*GossipMsg_Update) XXX_OneofFuncs

func (*GossipMsg_Update) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*GossipMsg_Update) XXX_Size

func (m *GossipMsg_Update) XXX_Size() int

func (*GossipMsg_Update) XXX_Unmarshal

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

type GossipMsg_Update_State

type GossipMsg_Update_State struct {
	State *Gossip_TxState `protobuf:"bytes,3,opt,name=state,proto3,oneof"`
}

type GossipMsg_Update_TxBlock

type GossipMsg_Update_TxBlock struct {
	TxBlock *HotTransactionBlock `protobuf:"bytes,4,opt,name=txBlock,proto3,oneof"`
}

type GossipMsg_Update_Txs

type GossipMsg_Update_Txs struct {
	Txs *Gossip_Tx `protobuf:"bytes,2,opt,name=txs,proto3,oneof"`
}

type GossipServer

type GossipServer interface {
	// Request a new stream for bi-direction gossip
	// We must sent a peerId first for merging the stream with chatting,
	// This can't be achieve by protobuf and we had to imple it manually
	In(Gossip_InServer) error
}

GossipServer is the server API for Gossip service.

type Gossip_InClient

type Gossip_InClient interface {
	Send(*GossipMsg) error
	Recv() (*GossipMsg, error)
	grpc.ClientStream
}

type Gossip_InServer

type Gossip_InServer interface {
	Send(*GossipMsg) error
	Recv() (*GossipMsg, error)
	grpc.ServerStream
}

type Gossip_Tx

type Gossip_Tx struct {
	Txs                  map[string]*HotTransactionBlock `` /* 147-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}                        `json:"-"`
	XXX_unrecognized     []byte                          `json:"-"`
	XXX_sizecache        int32                           `json:"-"`
}

func (*Gossip_Tx) Descriptor

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

func (*Gossip_Tx) GetTxs

func (m *Gossip_Tx) GetTxs() map[string]*HotTransactionBlock

func (*Gossip_Tx) ProtoMessage

func (*Gossip_Tx) ProtoMessage()

func (*Gossip_Tx) Reset

func (m *Gossip_Tx) Reset()

func (*Gossip_Tx) String

func (m *Gossip_Tx) String() string

func (*Gossip_Tx) XXX_DiscardUnknown

func (m *Gossip_Tx) XXX_DiscardUnknown()

func (*Gossip_Tx) XXX_Marshal

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

func (*Gossip_Tx) XXX_Merge

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

func (*Gossip_Tx) XXX_Size

func (m *Gossip_Tx) XXX_Size() int

func (*Gossip_Tx) XXX_Unmarshal

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

type Gossip_TxState

type Gossip_TxState struct {
	Txs                  map[string]*PeerTxState `` /* 147-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
	XXX_unrecognized     []byte                  `json:"-"`
	XXX_sizecache        int32                   `json:"-"`
}

func (*Gossip_TxState) Descriptor

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

func (*Gossip_TxState) GetTxs

func (m *Gossip_TxState) GetTxs() map[string]*PeerTxState

func (*Gossip_TxState) ProtoMessage

func (*Gossip_TxState) ProtoMessage()

func (*Gossip_TxState) Reset

func (m *Gossip_TxState) Reset()

func (*Gossip_TxState) String

func (m *Gossip_TxState) String() string

func (*Gossip_TxState) XXX_DiscardUnknown

func (m *Gossip_TxState) XXX_DiscardUnknown()

func (*Gossip_TxState) XXX_Marshal

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

func (*Gossip_TxState) XXX_Merge

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

func (*Gossip_TxState) XXX_Size

func (m *Gossip_TxState) XXX_Size() int

func (*Gossip_TxState) XXX_Unmarshal

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

type HelloMessage

type HelloMessage struct {
	PeerEndpoint *PeerEndpoint `protobuf:"bytes,1,opt,name=peerEndpoint,proto3" json:"peerEndpoint,omitempty"`
	//BlockchainInfo blockchainInfo = 2;
	//this is the credential of remote peer, not ours, so the
	//receiver could not replay or rely this message for
	//mal-using
	PeerCredential       []byte   `protobuf:"bytes,3,opt,name=peerCredential,proto3" json:"peerCredential,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*HelloMessage) Descriptor

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

func (*HelloMessage) GetPeerCredential

func (m *HelloMessage) GetPeerCredential() []byte

func (*HelloMessage) GetPeerEndpoint

func (m *HelloMessage) GetPeerEndpoint() *PeerEndpoint

func (*HelloMessage) ProtoMessage

func (*HelloMessage) ProtoMessage()

func (*HelloMessage) Reset

func (m *HelloMessage) Reset()

func (*HelloMessage) String

func (m *HelloMessage) String() string

func (*HelloMessage) XXX_DiscardUnknown

func (m *HelloMessage) XXX_DiscardUnknown()

func (*HelloMessage) XXX_Marshal

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

func (*HelloMessage) XXX_Merge

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

func (*HelloMessage) XXX_Size

func (m *HelloMessage) XXX_Size() int

func (*HelloMessage) XXX_Unmarshal

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

type HotTransactionBlock

type HotTransactionBlock struct {
	Transactions         []*Transaction `protobuf:"bytes,1,rep,name=transactions,proto3" json:"transactions,omitempty"`
	BeginSeries          uint64         `protobuf:"varint,2,opt,name=beginSeries,proto3" json:"beginSeries,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

TransactionBlock carries a batch of transactions.

func (*HotTransactionBlock) Descriptor

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

func (*HotTransactionBlock) GetBeginSeries

func (m *HotTransactionBlock) GetBeginSeries() uint64

func (*HotTransactionBlock) GetTransactions

func (m *HotTransactionBlock) GetTransactions() []*Transaction

func (*HotTransactionBlock) ProtoMessage

func (*HotTransactionBlock) ProtoMessage()

func (*HotTransactionBlock) Reset

func (m *HotTransactionBlock) Reset()

func (*HotTransactionBlock) String

func (m *HotTransactionBlock) String() string

func (*HotTransactionBlock) XXX_DiscardUnknown

func (m *HotTransactionBlock) XXX_DiscardUnknown()

func (*HotTransactionBlock) XXX_Marshal

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

func (*HotTransactionBlock) XXX_Merge

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

func (*HotTransactionBlock) XXX_Size

func (m *HotTransactionBlock) XXX_Size() int

func (*HotTransactionBlock) XXX_Unmarshal

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

type Interest

type Interest struct {
	EventType EventType `protobuf:"varint,1,opt,name=eventType,proto3,enum=protos.EventType" json:"eventType,omitempty"`
	//Ideally we should just have the following oneof for different
	//Reg types and get rid of EventType. But this is an API change
	//Additional Reg types may add messages specific to their type
	//to the oneof.
	//
	// Types that are valid to be assigned to RegInfo:
	//	*Interest_ChaincodeRegInfo
	RegInfo              isInterest_RegInfo `protobuf_oneof:"RegInfo"`
	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
	XXX_unrecognized     []byte             `json:"-"`
	XXX_sizecache        int32              `json:"-"`
}

func (*Interest) Descriptor

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

func (*Interest) GetChaincodeRegInfo

func (m *Interest) GetChaincodeRegInfo() *ChaincodeReg

func (*Interest) GetEventType

func (m *Interest) GetEventType() EventType

func (*Interest) GetRegInfo

func (m *Interest) GetRegInfo() isInterest_RegInfo

func (*Interest) ProtoMessage

func (*Interest) ProtoMessage()

func (*Interest) Reset

func (m *Interest) Reset()

func (*Interest) String

func (m *Interest) String() string

func (*Interest) XXX_DiscardUnknown

func (m *Interest) XXX_DiscardUnknown()

func (*Interest) XXX_Marshal

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

func (*Interest) XXX_Merge

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

func (*Interest) XXX_OneofFuncs

func (*Interest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*Interest) XXX_Size

func (m *Interest) XXX_Size() int

func (*Interest) XXX_Unmarshal

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

type Interest_ChaincodeRegInfo

type Interest_ChaincodeRegInfo struct {
	ChaincodeRegInfo *ChaincodeReg `protobuf:"bytes,2,opt,name=chaincodeRegInfo,proto3,oneof"`
}

type LedgerState

type LedgerState struct {
	Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
	//hash of headblock, it has limited usage but we still keep it
	HeadBlock []byte `protobuf:"bytes,2,opt,name=headBlock,proto3" json:"headBlock,omitempty"`
	//states which can be synced by the peer
	States               *StateFilter `protobuf:"bytes,5,opt,name=states,proto3" json:"states,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

simple state sync via msg-pushing

func (*LedgerState) Descriptor

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

func (*LedgerState) GetHeadBlock

func (m *LedgerState) GetHeadBlock() []byte

func (*LedgerState) GetHeight

func (m *LedgerState) GetHeight() uint64

func (*LedgerState) GetStates

func (m *LedgerState) GetStates() *StateFilter

func (*LedgerState) ProtoMessage

func (*LedgerState) ProtoMessage()

func (*LedgerState) Reset

func (m *LedgerState) Reset()

func (*LedgerState) String

func (m *LedgerState) String() string

func (*LedgerState) XXX_DiscardUnknown

func (m *LedgerState) XXX_DiscardUnknown()

func (*LedgerState) XXX_Marshal

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

func (*LedgerState) XXX_Merge

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

func (*LedgerState) XXX_Size

func (m *LedgerState) XXX_Size() int

func (*LedgerState) XXX_Unmarshal

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

type Message

type Message struct {
	Type                 Message_Type         `protobuf:"varint,1,opt,name=type,proto3,enum=protos.Message_Type" json:"type,omitempty"`
	Timestamp            *timestamp.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Payload              []byte               `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
	Signature            []byte               `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*Message) Descriptor

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

func (*Message) GetPayload

func (m *Message) GetPayload() []byte

func (*Message) GetSignature

func (m *Message) GetSignature() []byte

func (*Message) GetTimestamp

func (m *Message) GetTimestamp() *timestamp.Timestamp

func (*Message) GetType

func (m *Message) GetType() Message_Type

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) Reset

func (m *Message) Reset()

func (*Message) String

func (m *Message) String() string

func (*Message) XXX_DiscardUnknown

func (m *Message) XXX_DiscardUnknown()

func (*Message) XXX_Marshal

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

func (*Message) XXX_Merge

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

func (*Message) XXX_Size

func (m *Message) XXX_Size() int

func (*Message) XXX_Unmarshal

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

type Message_Type

type Message_Type int32
const (
	Message_UNDEFINED               Message_Type = 0
	Message_DISC_HELLO              Message_Type = 1
	Message_DISC_DISCONNECT         Message_Type = 2
	Message_DISC_GET_PEERS          Message_Type = 3
	Message_DISC_PEERS              Message_Type = 4
	Message_DISC_GET_CRED           Message_Type = 5
	Message_CHAIN_TRANSACTION       Message_Type = 6
	Message_SYNC_GET_BLOCKS         Message_Type = 11
	Message_SYNC_BLOCKS             Message_Type = 12
	Message_SYNC_BLOCK_ADDED        Message_Type = 13
	Message_SYNC_STATE_GET_SNAPSHOT Message_Type = 14
	Message_SYNC_STATE_SNAPSHOT     Message_Type = 15
	Message_SYNC_STATE_GET_DELTAS   Message_Type = 16
	Message_SYNC_STATE_DELTAS       Message_Type = 17
	Message_RESPONSE                Message_Type = 20
	Message_CONSENSUS               Message_Type = 21
)

func (Message_Type) EnumDescriptor

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

func (Message_Type) String

func (x Message_Type) String() string

type NonHashData

type NonHashData struct {
	LocalLedgerCommitTimestamp *timestamp.Timestamp `protobuf:"bytes,1,opt,name=localLedgerCommitTimestamp,proto3" json:"localLedgerCommitTimestamp,omitempty"`
	ChaincodeEvents            []*ChaincodeEvent    `protobuf:"bytes,2,rep,name=chaincodeEvents,proto3" json:"chaincodeEvents,omitempty"`
	XXX_NoUnkeyedLiteral       struct{}             `json:"-"`
	XXX_unrecognized           []byte               `json:"-"`
	XXX_sizecache              int32                `json:"-"`
}

NonHashData is data that is recorded on the block, but not included in the block hash when verifying the blockchain. localLedgerCommitTimestamp - The time at which the block was added to the ledger on the local peer. chaincodeEvent - is an array ChaincodeEvents, one per transaction in the block

func (*NonHashData) Descriptor

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

func (*NonHashData) GetChaincodeEvents

func (m *NonHashData) GetChaincodeEvents() []*ChaincodeEvent

func (*NonHashData) GetLocalLedgerCommitTimestamp

func (m *NonHashData) GetLocalLedgerCommitTimestamp() *timestamp.Timestamp

func (*NonHashData) ProtoMessage

func (*NonHashData) ProtoMessage()

func (*NonHashData) Reset

func (m *NonHashData) Reset()

func (*NonHashData) String

func (m *NonHashData) String() string

func (*NonHashData) XXX_DiscardUnknown

func (m *NonHashData) XXX_DiscardUnknown()

func (*NonHashData) XXX_Marshal

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

func (*NonHashData) XXX_Merge

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

func (*NonHashData) XXX_Size

func (m *NonHashData) XXX_Size() int

func (*NonHashData) XXX_Unmarshal

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

type OpenSession

type OpenSession struct {
	Transfer *TransferDetail `protobuf:"bytes,1,opt,name=transfer,proto3" json:"transfer,omitempty"`
	// Types that are valid to be assigned to For:
	//	*OpenSession_Query
	//	*OpenSession_Index
	//	*OpenSession_Fullstate
	//	*OpenSession_BlocksOrDelta
	For                  isOpenSession_For `protobuf_oneof:"for"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

request to open a long hold transferring client must specified a "open for" field so server can prepare for the following transfermation process, or simply reject it

func (*OpenSession) Descriptor

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

func (*OpenSession) GetBlocksOrDelta

func (m *OpenSession) GetBlocksOrDelta() uint64

func (*OpenSession) GetFor

func (m *OpenSession) GetFor() isOpenSession_For

func (*OpenSession) GetFullstate

func (m *OpenSession) GetFullstate() []byte

func (*OpenSession) GetIndex

func (m *OpenSession) GetIndex() []byte

func (*OpenSession) GetQuery

func (m *OpenSession) GetQuery() *empty.Empty

func (*OpenSession) GetTransfer

func (m *OpenSession) GetTransfer() *TransferDetail

func (*OpenSession) ProtoMessage

func (*OpenSession) ProtoMessage()

func (*OpenSession) Reset

func (m *OpenSession) Reset()

func (*OpenSession) String

func (m *OpenSession) String() string

func (*OpenSession) XXX_DiscardUnknown

func (m *OpenSession) XXX_DiscardUnknown()

func (*OpenSession) XXX_Marshal

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

func (*OpenSession) XXX_Merge

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

func (*OpenSession) XXX_OneofFuncs

func (*OpenSession) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*OpenSession) XXX_Size

func (m *OpenSession) XXX_Size() int

func (*OpenSession) XXX_Unmarshal

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

type OpenSession_BlocksOrDelta

type OpenSession_BlocksOrDelta struct {
	BlocksOrDelta uint64 `protobuf:"varint,5,opt,name=blocksOrDelta,proto3,oneof"`
}

type OpenSession_Fullstate

type OpenSession_Fullstate struct {
	Fullstate []byte `protobuf:"bytes,4,opt,name=fullstate,proto3,oneof"`
}

type OpenSession_Index

type OpenSession_Index struct {
	Index []byte `protobuf:"bytes,3,opt,name=index,proto3,oneof"`
}

type OpenSession_Query

type OpenSession_Query struct {
	Query *empty.Empty `protobuf:"bytes,2,opt,name=query,proto3,oneof"`
}

type OpenchainClient

type OpenchainClient interface {
	// GetBlockchainInfo returns information about the blockchain ledger such as
	// height, current block hash, and previous block hash.
	GetBlockchainInfo(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*BlockchainInfo, error)
	// GetBlockByNumber returns the data contained within a specific block in the
	// blockchain. The genesis block is block zero.
	GetBlockByNumber(ctx context.Context, in *BlockNumber, opts ...grpc.CallOption) (*Block, error)
	// GetBlockCount returns the current number of blocks in the blockchain data
	// structure.
	GetBlockCount(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*BlockCount, error)
	// returns a transaction by its txid
	GetTransactionByID(ctx context.Context, in *wrappers.StringValue, opts ...grpc.CallOption) (*Transaction, error)
	// GetPeers returns a list of all peer nodes currently connected to the target
	// peer.
	GetPeers(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*PeersMessage, error)
	// GetPeerEndpoint returns self peer node
	GetPeerEndpoint(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*PeersMessage, error)
}

OpenchainClient is the client API for Openchain service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewOpenchainClient

func NewOpenchainClient(cc *grpc.ClientConn) OpenchainClient

type OpenchainServer

type OpenchainServer interface {
	// GetBlockchainInfo returns information about the blockchain ledger such as
	// height, current block hash, and previous block hash.
	GetBlockchainInfo(context.Context, *empty.Empty) (*BlockchainInfo, error)
	// GetBlockByNumber returns the data contained within a specific block in the
	// blockchain. The genesis block is block zero.
	GetBlockByNumber(context.Context, *BlockNumber) (*Block, error)
	// GetBlockCount returns the current number of blocks in the blockchain data
	// structure.
	GetBlockCount(context.Context, *empty.Empty) (*BlockCount, error)
	// returns a transaction by its txid
	GetTransactionByID(context.Context, *wrappers.StringValue) (*Transaction, error)
	// GetPeers returns a list of all peer nodes currently connected to the target
	// peer.
	GetPeers(context.Context, *empty.Empty) (*PeersMessage, error)
	// GetPeerEndpoint returns self peer node
	GetPeerEndpoint(context.Context, *empty.Empty) (*PeersMessage, error)
}

OpenchainServer is the server API for Openchain service.

type PeerAddress

type PeerAddress struct {
	Host                 string   `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
	Port                 int32    `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PeerAddress) Descriptor

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

func (*PeerAddress) GetHost

func (m *PeerAddress) GetHost() string

func (*PeerAddress) GetPort

func (m *PeerAddress) GetPort() int32

func (*PeerAddress) ProtoMessage

func (*PeerAddress) ProtoMessage()

func (*PeerAddress) Reset

func (m *PeerAddress) Reset()

func (*PeerAddress) String

func (m *PeerAddress) String() string

func (*PeerAddress) XXX_DiscardUnknown

func (m *PeerAddress) XXX_DiscardUnknown()

func (*PeerAddress) XXX_Marshal

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

func (*PeerAddress) XXX_Merge

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

func (*PeerAddress) XXX_Size

func (m *PeerAddress) XXX_Size() int

func (*PeerAddress) XXX_Unmarshal

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

type PeerClient

type PeerClient interface {
	// Accepts a stream of Message during chat session, while receiving
	// other Message (e.g. from other peers).
	Chat(ctx context.Context, opts ...grpc.CallOption) (Peer_ChatClient, error)
	// Process a transaction from a remote source.
	ProcessTransaction(ctx context.Context, in *Transaction, opts ...grpc.CallOption) (*Response, error)
}

PeerClient is the client API for Peer service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewPeerClient

func NewPeerClient(cc *grpc.ClientConn) PeerClient

type PeerEndpoint

type PeerEndpoint struct {
	ID                   *PeerID           `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Address              string            `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	Type                 PeerEndpoint_Type `protobuf:"varint,3,opt,name=type,proto3,enum=protos.PeerEndpoint_Type" json:"type,omitempty"`
	PkiID                []byte            `protobuf:"bytes,4,opt,name=pkiID,proto3" json:"pkiID,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*PeerEndpoint) Descriptor

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

func (*PeerEndpoint) GetAddress

func (m *PeerEndpoint) GetAddress() string

func (*PeerEndpoint) GetID

func (m *PeerEndpoint) GetID() *PeerID

func (*PeerEndpoint) GetPkiID

func (m *PeerEndpoint) GetPkiID() []byte

func (*PeerEndpoint) GetType

func (m *PeerEndpoint) GetType() PeerEndpoint_Type

func (*PeerEndpoint) ProtoMessage

func (*PeerEndpoint) ProtoMessage()

func (*PeerEndpoint) Reset

func (m *PeerEndpoint) Reset()

func (*PeerEndpoint) String

func (m *PeerEndpoint) String() string

func (*PeerEndpoint) XXX_DiscardUnknown

func (m *PeerEndpoint) XXX_DiscardUnknown()

func (*PeerEndpoint) XXX_Marshal

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

func (*PeerEndpoint) XXX_Merge

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

func (*PeerEndpoint) XXX_Size

func (m *PeerEndpoint) XXX_Size() int

func (*PeerEndpoint) XXX_Unmarshal

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

type PeerEndpoint_Type

type PeerEndpoint_Type int32
const (
	PeerEndpoint_UNDEFINED     PeerEndpoint_Type = 0
	PeerEndpoint_VALIDATOR     PeerEndpoint_Type = 1
	PeerEndpoint_NON_VALIDATOR PeerEndpoint_Type = 2
)

func (PeerEndpoint_Type) EnumDescriptor

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

func (PeerEndpoint_Type) String

func (x PeerEndpoint_Type) String() string

type PeerID

type PeerID struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PeerID) Descriptor

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

func (*PeerID) GetName

func (m *PeerID) GetName() string

func (*PeerID) ProtoMessage

func (*PeerID) ProtoMessage()

func (*PeerID) Reset

func (m *PeerID) Reset()

func (*PeerID) String

func (m *PeerID) String() string

func (*PeerID) XXX_DiscardUnknown

func (m *PeerID) XXX_DiscardUnknown()

func (*PeerID) XXX_Marshal

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

func (*PeerID) XXX_Merge

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

func (*PeerID) XXX_Size

func (m *PeerID) XXX_Size() int

func (*PeerID) XXX_Unmarshal

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

type PeerIDOnStream

type PeerIDOnStream struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Passw                []byte   `protobuf:"bytes,2,opt,name=passw,proto3" json:"passw,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

extended peerid for connection in separated streams, company with the one-time password

func (*PeerIDOnStream) Descriptor

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

func (*PeerIDOnStream) GetName

func (m *PeerIDOnStream) GetName() string

func (*PeerIDOnStream) GetPassw

func (m *PeerIDOnStream) GetPassw() []byte

func (*PeerIDOnStream) ProtoMessage

func (*PeerIDOnStream) ProtoMessage()

func (*PeerIDOnStream) Reset

func (m *PeerIDOnStream) Reset()

func (*PeerIDOnStream) String

func (m *PeerIDOnStream) String() string

func (*PeerIDOnStream) XXX_DiscardUnknown

func (m *PeerIDOnStream) XXX_DiscardUnknown()

func (*PeerIDOnStream) XXX_Marshal

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

func (*PeerIDOnStream) XXX_Merge

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

func (*PeerIDOnStream) XXX_Size

func (m *PeerIDOnStream) XXX_Size() int

func (*PeerIDOnStream) XXX_Unmarshal

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

type PeerServer

type PeerServer interface {
	// Accepts a stream of Message during chat session, while receiving
	// other Message (e.g. from other peers).
	Chat(Peer_ChatServer) error
	// Process a transaction from a remote source.
	ProcessTransaction(context.Context, *Transaction) (*Response, error)
}

PeerServer is the server API for Peer service.

type PeerTxState

type PeerTxState struct {
	Digest               []byte   `protobuf:"bytes,1,opt,name=digest,proto3" json:"digest,omitempty"`
	Num                  uint64   `protobuf:"varint,2,opt,name=num,proto3" json:"num,omitempty"`
	Signature            []byte   `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"`
	Endorsement          []byte   `protobuf:"bytes,6,opt,name=endorsement,proto3" json:"endorsement,omitempty"`
	EndorsementVer       uint32   `protobuf:"varint,7,opt,name=endorsementVer,proto3" json:"endorsementVer,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PeerTxState) Descriptor

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

func (*PeerTxState) GetDigest

func (m *PeerTxState) GetDigest() []byte

func (*PeerTxState) GetEndorsement

func (m *PeerTxState) GetEndorsement() []byte

func (*PeerTxState) GetEndorsementVer

func (m *PeerTxState) GetEndorsementVer() uint32

func (*PeerTxState) GetNum

func (m *PeerTxState) GetNum() uint64

func (*PeerTxState) GetSignature

func (m *PeerTxState) GetSignature() []byte

func (*PeerTxState) MsgEncode

func (s *PeerTxState) MsgEncode(id []byte) ([]byte, error)

generate a consistent byte represent

func (*PeerTxState) ProtoMessage

func (*PeerTxState) ProtoMessage()

func (*PeerTxState) Reset

func (m *PeerTxState) Reset()

func (*PeerTxState) String

func (m *PeerTxState) String() string

func (*PeerTxState) XXX_DiscardUnknown

func (m *PeerTxState) XXX_DiscardUnknown()

func (*PeerTxState) XXX_Marshal

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

func (*PeerTxState) XXX_Merge

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

func (*PeerTxState) XXX_Size

func (m *PeerTxState) XXX_Size() int

func (*PeerTxState) XXX_Unmarshal

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

type Peer_ChatClient

type Peer_ChatClient interface {
	Send(*Message) error
	Recv() (*Message, error)
	grpc.ClientStream
}

type Peer_ChatServer

type Peer_ChatServer interface {
	Send(*Message) error
	Recv() (*Message, error)
	grpc.ServerStream
}

type PeersAddresses

type PeersAddresses struct {
	Addresses            []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PeersAddresses) Descriptor

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

func (*PeersAddresses) GetAddresses

func (m *PeersAddresses) GetAddresses() []string

func (*PeersAddresses) ProtoMessage

func (*PeersAddresses) ProtoMessage()

func (*PeersAddresses) Reset

func (m *PeersAddresses) Reset()

func (*PeersAddresses) String

func (m *PeersAddresses) String() string

func (*PeersAddresses) XXX_DiscardUnknown

func (m *PeersAddresses) XXX_DiscardUnknown()

func (*PeersAddresses) XXX_Marshal

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

func (*PeersAddresses) XXX_Merge

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

func (*PeersAddresses) XXX_Size

func (m *PeersAddresses) XXX_Size() int

func (*PeersAddresses) XXX_Unmarshal

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

type PeersMessage

type PeersMessage struct {
	Peers                []*PeerEndpoint `protobuf:"bytes,1,rep,name=peers,proto3" json:"peers,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (*PeersMessage) Descriptor

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

func (*PeersMessage) GetPeers

func (m *PeersMessage) GetPeers() []*PeerEndpoint

func (*PeersMessage) ProtoMessage

func (*PeersMessage) ProtoMessage()

func (*PeersMessage) Reset

func (m *PeersMessage) Reset()

func (*PeersMessage) String

func (m *PeersMessage) String() string

func (*PeersMessage) XXX_DiscardUnknown

func (m *PeersMessage) XXX_DiscardUnknown()

func (*PeersMessage) XXX_Marshal

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

func (*PeersMessage) XXX_Merge

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

func (*PeersMessage) XXX_Size

func (m *PeersMessage) XXX_Size() int

func (*PeersMessage) XXX_Unmarshal

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

type PickedStreamHandler

type PickedStreamHandler struct {
	Id        *PeerID
	WorkError error
	*StreamHandler
}

type PutStateInfo

type PutStateInfo 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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PutStateInfo) Descriptor

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

func (*PutStateInfo) GetKey

func (m *PutStateInfo) GetKey() string

func (*PutStateInfo) GetValue

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

func (*PutStateInfo) ProtoMessage

func (*PutStateInfo) ProtoMessage()

func (*PutStateInfo) Reset

func (m *PutStateInfo) Reset()

func (*PutStateInfo) String

func (m *PutStateInfo) String() string

func (*PutStateInfo) XXX_DiscardUnknown

func (m *PutStateInfo) XXX_DiscardUnknown()

func (*PutStateInfo) XXX_Marshal

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

func (*PutStateInfo) XXX_Merge

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

func (*PutStateInfo) XXX_Size

func (m *PutStateInfo) XXX_Size() int

func (*PutStateInfo) XXX_Unmarshal

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

type RangeQueryState

type RangeQueryState struct {
	StartKey             string   `protobuf:"bytes,1,opt,name=startKey,proto3" json:"startKey,omitempty"`
	EndKey               string   `protobuf:"bytes,2,opt,name=endKey,proto3" json:"endKey,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RangeQueryState) Descriptor

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

func (*RangeQueryState) GetEndKey

func (m *RangeQueryState) GetEndKey() string

func (*RangeQueryState) GetStartKey

func (m *RangeQueryState) GetStartKey() string

func (*RangeQueryState) ProtoMessage

func (*RangeQueryState) ProtoMessage()

func (*RangeQueryState) Reset

func (m *RangeQueryState) Reset()

func (*RangeQueryState) String

func (m *RangeQueryState) String() string

func (*RangeQueryState) XXX_DiscardUnknown

func (m *RangeQueryState) XXX_DiscardUnknown()

func (*RangeQueryState) XXX_Marshal

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

func (*RangeQueryState) XXX_Merge

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

func (*RangeQueryState) XXX_Size

func (m *RangeQueryState) XXX_Size() int

func (*RangeQueryState) XXX_Unmarshal

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

type RangeQueryStateClose

type RangeQueryStateClose struct {
	ID                   string   `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RangeQueryStateClose) Descriptor

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

func (*RangeQueryStateClose) GetID

func (m *RangeQueryStateClose) GetID() string

func (*RangeQueryStateClose) ProtoMessage

func (*RangeQueryStateClose) ProtoMessage()

func (*RangeQueryStateClose) Reset

func (m *RangeQueryStateClose) Reset()

func (*RangeQueryStateClose) String

func (m *RangeQueryStateClose) String() string

func (*RangeQueryStateClose) XXX_DiscardUnknown

func (m *RangeQueryStateClose) XXX_DiscardUnknown()

func (*RangeQueryStateClose) XXX_Marshal

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

func (*RangeQueryStateClose) XXX_Merge

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

func (*RangeQueryStateClose) XXX_Size

func (m *RangeQueryStateClose) XXX_Size() int

func (*RangeQueryStateClose) XXX_Unmarshal

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

type RangeQueryStateKeyValue

type RangeQueryStateKeyValue 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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RangeQueryStateKeyValue) Descriptor

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

func (*RangeQueryStateKeyValue) GetKey

func (m *RangeQueryStateKeyValue) GetKey() string

func (*RangeQueryStateKeyValue) GetValue

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

func (*RangeQueryStateKeyValue) ProtoMessage

func (*RangeQueryStateKeyValue) ProtoMessage()

func (*RangeQueryStateKeyValue) Reset

func (m *RangeQueryStateKeyValue) Reset()

func (*RangeQueryStateKeyValue) String

func (m *RangeQueryStateKeyValue) String() string

func (*RangeQueryStateKeyValue) XXX_DiscardUnknown

func (m *RangeQueryStateKeyValue) XXX_DiscardUnknown()

func (*RangeQueryStateKeyValue) XXX_Marshal

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

func (*RangeQueryStateKeyValue) XXX_Merge

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

func (*RangeQueryStateKeyValue) XXX_Size

func (m *RangeQueryStateKeyValue) XXX_Size() int

func (*RangeQueryStateKeyValue) XXX_Unmarshal

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

type RangeQueryStateNext

type RangeQueryStateNext struct {
	ID                   string   `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RangeQueryStateNext) Descriptor

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

func (*RangeQueryStateNext) GetID

func (m *RangeQueryStateNext) GetID() string

func (*RangeQueryStateNext) ProtoMessage

func (*RangeQueryStateNext) ProtoMessage()

func (*RangeQueryStateNext) Reset

func (m *RangeQueryStateNext) Reset()

func (*RangeQueryStateNext) String

func (m *RangeQueryStateNext) String() string

func (*RangeQueryStateNext) XXX_DiscardUnknown

func (m *RangeQueryStateNext) XXX_DiscardUnknown()

func (*RangeQueryStateNext) XXX_Marshal

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

func (*RangeQueryStateNext) XXX_Merge

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

func (*RangeQueryStateNext) XXX_Size

func (m *RangeQueryStateNext) XXX_Size() int

func (*RangeQueryStateNext) XXX_Unmarshal

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

type RangeQueryStateResponse

type RangeQueryStateResponse struct {
	KeysAndValues        []*RangeQueryStateKeyValue `protobuf:"bytes,1,rep,name=keysAndValues,proto3" json:"keysAndValues,omitempty"`
	HasMore              bool                       `protobuf:"varint,2,opt,name=hasMore,proto3" json:"hasMore,omitempty"`
	ID                   string                     `protobuf:"bytes,3,opt,name=ID,proto3" json:"ID,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                   `json:"-"`
	XXX_unrecognized     []byte                     `json:"-"`
	XXX_sizecache        int32                      `json:"-"`
}

func (*RangeQueryStateResponse) Descriptor

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

func (*RangeQueryStateResponse) GetHasMore

func (m *RangeQueryStateResponse) GetHasMore() bool

func (*RangeQueryStateResponse) GetID

func (m *RangeQueryStateResponse) GetID() string

func (*RangeQueryStateResponse) GetKeysAndValues

func (m *RangeQueryStateResponse) GetKeysAndValues() []*RangeQueryStateKeyValue

func (*RangeQueryStateResponse) ProtoMessage

func (*RangeQueryStateResponse) ProtoMessage()

func (*RangeQueryStateResponse) Reset

func (m *RangeQueryStateResponse) Reset()

func (*RangeQueryStateResponse) String

func (m *RangeQueryStateResponse) String() string

func (*RangeQueryStateResponse) XXX_DiscardUnknown

func (m *RangeQueryStateResponse) XXX_DiscardUnknown()

func (*RangeQueryStateResponse) XXX_Marshal

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

func (*RangeQueryStateResponse) XXX_Merge

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

func (*RangeQueryStateResponse) XXX_Size

func (m *RangeQueryStateResponse) XXX_Size() int

func (*RangeQueryStateResponse) XXX_Unmarshal

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

type Register

type Register struct {
	Events               []*Interest `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

---------- consumer events --------- Register is sent by consumers for registering events string type - "register"

func (*Register) Descriptor

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

func (*Register) GetEvents

func (m *Register) GetEvents() []*Interest

func (*Register) ProtoMessage

func (*Register) ProtoMessage()

func (*Register) Reset

func (m *Register) Reset()

func (*Register) String

func (m *Register) String() string

func (*Register) XXX_DiscardUnknown

func (m *Register) XXX_DiscardUnknown()

func (*Register) XXX_Marshal

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

func (*Register) XXX_Merge

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

func (*Register) XXX_Size

func (m *Register) XXX_Size() int

func (*Register) XXX_Unmarshal

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

type Rejection

type Rejection struct {
	Tx                   *Transaction `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"`
	ErrorMsg             string       `protobuf:"bytes,2,opt,name=errorMsg,proto3" json:"errorMsg,omitempty"`
	Txid                 string       `protobuf:"bytes,3,opt,name=txid,proto3" json:"txid,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

Rejection is sent by consumers for erroneous transaction rejection events string type - "rejection"

func (*Rejection) Descriptor

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

func (*Rejection) GetErrorMsg

func (m *Rejection) GetErrorMsg() string

func (*Rejection) GetTx

func (m *Rejection) GetTx() *Transaction

func (*Rejection) GetTxid

func (m *Rejection) GetTxid() string

func (*Rejection) ProtoMessage

func (*Rejection) ProtoMessage()

func (*Rejection) Reset

func (m *Rejection) Reset()

func (*Rejection) String

func (m *Rejection) String() string

func (*Rejection) XXX_DiscardUnknown

func (m *Rejection) XXX_DiscardUnknown()

func (*Rejection) XXX_Marshal

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

func (*Rejection) XXX_Merge

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

func (*Rejection) XXX_Size

func (m *Rejection) XXX_Size() int

func (*Rejection) XXX_Unmarshal

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

type RequestError

type RequestError struct {
	ErrorDetail          string   `protobuf:"bytes,1,opt,name=errorDetail,proto3" json:"errorDetail,omitempty"`
	ErrorCode            uint64   `protobuf:"varint,2,opt,name=errorCode,proto3" json:"errorCode,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

can be sent by server during any time of a session

func (*RequestError) Descriptor

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

func (*RequestError) GetErrorCode

func (m *RequestError) GetErrorCode() uint64

func (*RequestError) GetErrorDetail

func (m *RequestError) GetErrorDetail() string

func (*RequestError) ProtoMessage

func (*RequestError) ProtoMessage()

func (*RequestError) Reset

func (m *RequestError) Reset()

func (*RequestError) String

func (m *RequestError) String() string

func (*RequestError) XXX_DiscardUnknown

func (m *RequestError) XXX_DiscardUnknown()

func (*RequestError) XXX_Marshal

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

func (*RequestError) XXX_Merge

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

func (*RequestError) XXX_Size

func (m *RequestError) XXX_Size() int

func (*RequestError) XXX_Unmarshal

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

type Response

type Response struct {
	Status               Response_StatusCode `protobuf:"varint,1,opt,name=status,proto3,enum=protos.Response_StatusCode" json:"status,omitempty"`
	Msg                  []byte              `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	Height               uint64              `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
	XXX_unrecognized     []byte              `json:"-"`
	XXX_sizecache        int32               `json:"-"`
}

func (*Response) Descriptor

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

func (*Response) GetHeight

func (m *Response) GetHeight() uint64

func (*Response) GetMsg

func (m *Response) GetMsg() []byte

func (*Response) GetStatus

func (m *Response) GetStatus() Response_StatusCode

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) String

func (m *Response) String() string

func (*Response) XXX_DiscardUnknown

func (m *Response) XXX_DiscardUnknown()

func (*Response) XXX_Marshal

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

func (*Response) XXX_Merge

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

func (*Response) XXX_Size

func (m *Response) XXX_Size() int

func (*Response) XXX_Unmarshal

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

type Response_StatusCode

type Response_StatusCode int32
const (
	Response_UNDEFINED Response_StatusCode = 0
	Response_SUCCESS   Response_StatusCode = 200
	Response_FAILURE   Response_StatusCode = 500
)

func (Response_StatusCode) EnumDescriptor

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

func (Response_StatusCode) String

func (x Response_StatusCode) String() string

type Secret

type Secret struct {
	EnrollId             string   `protobuf:"bytes,1,opt,name=enrollId,proto3" json:"enrollId,omitempty"`
	EnrollSecret         string   `protobuf:"bytes,2,opt,name=enrollSecret,proto3" json:"enrollSecret,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Secret is a temporary object to establish security with the Devops. A better solution using certificate will be introduced later

func (*Secret) Descriptor

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

func (*Secret) GetEnrollId

func (m *Secret) GetEnrollId() string

func (*Secret) GetEnrollSecret

func (m *Secret) GetEnrollSecret() string

func (*Secret) ProtoMessage

func (*Secret) ProtoMessage()

func (*Secret) Reset

func (m *Secret) Reset()

func (*Secret) String

func (m *Secret) String() string

func (*Secret) XXX_DiscardUnknown

func (m *Secret) XXX_DiscardUnknown()

func (*Secret) XXX_Marshal

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

func (*Secret) XXX_Merge

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

func (*Secret) XXX_Size

func (m *Secret) XXX_Size() int

func (*Secret) XXX_Unmarshal

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

type ServerStatus

type ServerStatus struct {
	Status               ServerStatus_StatusCode `protobuf:"varint,1,opt,name=status,proto3,enum=protos.ServerStatus_StatusCode" json:"status,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
	XXX_unrecognized     []byte                  `json:"-"`
	XXX_sizecache        int32                   `json:"-"`
}

func (*ServerStatus) Descriptor

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

func (*ServerStatus) GetStatus

func (m *ServerStatus) GetStatus() ServerStatus_StatusCode

func (*ServerStatus) ProtoMessage

func (*ServerStatus) ProtoMessage()

func (*ServerStatus) Reset

func (m *ServerStatus) Reset()

func (*ServerStatus) String

func (m *ServerStatus) String() string

func (*ServerStatus) XXX_DiscardUnknown

func (m *ServerStatus) XXX_DiscardUnknown()

func (*ServerStatus) XXX_Marshal

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

func (*ServerStatus) XXX_Merge

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

func (*ServerStatus) XXX_Size

func (m *ServerStatus) XXX_Size() int

func (*ServerStatus) XXX_Unmarshal

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

type ServerStatus_StatusCode

type ServerStatus_StatusCode int32
const (
	ServerStatus_UNDEFINED ServerStatus_StatusCode = 0
	ServerStatus_STARTED   ServerStatus_StatusCode = 1
	ServerStatus_STOPPED   ServerStatus_StatusCode = 2
	ServerStatus_PAUSED    ServerStatus_StatusCode = 3
	ServerStatus_ERROR     ServerStatus_StatusCode = 4
	ServerStatus_UNKNOWN   ServerStatus_StatusCode = 5
)

func (ServerStatus_StatusCode) EnumDescriptor

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

func (ServerStatus_StatusCode) String

func (x ServerStatus_StatusCode) String() string

type SigmaInput

type SigmaInput struct {
	Secret               *Secret  `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"`
	AppTCert             []byte   `protobuf:"bytes,2,opt,name=appTCert,proto3" json:"appTCert,omitempty"`
	Data                 []byte   `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SigmaInput) Descriptor

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

func (*SigmaInput) GetAppTCert

func (m *SigmaInput) GetAppTCert() []byte

func (*SigmaInput) GetData

func (m *SigmaInput) GetData() []byte

func (*SigmaInput) GetSecret

func (m *SigmaInput) GetSecret() *Secret

func (*SigmaInput) ProtoMessage

func (*SigmaInput) ProtoMessage()

func (*SigmaInput) Reset

func (m *SigmaInput) Reset()

func (*SigmaInput) String

func (m *SigmaInput) String() string

func (*SigmaInput) XXX_DiscardUnknown

func (m *SigmaInput) XXX_DiscardUnknown()

func (*SigmaInput) XXX_Marshal

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

func (*SigmaInput) XXX_Merge

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

func (*SigmaInput) XXX_Size

func (m *SigmaInput) XXX_Size() int

func (*SigmaInput) XXX_Unmarshal

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

type SigmaOutput

type SigmaOutput struct {
	Tcert                []byte   `protobuf:"bytes,1,opt,name=tcert,proto3" json:"tcert,omitempty"`
	Sigma                []byte   `protobuf:"bytes,2,opt,name=sigma,proto3" json:"sigma,omitempty"`
	Asn1Encoding         []byte   `protobuf:"bytes,3,opt,name=asn1Encoding,proto3" json:"asn1Encoding,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SigmaOutput) Descriptor

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

func (*SigmaOutput) GetAsn1Encoding

func (m *SigmaOutput) GetAsn1Encoding() []byte

func (*SigmaOutput) GetSigma

func (m *SigmaOutput) GetSigma() []byte

func (*SigmaOutput) GetTcert

func (m *SigmaOutput) GetTcert() []byte

func (*SigmaOutput) ProtoMessage

func (*SigmaOutput) ProtoMessage()

func (*SigmaOutput) Reset

func (m *SigmaOutput) Reset()

func (*SigmaOutput) String

func (m *SigmaOutput) String() string

func (*SigmaOutput) XXX_DiscardUnknown

func (m *SigmaOutput) XXX_DiscardUnknown()

func (*SigmaOutput) XXX_Marshal

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

func (*SigmaOutput) XXX_Merge

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

func (*SigmaOutput) XXX_Size

func (m *SigmaOutput) XXX_Size() int

func (*SigmaOutput) XXX_Unmarshal

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

type SimpleReq

type SimpleReq struct {
	// Types that are valid to be assigned to Req:
	//	*SimpleReq_Tx
	//	*SimpleReq_State
	Req                  isSimpleReq_Req `protobuf_oneof:"req"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

simple syncing req/resp, the resp should have the same correlationId with the incoming

func (*SimpleReq) Descriptor

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

func (*SimpleReq) GetReq

func (m *SimpleReq) GetReq() isSimpleReq_Req

func (*SimpleReq) GetState

func (m *SimpleReq) GetState() *LedgerState

func (*SimpleReq) GetTx

func (m *SimpleReq) GetTx() *TxQuery

func (*SimpleReq) ProtoMessage

func (*SimpleReq) ProtoMessage()

func (*SimpleReq) Reset

func (m *SimpleReq) Reset()

func (*SimpleReq) String

func (m *SimpleReq) String() string

func (*SimpleReq) XXX_DiscardUnknown

func (m *SimpleReq) XXX_DiscardUnknown()

func (*SimpleReq) XXX_Marshal

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

func (*SimpleReq) XXX_Merge

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

func (*SimpleReq) XXX_OneofFuncs

func (*SimpleReq) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*SimpleReq) XXX_Size

func (m *SimpleReq) XXX_Size() int

func (*SimpleReq) XXX_Unmarshal

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

type SimpleReq_State

type SimpleReq_State struct {
	State *LedgerState `protobuf:"bytes,2,opt,name=state,proto3,oneof"`
}

type SimpleReq_Tx

type SimpleReq_Tx struct {
	Tx *TxQuery `protobuf:"bytes,1,opt,name=tx,proto3,oneof"`
}

type SimpleResp

type SimpleResp struct {
	// Types that are valid to be assigned to Resp:
	//	*SimpleResp_State
	//	*SimpleResp_Tx
	Resp                 isSimpleResp_Resp `protobuf_oneof:"resp"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*SimpleResp) Descriptor

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

func (*SimpleResp) GetResp

func (m *SimpleResp) GetResp() isSimpleResp_Resp

func (*SimpleResp) GetState

func (m *SimpleResp) GetState() *LedgerState

func (*SimpleResp) GetTx

func (m *SimpleResp) GetTx() *TransactionBlock

func (*SimpleResp) ProtoMessage

func (*SimpleResp) ProtoMessage()

func (*SimpleResp) Reset

func (m *SimpleResp) Reset()

func (*SimpleResp) String

func (m *SimpleResp) String() string

func (*SimpleResp) XXX_DiscardUnknown

func (m *SimpleResp) XXX_DiscardUnknown()

func (*SimpleResp) XXX_Marshal

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

func (*SimpleResp) XXX_Merge

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

func (*SimpleResp) XXX_OneofFuncs

func (*SimpleResp) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*SimpleResp) XXX_Size

func (m *SimpleResp) XXX_Size() int

func (*SimpleResp) XXX_Unmarshal

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

type SimpleResp_State

type SimpleResp_State struct {
	State *LedgerState `protobuf:"bytes,1,opt,name=state,proto3,oneof"`
}

type SimpleResp_Tx

type SimpleResp_Tx struct {
	Tx *TransactionBlock `protobuf:"bytes,2,opt,name=tx,proto3,oneof"`
}

type SimuPeerStub

type SimuPeerStub struct {
	*StreamStub
	// contains filtered or unexported fields
}

func NewSimuPeerStub

func NewSimuPeerStub(id string, ss *StreamStub) *SimuPeerStub

func NewSimuPeerStub2

func NewSimuPeerStub2(ss *StreamStub) *SimuPeerStub

func (*SimuPeerStub) AddDummyPeer

func (s1 *SimuPeerStub) AddDummyPeer(id string, asCli bool) error

func (*SimuPeerStub) ConnectTo

func (s1 *SimuPeerStub) ConnectTo(ctx context.Context, s2 *SimuPeerStub) (err error, traffic func() error)

func (*SimuPeerStub) ConnectTo2

func (s1 *SimuPeerStub) ConnectTo2(ctx context.Context, s2 *SimuPeerStub, msgHelper func() proto.Message) (err error, traffic func() error)

s1 is act as client and s2 as service, create bi-direction comm between two handlers

type StateFilter

type StateFilter struct {
	Filter               []byte   `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"`
	HashCounts           uint32   `protobuf:"varint,2,opt,name=hashCounts,proto3" json:"hashCounts,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

a simple bloom filter information for representing a group of state the filter is expressed by a bytes string less than 8k (65535bit) and has 8*<bytes> buckets a target hash is separated into WORDs (16bit) and the first n (n=hashCounts) WORD is used in the filter if the length of target has no enough WORDs, the hashes of rest are considered as 0

func (*StateFilter) Add

func (f *StateFilter) Add(h []byte)

func (*StateFilter) Descriptor

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

func (*StateFilter) GetFilter

func (m *StateFilter) GetFilter() []byte

func (*StateFilter) GetHashCounts

func (m *StateFilter) GetHashCounts() uint32

func (*StateFilter) Init

func (f *StateFilter) Init(slots uint, estimatedSize uint) float64

func (*StateFilter) InitAuto

func (f *StateFilter) InitAuto(estimatedSize uint) float64

func (*StateFilter) Match

func (f *StateFilter) Match(h []byte) bool

func (*StateFilter) ProtoMessage

func (*StateFilter) ProtoMessage()

func (*StateFilter) Reset

func (m *StateFilter) Reset()

func (*StateFilter) ResetFilter

func (f *StateFilter) ResetFilter()

func (*StateFilter) String

func (m *StateFilter) String() string

func (*StateFilter) XXX_DiscardUnknown

func (m *StateFilter) XXX_DiscardUnknown()

func (*StateFilter) XXX_Marshal

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

func (*StateFilter) XXX_Merge

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

func (*StateFilter) XXX_Size

func (m *StateFilter) XXX_Size() int

func (*StateFilter) XXX_Unmarshal

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

type StateIndex

type StateIndex struct {
	Height               uint64   `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
	Hash                 []byte   `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
	CorePayload          []byte   `protobuf:"bytes,4,opt,name=corePayload,proto3" json:"corePayload,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

StateIndex is the payload in response to the index/query request (but the response in query may not contain corePayload field)

func (*StateIndex) Descriptor

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

func (*StateIndex) GetCorePayload

func (m *StateIndex) GetCorePayload() []byte

func (*StateIndex) GetHash

func (m *StateIndex) GetHash() []byte

func (*StateIndex) GetHeight

func (m *StateIndex) GetHeight() uint64

func (*StateIndex) ProtoMessage

func (*StateIndex) ProtoMessage()

func (*StateIndex) Reset

func (m *StateIndex) Reset()

func (*StateIndex) String

func (m *StateIndex) String() string

func (*StateIndex) XXX_DiscardUnknown

func (m *StateIndex) XXX_DiscardUnknown()

func (*StateIndex) XXX_Marshal

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

func (*StateIndex) XXX_Merge

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

func (*StateIndex) XXX_Size

func (m *StateIndex) XXX_Size() int

func (*StateIndex) XXX_Unmarshal

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

type StreamHandler

type StreamHandler struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*StreamHandler) GetName

func (h *StreamHandler) GetName() string

func (*StreamHandler) Impl

func (h *StreamHandler) Impl() StreamHandlerImpl

func (*StreamHandler) SendMessage

func (h *StreamHandler) SendMessage(m proto.Message) error

sending a message to far-end, this method is thread-safe

type StreamHandlerFactory

type StreamHandlerFactory interface {
	NewClientStream(*grpc.ClientConn) (grpc.ClientStream, error)
	NewStreamHandlerImpl(*PeerID, *StreamStub, bool) (StreamHandlerImpl, error)
}

a streamhandler factory include two methods:

  1. Stream creator: generate a stream from given connection
  2. Handler creator: generate a handler which is binded to specified peer, with a bool parameter indicate it should act as client or server (may be omitted in a bi-directory session)

type StreamHandlerImpl

type StreamHandlerImpl interface {
	Tag() string
	EnableLoss() bool
	NewMessage() proto.Message
	HandleMessage(*StreamHandler, proto.Message) error
	BeforeSendMessage(proto.Message) error
	OnWriteError(error)
	Stop()
}
  each streamhandler implement exposed following methods for working in a streaming, it supposed message with
  certain type is transmitted in the stream and each end handle this message by a streamhandler implement:

  Tag: providing a string tag for the implement
  EnableLoss: indicate the message transmitted in stream can be dropped for any reason (send buffer full, bad
			  linking, deliberately omitted by the other side ...)
  NewMessage: provided a prototype object of the transamitted message for receiving and handling later in a HandleMessage call
  HandleMessage: handling a message received from the other side. The object was allocated before in a NewMessage call and
			  the wire data was parsed and put into it
  BeforeSendMessage: when a message is ready to send to the other side (by calling SendMessage in a StreamHandler), this method
			  is called to give handler a last chance for dropping (by return a non-nil error) the message or do any statistics
			  jobs. Method MAY be called in different thread so you must protect your data from any racing
  OnWriteError: method is called if any error raised in sending message
  Stop: when the stream is broken this method is called and no more calling will be made on this handler

  *** All calling to the methods (except for BeforeSendMessage) are ensured being raised in the same thread ***

type StreamStub

type StreamStub struct {
	StreamHandlerFactory
	// contains filtered or unexported fields
}

a default implement, use two goroutine for read and write simultaneously

func NewStreamStub

func NewStreamStub(factory StreamHandlerFactory, peerid *PeerID) *StreamStub

func (*StreamStub) AllowClient

func (s *StreamStub) AllowClient(remotePeerid *PeerID, psw []byte)

func (*StreamStub) Broadcast

func (s *StreamStub) Broadcast(ctx context.Context, m proto.Message) (err error,
	ret []*PickedStreamHandler)

func (*StreamStub) CleanClientACL

func (s *StreamStub) CleanClientACL(remotePeerid *PeerID)

func (*StreamStub) HandleClient

func (s *StreamStub) HandleClient(conn *grpc.ClientConn, remotePeerid *PeerID) (error, func() error)

func (*StreamStub) HandleClient2

func (s *StreamStub) HandleClient2(conn *grpc.ClientConn, remotePeerid *PeerID, psw []byte) (error, func() error)

func (*StreamStub) HandleServer

func (s *StreamStub) HandleServer(stream grpc.ServerStream) error

func (*StreamStub) HandlerCount

func (s *StreamStub) HandlerCount() int

func (*StreamStub) OverAllHandlers

func (s *StreamStub) OverAllHandlers(ctx context.Context) chan *PickedStreamHandler

like OverHandlers, but pick all handlers which streamsub owns in callingtime

func (*StreamStub) OverHandlers

func (s *StreamStub) OverHandlers(ctx context.Context, peerids []*PeerID) chan *PickedStreamHandler

pick handlers by random from given peerids, whether candidates to be choosed is decided at each time before it was delivered. This is oftenn used by a range statement

func (*StreamStub) PickHandler

func (s *StreamStub) PickHandler(peerid *PeerID) *StreamHandler

func (*StreamStub) PickHandlers

func (s *StreamStub) PickHandlers(peerids []*PeerID) []*StreamHandler

func (*StreamStub) TryOverHandlers

func (s *StreamStub) TryOverHandlers(peerids []*PeerID,
	do func(*PickedStreamHandler) error)

an entry mimic that in statetransfer package

type SyncBlock

type SyncBlock struct {
	Height               uint64   `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
	Block                *Block   `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

SyncStateDeltas is the payload in response to the block request message.

func (*SyncBlock) Descriptor

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

func (*SyncBlock) GetBlock

func (m *SyncBlock) GetBlock() *Block

func (*SyncBlock) GetHeight

func (m *SyncBlock) GetHeight() uint64

func (*SyncBlock) ProtoMessage

func (*SyncBlock) ProtoMessage()

func (*SyncBlock) Reset

func (m *SyncBlock) Reset()

func (*SyncBlock) String

func (m *SyncBlock) String() string

func (*SyncBlock) XXX_DiscardUnknown

func (m *SyncBlock) XXX_DiscardUnknown()

func (*SyncBlock) XXX_Marshal

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

func (*SyncBlock) XXX_Merge

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

func (*SyncBlock) XXX_Size

func (m *SyncBlock) XXX_Size() int

func (*SyncBlock) XXX_Unmarshal

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

type SyncBlockRange

type SyncBlockRange struct {
	//    uint64 correlationId = 1;
	Start uint64 `protobuf:"varint,2,opt,name=start,proto3" json:"start,omitempty"`
	End   uint64 `protobuf:"varint,3,opt,name=end,proto3" json:"end,omitempty"`
	//the hash of first block (start), if specified, server can check and
	//stop before transfer starts when the hash is found unmatched
	FirstHash            []byte   `protobuf:"bytes,5,opt,name=firstHash,proto3" json:"firstHash,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

SyncBlockRange is the payload of block request, where start and end indicate the starting and ending blocks inclusively. The order in which blocks are returned is defined by the start and end values. For example, if start=3 and end=5, the order of blocks will be 3, 4, 5. If start=5 and end=3, the order will be 5, 4, 3.

func (*SyncBlockRange) Descriptor

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

func (*SyncBlockRange) GetEnd

func (m *SyncBlockRange) GetEnd() uint64

func (*SyncBlockRange) GetFirstHash

func (m *SyncBlockRange) GetFirstHash() []byte

func (*SyncBlockRange) GetStart

func (m *SyncBlockRange) GetStart() uint64

func (*SyncBlockRange) Length

func (m *SyncBlockRange) Length() uint64

func (*SyncBlockRange) NextNumOp

func (m *SyncBlockRange) NextNumOp() func(uint64) uint64

func (*SyncBlockRange) ProtoMessage

func (*SyncBlockRange) ProtoMessage()

func (*SyncBlockRange) Reset

func (m *SyncBlockRange) Reset()

func (*SyncBlockRange) String

func (m *SyncBlockRange) String() string

func (*SyncBlockRange) XXX_DiscardUnknown

func (m *SyncBlockRange) XXX_DiscardUnknown()

func (*SyncBlockRange) XXX_Marshal

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

func (*SyncBlockRange) XXX_Merge

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

func (*SyncBlockRange) XXX_Size

func (m *SyncBlockRange) XXX_Size() int

func (*SyncBlockRange) XXX_Unmarshal

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

type SyncClient

type SyncClient interface {
	Data(ctx context.Context, opts ...grpc.CallOption) (Sync_DataClient, error)
}

SyncClient is the client API for Sync service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewSyncClient

func NewSyncClient(cc *grpc.ClientConn) SyncClient

type SyncMetadata

type SyncMetadata struct {
	// Types that are valid to be assigned to Data:
	//	*SyncMetadata_Buckettree
	Data                 isSyncMetadata_Data `protobuf_oneof:"data"`
	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
	XXX_unrecognized     []byte              `json:"-"`
	XXX_sizecache        int32               `json:"-"`
}

func (*SyncMetadata) Descriptor

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

func (*SyncMetadata) GetBuckettree

func (m *SyncMetadata) GetBuckettree() *BucketNodes

func (*SyncMetadata) GetData

func (m *SyncMetadata) GetData() isSyncMetadata_Data

func (*SyncMetadata) ProtoMessage

func (*SyncMetadata) ProtoMessage()

func (*SyncMetadata) Reset

func (m *SyncMetadata) Reset()

func (*SyncMetadata) String

func (m *SyncMetadata) String() string

func (*SyncMetadata) XXX_DiscardUnknown

func (m *SyncMetadata) XXX_DiscardUnknown()

func (*SyncMetadata) XXX_Marshal

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

func (*SyncMetadata) XXX_Merge

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

func (*SyncMetadata) XXX_OneofFuncs

func (*SyncMetadata) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*SyncMetadata) XXX_Size

func (m *SyncMetadata) XXX_Size() int

func (*SyncMetadata) XXX_Unmarshal

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

type SyncMetadata_Buckettree

type SyncMetadata_Buckettree struct {
	Buckettree *BucketNodes `protobuf:"bytes,1,opt,name=buckettree,proto3,oneof"`
}

type SyncMsg

type SyncMsg struct {
	Type                 SyncMsg_Type      `protobuf:"varint,1,opt,name=type,proto3,enum=protos.SyncMsg_Type" json:"type,omitempty"`
	CorrelationId        uint64            `protobuf:"varint,2,opt,name=correlationId,proto3" json:"correlationId,omitempty"`
	Request              *SyncMsg_Request  `protobuf:"bytes,4,opt,name=request,proto3" json:"request,omitempty"`
	Response             *SyncMsg_Response `protobuf:"bytes,5,opt,name=response,proto3" json:"response,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

Like chat, stateSync wrap messages used in a syncing session

func (*SyncMsg) Descriptor

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

func (*SyncMsg) GetCorrelationId

func (m *SyncMsg) GetCorrelationId() uint64

func (*SyncMsg) GetRequest

func (m *SyncMsg) GetRequest() *SyncMsg_Request

func (*SyncMsg) GetResponse

func (m *SyncMsg) GetResponse() *SyncMsg_Response

func (*SyncMsg) GetType

func (m *SyncMsg) GetType() SyncMsg_Type

func (*SyncMsg) ProtoMessage

func (*SyncMsg) ProtoMessage()

func (*SyncMsg) Reset

func (m *SyncMsg) Reset()

func (*SyncMsg) String

func (m *SyncMsg) String() string

func (*SyncMsg) XXX_DiscardUnknown

func (m *SyncMsg) XXX_DiscardUnknown()

func (*SyncMsg) XXX_Marshal

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

func (*SyncMsg) XXX_Merge

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

func (*SyncMsg) XXX_Size

func (m *SyncMsg) XXX_Size() int

func (*SyncMsg) XXX_Unmarshal

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

type SyncMsg_Request

type SyncMsg_Request struct {
	Simple               *SimpleReq       `protobuf:"bytes,1,opt,name=simple,proto3" json:"simple,omitempty"`
	Handshake            *OpenSession     `protobuf:"bytes,2,opt,name=handshake,proto3" json:"handshake,omitempty"`
	Session              *TransferRequest `protobuf:"bytes,3,opt,name=session,proto3" json:"session,omitempty"`
	Ack                  uint32           `protobuf:"varint,4,opt,name=ack,proto3" json:"ack,omitempty"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

we have one of the following fields specified by the type bytes payload = 3;

func (*SyncMsg_Request) Descriptor

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

func (*SyncMsg_Request) GetAck

func (m *SyncMsg_Request) GetAck() uint32

func (*SyncMsg_Request) GetHandshake

func (m *SyncMsg_Request) GetHandshake() *OpenSession

func (*SyncMsg_Request) GetSession

func (m *SyncMsg_Request) GetSession() *TransferRequest

func (*SyncMsg_Request) GetSimple

func (m *SyncMsg_Request) GetSimple() *SimpleReq

func (*SyncMsg_Request) ProtoMessage

func (*SyncMsg_Request) ProtoMessage()

func (*SyncMsg_Request) Reset

func (m *SyncMsg_Request) Reset()

func (*SyncMsg_Request) String

func (m *SyncMsg_Request) String() string

func (*SyncMsg_Request) XXX_DiscardUnknown

func (m *SyncMsg_Request) XXX_DiscardUnknown()

func (*SyncMsg_Request) XXX_Marshal

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

func (*SyncMsg_Request) XXX_Merge

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

func (*SyncMsg_Request) XXX_Size

func (m *SyncMsg_Request) XXX_Size() int

func (*SyncMsg_Request) XXX_Unmarshal

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

type SyncMsg_Response

type SyncMsg_Response struct {
	Simple               *SimpleResp       `protobuf:"bytes,1,opt,name=simple,proto3" json:"simple,omitempty"`
	Handshake            *AcceptSession    `protobuf:"bytes,2,opt,name=handshake,proto3" json:"handshake,omitempty"`
	Session              *TransferResponse `protobuf:"bytes,3,opt,name=session,proto3" json:"session,omitempty"`
	Err                  *RequestError     `protobuf:"bytes,4,opt,name=err,proto3" json:"err,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*SyncMsg_Response) Descriptor

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

func (*SyncMsg_Response) GetErr

func (m *SyncMsg_Response) GetErr() *RequestError

func (*SyncMsg_Response) GetHandshake

func (m *SyncMsg_Response) GetHandshake() *AcceptSession

func (*SyncMsg_Response) GetSession

func (m *SyncMsg_Response) GetSession() *TransferResponse

func (*SyncMsg_Response) GetSimple

func (m *SyncMsg_Response) GetSimple() *SimpleResp

func (*SyncMsg_Response) ProtoMessage

func (*SyncMsg_Response) ProtoMessage()

func (*SyncMsg_Response) Reset

func (m *SyncMsg_Response) Reset()

func (*SyncMsg_Response) String

func (m *SyncMsg_Response) String() string

func (*SyncMsg_Response) XXX_DiscardUnknown

func (m *SyncMsg_Response) XXX_DiscardUnknown()

func (*SyncMsg_Response) XXX_Marshal

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

func (*SyncMsg_Response) XXX_Merge

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

func (*SyncMsg_Response) XXX_Size

func (m *SyncMsg_Response) XXX_Size() int

func (*SyncMsg_Response) XXX_Unmarshal

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

type SyncMsg_Type

type SyncMsg_Type int32
const (
	SyncMsg_UNDEFINED     SyncMsg_Type = 0
	SyncMsg_CLIENT_SIMPLE SyncMsg_Type = 1
	//when request, its correlationId incidate the id of
	//session, which must be unique to any other simple request
	//or sessions it has requested for (no matter accepted or not)
	SyncMsg_CLIENT_SESSION_OPEN SyncMsg_Type = 2
	SyncMsg_CLIENT_SESSION      SyncMsg_Type = 3
	//client using this message for acking a message from
	//server's current session, it may piggyback next request
	//in this message sever should always handle the newest request
	//and drop the task it received before
	//the fields of session and ack may both exist
	//client MUST prepare for receiving unexpected data package from previous
	//request because they may have been in wired before new request
	//is delivered
	SyncMsg_CLIENT_SESSION_ACK   SyncMsg_Type = 4
	SyncMsg_CLIENT_SESSION_CLOSE SyncMsg_Type = 5
	//err can be sent at any time, the correlationId incidate
	//its corresponding request or session
	SyncMsg_SERVER_ERROR          SyncMsg_Type = 9
	SyncMsg_SERVER_SIMPLE         SyncMsg_Type = 10
	SyncMsg_SERVER_SESSION_ACCEPT SyncMsg_Type = 11
	SyncMsg_SERVER_SESSION        SyncMsg_Type = 12
	SyncMsg_SERVER_SESSION_ERROR  SyncMsg_Type = 13
)

func (SyncMsg_Type) EnumDescriptor

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

func (SyncMsg_Type) OnRecv

func (x SyncMsg_Type) OnRecv() string

func (SyncMsg_Type) OnSend

func (x SyncMsg_Type) OnSend() string

func (SyncMsg_Type) String

func (x SyncMsg_Type) String() string

type SyncOffset

type SyncOffset struct {
	// Types that are valid to be assigned to Data:
	//	*SyncOffset_Buckettree
	Data                 isSyncOffset_Data `protobuf_oneof:"data"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

we have specified field for each implement of states (buckettree, trie, etc.)

func NewBucketTreeOffset

func NewBucketTreeOffset(level, bucketNum uint64) *SyncOffset

func (*SyncOffset) Descriptor

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

func (*SyncOffset) GetBuckettree

func (m *SyncOffset) GetBuckettree() *BucketTreeOffset

func (*SyncOffset) GetData

func (m *SyncOffset) GetData() isSyncOffset_Data

func (*SyncOffset) ProtoMessage

func (*SyncOffset) ProtoMessage()

func (*SyncOffset) Reset

func (m *SyncOffset) Reset()

func (*SyncOffset) String

func (m *SyncOffset) String() string

func (*SyncOffset) XXX_DiscardUnknown

func (m *SyncOffset) XXX_DiscardUnknown()

func (*SyncOffset) XXX_Marshal

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

func (*SyncOffset) XXX_Merge

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

func (*SyncOffset) XXX_OneofFuncs

func (*SyncOffset) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*SyncOffset) XXX_Size

func (m *SyncOffset) XXX_Size() int

func (*SyncOffset) XXX_Unmarshal

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

type SyncOffset_Buckettree

type SyncOffset_Buckettree struct {
	Buckettree *BucketTreeOffset `protobuf:"bytes,2,opt,name=buckettree,proto3,oneof"`
}

type SyncServer

type SyncServer interface {
	Data(Sync_DataServer) error
}

SyncServer is the server API for Sync service.

type SyncStateChunk

type SyncStateChunk struct {
	Offset *SyncOffset `protobuf:"bytes,1,opt,name=offset,proto3" json:"offset,omitempty"`
	//    bytes roothash = 2;
	MetaData             *SyncMetadata                   `protobuf:"bytes,5,opt,name=metaData,proto3" json:"metaData,omitempty"`
	ChaincodeStateDeltas map[string]*ChaincodeStateDelta `` /* 181-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}                        `json:"-"`
	XXX_unrecognized     []byte                          `json:"-"`
	XXX_sizecache        int32                           `json:"-"`
}

SyncStateChunk is the payload to the request of state syncing request

func (*SyncStateChunk) Descriptor

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

func (*SyncStateChunk) GetChaincodeStateDeltas

func (m *SyncStateChunk) GetChaincodeStateDeltas() map[string]*ChaincodeStateDelta

func (*SyncStateChunk) GetMetaData

func (m *SyncStateChunk) GetMetaData() *SyncMetadata

func (*SyncStateChunk) GetOffset

func (m *SyncStateChunk) GetOffset() *SyncOffset

func (*SyncStateChunk) ProtoMessage

func (*SyncStateChunk) ProtoMessage()

func (*SyncStateChunk) Reset

func (m *SyncStateChunk) Reset()

func (*SyncStateChunk) String

func (m *SyncStateChunk) String() string

func (*SyncStateChunk) XXX_DiscardUnknown

func (m *SyncStateChunk) XXX_DiscardUnknown()

func (*SyncStateChunk) XXX_Marshal

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

func (*SyncStateChunk) XXX_Merge

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

func (*SyncStateChunk) XXX_Size

func (m *SyncStateChunk) XXX_Size() int

func (*SyncStateChunk) XXX_Unmarshal

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

type SyncStateDeltas

type SyncStateDeltas struct {
	Height               uint64                          `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
	Deltas               map[string]*ChaincodeStateDelta `` /* 153-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}                        `json:"-"`
	XXX_unrecognized     []byte                          `json:"-"`
	XXX_sizecache        int32                           `json:"-"`
}

SyncStateDeltas is the payload in response to the delta request message.

func (*SyncStateDeltas) Descriptor

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

func (*SyncStateDeltas) GetDeltas

func (m *SyncStateDeltas) GetDeltas() map[string]*ChaincodeStateDelta

func (*SyncStateDeltas) GetHeight

func (m *SyncStateDeltas) GetHeight() uint64

func (*SyncStateDeltas) ProtoMessage

func (*SyncStateDeltas) ProtoMessage()

func (*SyncStateDeltas) Reset

func (m *SyncStateDeltas) Reset()

func (*SyncStateDeltas) String

func (m *SyncStateDeltas) String() string

func (*SyncStateDeltas) XXX_DiscardUnknown

func (m *SyncStateDeltas) XXX_DiscardUnknown()

func (*SyncStateDeltas) XXX_Marshal

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

func (*SyncStateDeltas) XXX_Merge

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

func (*SyncStateDeltas) XXX_Size

func (m *SyncStateDeltas) XXX_Size() int

func (*SyncStateDeltas) XXX_Unmarshal

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

type Sync_DataClient

type Sync_DataClient interface {
	Send(*SyncMsg) error
	Recv() (*SyncMsg, error)
	grpc.ClientStream
}

type Sync_DataServer

type Sync_DataServer interface {
	Send(*SyncMsg) error
	Recv() (*SyncMsg, error)
	grpc.ServerStream
}

type Transaction

type Transaction struct {
	Type Transaction_Type `protobuf:"varint,1,opt,name=type,proto3,enum=protos.Transaction_Type" json:"type,omitempty"`
	//store ChaincodeID as bytes so its encrypted value can be stored
	ChaincodeID                    []byte               `protobuf:"bytes,2,opt,name=chaincodeID,proto3" json:"chaincodeID,omitempty"`
	Payload                        []byte               `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
	Metadata                       []byte               `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"`
	Txid                           string               `protobuf:"bytes,5,opt,name=txid,proto3" json:"txid,omitempty"`
	Timestamp                      *timestamp.Timestamp `protobuf:"bytes,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	ConfidentialityLevel           ConfidentialityLevel `` /* 127-byte string literal not displayed */
	ConfidentialityProtocolVersion string               `protobuf:"bytes,8,opt,name=confidentialityProtocolVersion,proto3" json:"confidentialityProtocolVersion,omitempty"`
	Nonce                          []byte               `protobuf:"bytes,9,opt,name=nonce,proto3" json:"nonce,omitempty"`
	ToValidators                   []byte               `protobuf:"bytes,10,opt,name=toValidators,proto3" json:"toValidators,omitempty"`
	Cert                           []byte               `protobuf:"bytes,11,opt,name=cert,proto3" json:"cert,omitempty"`
	Signature                      []byte               `protobuf:"bytes,12,opt,name=signature,proto3" json:"signature,omitempty"`
	XXX_NoUnkeyedLiteral           struct{}             `json:"-"`
	XXX_unrecognized               []byte               `json:"-"`
	XXX_sizecache                  int32                `json:"-"`
}

Transaction defines a function call to a contract. `args` is an array of type string so that the chaincode writer can choose whatever format they wish for the arguments for their chaincode. For example, they may wish to use JSON, XML, or a custom format. TODO: Defined remaining fields.

func NewChaincodeDeployTransaction

func NewChaincodeDeployTransaction(chaincodeDeploymentSpec *ChaincodeDeploymentSpec, uuid string) (*Transaction, error)

NewChaincodeDeployTransaction is used to deploy chaincode.

func NewChaincodeExecute

func NewChaincodeExecute(chaincodeInvocationSpec *ChaincodeInvocationSpec, uuid string, typ Transaction_Type) (*Transaction, error)

NewChaincodeExecute is used to invoke chaincode.

func NewChaincodeTransaction

func NewChaincodeTransaction(action Transaction_Type, chaincodeID *ChaincodeID, function string, arguments [][]byte) (*Transaction, error)

A transaction which is applied on a EXISTED single chaincode (i.e.: invoke or query ...) (it is not easy to handle deployment in the same entry) This is used to replace the deprecated NewTransaction entry input chaincode is handled and wrapped into generated chaincodespec field

func NewTransaction

func NewTransaction(chaincodeID ChaincodeID, uuid string, function string, arguments []string) (*Transaction, error)

YA-fabric 0.9: deprecated this NewTransaction creates a new transaction. It defines the function to call, the chaincodeID on which the function should be called, and the arguments string. The arguments could be a string of JSON, but there is no strict requirement.

func NewTransactionCore

func NewTransactionCore(ttype Transaction_Type, chaincodepayload []byte, basepayload []byte) *Transaction

create a new transaction with its "core" field is specified

func UnmarshallTransaction

func UnmarshallTransaction(transaction []byte) (*Transaction, error)

func (*Transaction) Bytes

func (transaction *Transaction) Bytes() ([]byte, error)

Bytes returns this transaction as an array of bytes.

func (*Transaction) Descriptor

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

func (*Transaction) Digest

func (t *Transaction) Digest() ([]byte, error)

func (*Transaction) DigestWithAlg

func (t *Transaction) DigestWithAlg(customIDgenAlg string) ([]byte, error)

func (*Transaction) GetCert

func (m *Transaction) GetCert() []byte

func (*Transaction) GetChaincodeID

func (m *Transaction) GetChaincodeID() []byte

func (*Transaction) GetConfidentialityLevel

func (m *Transaction) GetConfidentialityLevel() ConfidentialityLevel

func (*Transaction) GetConfidentialityProtocolVersion

func (m *Transaction) GetConfidentialityProtocolVersion() string

func (*Transaction) GetMetadata

func (m *Transaction) GetMetadata() []byte

func (*Transaction) GetNonce

func (m *Transaction) GetNonce() []byte

func (*Transaction) GetPayload

func (m *Transaction) GetPayload() []byte

func (*Transaction) GetSignature

func (m *Transaction) GetSignature() []byte

func (*Transaction) GetTimestamp

func (m *Transaction) GetTimestamp() *timestamp.Timestamp

func (*Transaction) GetToValidators

func (m *Transaction) GetToValidators() []byte

func (*Transaction) GetTxid

func (m *Transaction) GetTxid() string

func (*Transaction) GetType

func (m *Transaction) GetType() Transaction_Type

func (*Transaction) IsValid

func (t *Transaction) IsValid() bool

func (*Transaction) IsValidWithAlg

func (t *Transaction) IsValidWithAlg(customIDgenAlg string) bool

func (*Transaction) ParseChaincodeID

func (transaction *Transaction) ParseChaincodeID() (*ChaincodeID, error)

func (*Transaction) ParsePayloadAsDeploy

func (transaction *Transaction) ParsePayloadAsDeploy() (*ChaincodeDeploymentSpec, error)

func (*Transaction) ParsePayloadAsInvoking

func (transaction *Transaction) ParsePayloadAsInvoking() (*ChaincodeInvocationSpec, error)

func (*Transaction) ProtoMessage

func (*Transaction) ProtoMessage()

func (*Transaction) Reset

func (m *Transaction) Reset()

func (*Transaction) String

func (m *Transaction) String() string

func (*Transaction) XXX_DiscardUnknown

func (m *Transaction) XXX_DiscardUnknown()

func (*Transaction) XXX_Marshal

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

func (*Transaction) XXX_Merge

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

func (*Transaction) XXX_Size

func (m *Transaction) XXX_Size() int

func (*Transaction) XXX_Unmarshal

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

type TransactionBlock

type TransactionBlock struct {
	Transactions         []*Transaction `protobuf:"bytes,1,rep,name=transactions,proto3" json:"transactions,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

TransactionBlock carries a batch of transactions.

func (*TransactionBlock) Descriptor

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

func (*TransactionBlock) GetTransactions

func (m *TransactionBlock) GetTransactions() []*Transaction

func (*TransactionBlock) ProtoMessage

func (*TransactionBlock) ProtoMessage()

func (*TransactionBlock) Reset

func (m *TransactionBlock) Reset()

func (*TransactionBlock) String

func (m *TransactionBlock) String() string

func (*TransactionBlock) XXX_DiscardUnknown

func (m *TransactionBlock) XXX_DiscardUnknown()

func (*TransactionBlock) XXX_Marshal

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

func (*TransactionBlock) XXX_Merge

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

func (*TransactionBlock) XXX_Size

func (m *TransactionBlock) XXX_Size() int

func (*TransactionBlock) XXX_Unmarshal

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

type TransactionHandlingContext

type TransactionHandlingContext struct {
	*Transaction //the original transaction
	//first fields which will be tagged from outside, if PeerID is not set,
	//it will be considered as "self peer" in network
	NetworkID, PeerID string
	//every fields can be readout from transaction (unlessed covered by the confidentiality)
	ChaincodeName, ChaincodeTemplate string
	TargetLedgers                    []string
	CanonicalName                    *ChaincodeID
	ChaincodeSpec                    *ChaincodeSpec
	ChaincodeDeploySpec              *ChaincodeDeploymentSpec
	SecContex                        *ChaincodeSecurityContext
	CustomFields                     map[string]interface{}
}

YA-fabric 0.9: We define a struct for transaction which is passed in a pipeline handling it, the data can be completed progressively along the pipeline and finally be delivered for executing. It mainly contain fidentiality-releated contents currently and may add more or customed fields

func NewTransactionHandlingContext

func NewTransactionHandlingContext(t *Transaction) *TransactionHandlingContext

type TransactionRequest

type TransactionRequest struct {
	TransactionUuid      string   `protobuf:"bytes,1,opt,name=transactionUuid,proto3" json:"transactionUuid,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TransactionRequest) Descriptor

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

func (*TransactionRequest) GetTransactionUuid

func (m *TransactionRequest) GetTransactionUuid() string

func (*TransactionRequest) ProtoMessage

func (*TransactionRequest) ProtoMessage()

func (*TransactionRequest) Reset

func (m *TransactionRequest) Reset()

func (*TransactionRequest) String

func (m *TransactionRequest) String() string

func (*TransactionRequest) XXX_DiscardUnknown

func (m *TransactionRequest) XXX_DiscardUnknown()

func (*TransactionRequest) XXX_Marshal

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

func (*TransactionRequest) XXX_Merge

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

func (*TransactionRequest) XXX_Size

func (m *TransactionRequest) XXX_Size() int

func (*TransactionRequest) XXX_Unmarshal

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

type TransactionResult

type TransactionResult struct {
	Txid      string `protobuf:"bytes,1,opt,name=txid,proto3" json:"txid,omitempty"`
	Result    []byte `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"`
	ErrorCode uint32 `protobuf:"varint,3,opt,name=errorCode,proto3" json:"errorCode,omitempty"`
	Error     string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"`
	//ChaincodeEvent chaincodeEvent = 5;
	ChaincodeEvents      []*ChaincodeEvent `protobuf:"bytes,6,rep,name=chaincodeEvents,proto3" json:"chaincodeEvents,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

TransactionResult contains the return value of a transaction. It does not track potential state changes that were a result of the transaction. txid - The unique identifier of this transaction. result - The return value of the transaction. errorCode - An error code. 5xx will be logged as a failure in the dashboard. error - An error string for logging an issue. chaincodeEvent - any event emitted by a transaction

func UnmarshallTransactionResult

func UnmarshallTransactionResult(txebyte []byte) (*TransactionResult, error)

func (*TransactionResult) Bytes

func (txResult *TransactionResult) Bytes() ([]byte, error)

func (*TransactionResult) Descriptor

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

func (*TransactionResult) GetChaincodeEvents

func (m *TransactionResult) GetChaincodeEvents() []*ChaincodeEvent

func (*TransactionResult) GetError

func (m *TransactionResult) GetError() string

func (*TransactionResult) GetErrorCode

func (m *TransactionResult) GetErrorCode() uint32

func (*TransactionResult) GetResult

func (m *TransactionResult) GetResult() []byte

func (*TransactionResult) GetTxid

func (m *TransactionResult) GetTxid() string

func (*TransactionResult) ProtoMessage

func (*TransactionResult) ProtoMessage()

func (*TransactionResult) Reset

func (m *TransactionResult) Reset()

func (*TransactionResult) String

func (m *TransactionResult) String() string

func (*TransactionResult) XXX_DiscardUnknown

func (m *TransactionResult) XXX_DiscardUnknown()

func (*TransactionResult) XXX_Marshal

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

func (*TransactionResult) XXX_Merge

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

func (*TransactionResult) XXX_Size

func (m *TransactionResult) XXX_Size() int

func (*TransactionResult) XXX_Unmarshal

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

type Transaction_Type

type Transaction_Type int32
const (
	Transaction_UNDEFINED Transaction_Type = 0
	// deploy a chaincode to the network and call `Init` function
	Transaction_CHAINCODE_DEPLOY Transaction_Type = 1
	// call a chaincode `Invoke` function as a transaction
	Transaction_CHAINCODE_INVOKE Transaction_Type = 2
	// call a chaincode `query` function
	Transaction_CHAINCODE_QUERY Transaction_Type = 3
	// terminate a chaincode; not implemented yet
	Transaction_CHAINCODE_TERMINATE Transaction_Type = 4
)

func (Transaction_Type) EnumDescriptor

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

func (Transaction_Type) String

func (x Transaction_Type) String() string

type TransferDetail

type TransferDetail struct {
	MaxWindowSize        uint32   `protobuf:"varint,1,opt,name=maxWindowSize,proto3" json:"maxWindowSize,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TransferDetail) Descriptor

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

func (*TransferDetail) GetMaxWindowSize

func (m *TransferDetail) GetMaxWindowSize() uint32

func (*TransferDetail) ProtoMessage

func (*TransferDetail) ProtoMessage()

func (*TransferDetail) Reset

func (m *TransferDetail) Reset()

func (*TransferDetail) String

func (m *TransferDetail) String() string

func (*TransferDetail) XXX_DiscardUnknown

func (m *TransferDetail) XXX_DiscardUnknown()

func (*TransferDetail) XXX_Marshal

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

func (*TransferDetail) XXX_Merge

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

func (*TransferDetail) XXX_Size

func (m *TransferDetail) XXX_Size() int

func (*TransferDetail) XXX_Unmarshal

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

type TransferRequest

type TransferRequest struct {
	// Types that are valid to be assigned to Req:
	//	*TransferRequest_Index
	//	*TransferRequest_Query
	//	*TransferRequest_State
	//	*TransferRequest_Block
	//	*TransferRequest_Delta
	Req                  isTransferRequest_Req `protobuf_oneof:"req"`
	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
	XXX_unrecognized     []byte                `json:"-"`
	XXX_sizecache        int32                 `json:"-"`
}

request wrap one of the request field which has been negotiated in handshake phase

func (*TransferRequest) Descriptor

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

func (*TransferRequest) GetBlock

func (m *TransferRequest) GetBlock() *SyncBlockRange

func (*TransferRequest) GetDelta

func (m *TransferRequest) GetDelta() *SyncBlockRange

func (*TransferRequest) GetIndex

func (m *TransferRequest) GetIndex() uint64

func (*TransferRequest) GetQuery

func (m *TransferRequest) GetQuery() uint64

func (*TransferRequest) GetReq

func (m *TransferRequest) GetReq() isTransferRequest_Req

func (*TransferRequest) GetState

func (m *TransferRequest) GetState() *SyncOffset

func (*TransferRequest) ProtoMessage

func (*TransferRequest) ProtoMessage()

func (*TransferRequest) Reset

func (m *TransferRequest) Reset()

func (*TransferRequest) String

func (m *TransferRequest) String() string

func (*TransferRequest) XXX_DiscardUnknown

func (m *TransferRequest) XXX_DiscardUnknown()

func (*TransferRequest) XXX_Marshal

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

func (*TransferRequest) XXX_Merge

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

func (*TransferRequest) XXX_OneofFuncs

func (*TransferRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*TransferRequest) XXX_Size

func (m *TransferRequest) XXX_Size() int

func (*TransferRequest) XXX_Unmarshal

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

type TransferRequest_Block

type TransferRequest_Block struct {
	Block *SyncBlockRange `protobuf:"bytes,5,opt,name=block,proto3,oneof"`
}

type TransferRequest_Delta

type TransferRequest_Delta struct {
	Delta *SyncBlockRange `protobuf:"bytes,6,opt,name=delta,proto3,oneof"`
}

type TransferRequest_Index

type TransferRequest_Index struct {
	Index uint64 `protobuf:"varint,1,opt,name=index,proto3,oneof"`
}

type TransferRequest_Query

type TransferRequest_Query struct {
	Query uint64 `protobuf:"varint,2,opt,name=query,proto3,oneof"`
}

type TransferRequest_State

type TransferRequest_State struct {
	State *SyncOffset `protobuf:"bytes,4,opt,name=state,proto3,oneof"`
}

type TransferResponse

type TransferResponse struct {
	//both index and query should use this field
	Index *StateIndex      `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"`
	State *SyncStateChunk  `protobuf:"bytes,4,opt,name=state,proto3" json:"state,omitempty"`
	Block *SyncBlock       `protobuf:"bytes,5,opt,name=block,proto3" json:"block,omitempty"`
	Delta *SyncStateDeltas `protobuf:"bytes,6,opt,name=delta,proto3" json:"delta,omitempty"`
	//please notice seq is used for nothing than congest controlling
	//for example, server can consider the session is finished after
	//the last message is sent without waiting for client's acking
	Seq                  uint32   `protobuf:"varint,20,opt,name=seq,proto3" json:"seq,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

the response contain one of the payload and client should know which field it should check, its seq field is which transferAck can ack for, (notice seq is 32bit so there will be an implicit constration that a no more than 4G messages can be transferred in one session) it must be unique for each response message and incremental during a whole session

func (*TransferResponse) Descriptor

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

func (*TransferResponse) GetBlock

func (m *TransferResponse) GetBlock() *SyncBlock

func (*TransferResponse) GetDelta

func (m *TransferResponse) GetDelta() *SyncStateDeltas

func (*TransferResponse) GetIndex

func (m *TransferResponse) GetIndex() *StateIndex

func (*TransferResponse) GetSeq

func (m *TransferResponse) GetSeq() uint32

func (*TransferResponse) GetState

func (m *TransferResponse) GetState() *SyncStateChunk

func (*TransferResponse) ProtoMessage

func (*TransferResponse) ProtoMessage()

func (*TransferResponse) Reset

func (m *TransferResponse) Reset()

func (*TransferResponse) String

func (m *TransferResponse) String() string

func (*TransferResponse) XXX_DiscardUnknown

func (m *TransferResponse) XXX_DiscardUnknown()

func (*TransferResponse) XXX_Marshal

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

func (*TransferResponse) XXX_Merge

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

func (*TransferResponse) XXX_Size

func (m *TransferResponse) XXX_Size() int

func (*TransferResponse) XXX_Unmarshal

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

type TxFuncAsTxPreHandler

type TxFuncAsTxPreHandler func(*Transaction) (*Transaction, error)

a function filter the pure tx can also be converted to a prehandler interface

func (TxFuncAsTxPreHandler) Handle

type TxPreHandler

type TxPreHandler interface {
	Handle(*TransactionHandlingContext) (*TransactionHandlingContext, error)
}

func MutipleTxHandler

func MutipleTxHandler(m ...TxPreHandler) TxPreHandler

type TxQuery

type TxQuery struct {
	Txid                 []string `protobuf:"bytes,1,rep,name=txid,proto3" json:"txid,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

query some transactions, and the response should be a TransactionBlock message

func (*TxQuery) Descriptor

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

func (*TxQuery) GetTxid

func (m *TxQuery) GetTxid() []string

func (*TxQuery) ProtoMessage

func (*TxQuery) ProtoMessage()

func (*TxQuery) Reset

func (m *TxQuery) Reset()

func (*TxQuery) String

func (m *TxQuery) String() string

func (*TxQuery) XXX_DiscardUnknown

func (m *TxQuery) XXX_DiscardUnknown()

func (*TxQuery) XXX_Marshal

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

func (*TxQuery) XXX_Merge

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

func (*TxQuery) XXX_Size

func (m *TxQuery) XXX_Size() int

func (*TxQuery) XXX_Unmarshal

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

type Unregister

type Unregister struct {
	Events               []*Interest `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

---------- producer events ---------

func (*Unregister) Descriptor

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

func (*Unregister) GetEvents

func (m *Unregister) GetEvents() []*Interest

func (*Unregister) ProtoMessage

func (*Unregister) ProtoMessage()

func (*Unregister) Reset

func (m *Unregister) Reset()

func (*Unregister) String

func (m *Unregister) String() string

func (*Unregister) XXX_DiscardUnknown

func (m *Unregister) XXX_DiscardUnknown()

func (*Unregister) XXX_Marshal

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

func (*Unregister) XXX_Merge

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

func (*Unregister) XXX_Size

func (m *Unregister) XXX_Size() int

func (*Unregister) XXX_Unmarshal

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

type UpdatedValue

type UpdatedValue struct {
	ValueWrap            *UpdatedValue_VSlice `protobuf:"bytes,1,opt,name=valueWrap,proto3" json:"valueWrap,omitempty"`
	PreviousValue        []byte               `protobuf:"bytes,2,opt,name=previousValue,proto3" json:"previousValue,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*UpdatedValue) Descriptor

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

func (*UpdatedValue) GetPreviousValue

func (m *UpdatedValue) GetPreviousValue() []byte

func (*UpdatedValue) GetValue

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

func (*UpdatedValue) GetValueWrap

func (m *UpdatedValue) GetValueWrap() *UpdatedValue_VSlice

func (*UpdatedValue) IsDeleted

func (updatedValue *UpdatedValue) IsDeleted() bool

IsDeleted checks whether the key was deleted

func (*UpdatedValue) ProtoMessage

func (*UpdatedValue) ProtoMessage()

func (*UpdatedValue) Reset

func (m *UpdatedValue) Reset()

func (*UpdatedValue) String

func (m *UpdatedValue) String() string

func (*UpdatedValue) XXX_DiscardUnknown

func (m *UpdatedValue) XXX_DiscardUnknown()

func (*UpdatedValue) XXX_Marshal

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

func (*UpdatedValue) XXX_Merge

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

func (*UpdatedValue) XXX_Size

func (m *UpdatedValue) XXX_Size() int

func (*UpdatedValue) XXX_Unmarshal

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

type UpdatedValue_VSlice

type UpdatedValue_VSlice struct {
	Value                []byte   `protobuf:"bytes,1,opt,name=Value,proto3" json:"Value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UpdatedValue_VSlice) Descriptor

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

func (*UpdatedValue_VSlice) GetValue

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

func (*UpdatedValue_VSlice) ProtoMessage

func (*UpdatedValue_VSlice) ProtoMessage()

func (*UpdatedValue_VSlice) Reset

func (m *UpdatedValue_VSlice) Reset()

func (*UpdatedValue_VSlice) String

func (m *UpdatedValue_VSlice) String() string

func (*UpdatedValue_VSlice) XXX_DiscardUnknown

func (m *UpdatedValue_VSlice) XXX_DiscardUnknown()

func (*UpdatedValue_VSlice) XXX_Marshal

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

func (*UpdatedValue_VSlice) XXX_Merge

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

func (*UpdatedValue_VSlice) XXX_Size

func (m *UpdatedValue_VSlice) XXX_Size() int

func (*UpdatedValue_VSlice) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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