protos

package
Version: 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