protos

package
Version: v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2016 License: Apache-2.0 Imports: 8 Imported by: 180

Documentation

Overview

Package protos is a generated protocol buffer package.

It is generated from these files:

api.proto
chaincode.proto
devops.proto
events.proto
openchain.proto
server_admin.proto

It has these top-level messages:

BlockchainInfo
BlockNumber
BlockCount
ChaincodeID
ChaincodeInput
ChaincodeSpec
ChaincodeDeploymentSpec
ChaincodeInvocationSpec
ChaincodeIdentifier
ChaincodeRequestContext
ChaincodeExecutionContext
ChaincodeMessage
PutStateInfo
RangeQueryState
RangeQueryStateNext
RangeQueryStateClose
RangeQueryStateKeyValue
RangeQueryStateResponse
Secret
BuildResult
Interest
Register
Generic
OpenchainEvent
Transaction
TransactionBlock
TransactionResult
Block
NonHashData
PeerAddress
PeerID
PeerEndpoint
PeersMessage
HelloMessage
OpenchainMessage
Response
BlockState
SyncBlockRange
SyncBlocks
SyncStateSnapshotRequest
SyncStateSnapshot
SyncStateDeltasRequest
SyncStateDeltas
ServerStatus

Index

Constants

This section is empty.

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 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",
}
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,
}
View Source
var ChaincodeSpec_Type_name = map[int32]string{
	0: "UNDEFINED",
	1: "GOLANG",
	2: "NODE",
}
View Source
var ChaincodeSpec_Type_value = map[string]int32{
	"UNDEFINED": 0,
	"GOLANG":    1,
	"NODE":      2,
}
View Source
var ConfidentialityLevel_name = map[int32]string{
	0: "PUBLIC",
	1: "CONFIDENTIAL",
}
View Source
var ConfidentialityLevel_value = map[string]int32{
	"PUBLIC":       0,
	"CONFIDENTIAL": 1,
}
View Source
var Interest_ResponseType_name = map[int32]string{
	0: "DONTSEND",
	1: "PROTOBUF",
	2: "JSON",
}
View Source
var Interest_ResponseType_value = map[string]int32{
	"DONTSEND": 0,
	"PROTOBUF": 1,
	"JSON":     2,
}
View Source
var OpenchainMessage_Type_name = map[int32]string{
	0:  "UNDEFINED",
	1:  "DISC_HELLO",
	2:  "DISC_DISCONNECT",
	3:  "DISC_GET_PEERS",
	4:  "DISC_PEERS",
	5:  "DISC_NEWMSG",
	6:  "CHAIN_STATUS",
	7:  "CHAIN_TRANSACTION",
	8:  "CHAIN_GET_TRANSACTIONS",
	9:  "CHAIN_QUERY",
	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 OpenchainMessage_Type_value = map[string]int32{
	"UNDEFINED":               0,
	"DISC_HELLO":              1,
	"DISC_DISCONNECT":         2,
	"DISC_GET_PEERS":          3,
	"DISC_PEERS":              4,
	"DISC_NEWMSG":             5,
	"CHAIN_STATUS":            6,
	"CHAIN_TRANSACTION":       7,
	"CHAIN_GET_TRANSACTIONS":  8,
	"CHAIN_QUERY":             9,
	"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 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 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 Transaction_Type_name = map[int32]string{
	0: "UNDEFINED",
	1: "CHAINCODE_NEW",
	2: "CHAINCODE_UPDATE",
	3: "CHAINCODE_EXECUTE",
	4: "CHAINCODE_QUERY",
	5: "CHAINCODE_TERMINATE",
}
View Source
var Transaction_Type_value = map[string]int32{
	"UNDEFINED":           0,
	"CHAINCODE_NEW":       1,
	"CHAINCODE_UPDATE":    2,
	"CHAINCODE_EXECUTE":   3,
	"CHAINCODE_QUERY":     4,
	"CHAINCODE_TERMINATE": 5,
}

Functions

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 RegisterOpenchainEventsServer

func RegisterOpenchainEventsServer(s *grpc.Server, srv OpenchainEventsServer)

func RegisterOpenchainServer

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

func RegisterPeerServer

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

Types

type AdminClient

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

func NewAdminClient

func NewAdminClient(cc *grpc.ClientConn) AdminClient

type AdminServer

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

type Block

type Block struct {
	Version           uint32                     `protobuf:"varint,1,opt,name=version" json:"version,omitempty"`
	Timestamp         *google_protobuf.Timestamp `protobuf:"bytes,2,opt,name=timestamp" json:"timestamp,omitempty"`
	Transactions      []*Transaction             `protobuf:"bytes,3,rep,name=transactions" 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" json:"nonHashData,omitempty"`
}

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 optionaly 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 UnmarshallBlock

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

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

func (*Block) Bytes

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

Bytes returns this block as an array of bytes.

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) GetStateHash

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

GetStateHash returns the stateHash stored in this block. The stateHash is the value returned by state.GetHash() after running all transactions in the block.

func (*Block) GetTimestamp

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

func (*Block) GetTransactions

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

func (*Block) ProtoMessage

func (*Block) ProtoMessage()

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

type BlockCount

type BlockCount struct {
	Count uint64 `protobuf:"varint,1,opt,name=count" json:"count,omitempty"`
}

Specifies the current number of blocks in the blockchain.

func (*BlockCount) ProtoMessage

func (*BlockCount) ProtoMessage()

func (*BlockCount) Reset

func (m *BlockCount) Reset()

func (*BlockCount) String

func (m *BlockCount) String() string

type BlockNumber

type BlockNumber struct {
	Number uint64 `protobuf:"varint,1,opt,name=number" json:"number,omitempty"`
}

Specifies the block number to be returned from the blockchain.

func (*BlockNumber) ProtoMessage

func (*BlockNumber) ProtoMessage()

func (*BlockNumber) Reset

func (m *BlockNumber) Reset()

func (*BlockNumber) String

func (m *BlockNumber) String() string

type BlockState

type BlockState struct {
	Block      *Block `protobuf:"bytes,1,opt,name=block" json:"block,omitempty"`
	StateDelta []byte `protobuf:"bytes,2,opt,name=stateDelta,proto3" json:"stateDelta,omitempty"`
}

BlockState is the payload of OpenchainMessage.SYNC_BLOCK_ADDED. When a VP commits a new block to the ledger, it will notify its connected NVPs of the block and the delta state. The NVP may call the ledger APIs to apply the block and the delta state to its ledger if the block's previousBlockHash equals to the NVP's current block hash

func (*BlockState) GetBlock

func (m *BlockState) GetBlock() *Block

func (*BlockState) ProtoMessage

func (*BlockState) ProtoMessage()

func (*BlockState) Reset

func (m *BlockState) Reset()

func (*BlockState) String

func (m *BlockState) String() string

type BlockchainInfo

type BlockchainInfo struct {
	Height            uint64 `protobuf:"varint,1,opt,name=height" 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"`
}

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

func (*BlockchainInfo) ProtoMessage

func (*BlockchainInfo) ProtoMessage()

func (*BlockchainInfo) Reset

func (m *BlockchainInfo) Reset()

func (*BlockchainInfo) String

func (m *BlockchainInfo) String() string

type BuildResult

type BuildResult struct {
	Status         BuildResult_StatusCode   `protobuf:"varint,1,opt,name=status,enum=protos.BuildResult_StatusCode" json:"status,omitempty"`
	Msg            string                   `protobuf:"bytes,2,opt,name=msg" json:"msg,omitempty"`
	DeploymentSpec *ChaincodeDeploymentSpec `protobuf:"bytes,3,opt,name=deploymentSpec" json:"deploymentSpec,omitempty"`
}

func (*BuildResult) GetDeploymentSpec

func (m *BuildResult) GetDeploymentSpec() *ChaincodeDeploymentSpec

func (*BuildResult) ProtoMessage

func (*BuildResult) ProtoMessage()

func (*BuildResult) Reset

func (m *BuildResult) Reset()

func (*BuildResult) String

func (m *BuildResult) String() string

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) String

func (x BuildResult_StatusCode) String() string

type ChaincodeDeploymentSpec

type ChaincodeDeploymentSpec struct {
	ChaincodeSpec *ChaincodeSpec `protobuf:"bytes,1,opt,name=chaincodeSpec" json:"chaincodeSpec,omitempty"`
	// Controls when the chaincode becomes executable.
	EffectiveDate *google_protobuf.Timestamp `protobuf:"bytes,2,opt,name=effectiveDate" json:"effectiveDate,omitempty"`
	CodePackage   []byte                     `protobuf:"bytes,3,opt,name=codePackage,proto3" json:"codePackage,omitempty"`
}

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

func (*ChaincodeDeploymentSpec) GetChaincodeSpec

func (m *ChaincodeDeploymentSpec) GetChaincodeSpec() *ChaincodeSpec

func (*ChaincodeDeploymentSpec) GetEffectiveDate

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

func (*ChaincodeDeploymentSpec) ProtoMessage

func (*ChaincodeDeploymentSpec) ProtoMessage()

func (*ChaincodeDeploymentSpec) Reset

func (m *ChaincodeDeploymentSpec) Reset()

func (*ChaincodeDeploymentSpec) String

func (m *ChaincodeDeploymentSpec) String() string

type ChaincodeExecutionContext

type ChaincodeExecutionContext struct {
	ChaincodeId *ChaincodeIdentifier       `protobuf:"bytes,1,opt,name=ChaincodeId" json:"ChaincodeId,omitempty"`
	Timestamp   *google_protobuf.Timestamp `protobuf:"bytes,2,opt,name=Timestamp" json:"Timestamp,omitempty"`
}

Provided by the peer to the chaincode to identify the requesting chaincode and allow for proper access to state.

func (*ChaincodeExecutionContext) GetChaincodeId

func (m *ChaincodeExecutionContext) GetChaincodeId() *ChaincodeIdentifier

func (*ChaincodeExecutionContext) GetTimestamp

func (*ChaincodeExecutionContext) ProtoMessage

func (*ChaincodeExecutionContext) ProtoMessage()

func (*ChaincodeExecutionContext) Reset

func (m *ChaincodeExecutionContext) Reset()

func (*ChaincodeExecutionContext) String

func (m *ChaincodeExecutionContext) String() string

type ChaincodeID

type ChaincodeID struct {
	// deploy transaction will use the path
	Path string `protobuf:"bytes,1,opt,name=path" 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" json:"name,omitempty"`
}

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) ProtoMessage

func (*ChaincodeID) ProtoMessage()

func (*ChaincodeID) Reset

func (m *ChaincodeID) Reset()

func (*ChaincodeID) String

func (m *ChaincodeID) String() string

type ChaincodeIdentifier

type ChaincodeIdentifier struct {
	// URL for accessing the Chaincode, eg. https://github.com/user/SampleContract
	Url string `protobuf:"bytes,1,opt,name=Url" json:"Url,omitempty"`
}

TODO: Merge this with ChaincodeID.

func (*ChaincodeIdentifier) ProtoMessage

func (*ChaincodeIdentifier) ProtoMessage()

func (*ChaincodeIdentifier) Reset

func (m *ChaincodeIdentifier) Reset()

func (*ChaincodeIdentifier) String

func (m *ChaincodeIdentifier) String() string

type ChaincodeInput

type ChaincodeInput struct {
	Function string   `protobuf:"bytes,1,opt,name=function" json:"function,omitempty"`
	Args     []string `protobuf:"bytes,2,rep,name=args" json:"args,omitempty"`
}

Carries the chaincode function and its arguments.

func (*ChaincodeInput) ProtoMessage

func (*ChaincodeInput) ProtoMessage()

func (*ChaincodeInput) Reset

func (m *ChaincodeInput) Reset()

func (*ChaincodeInput) String

func (m *ChaincodeInput) String() string

type ChaincodeInvocationSpec

type ChaincodeInvocationSpec struct {
	ChaincodeSpec *ChaincodeSpec `protobuf:"bytes,1,opt,name=chaincodeSpec" json:"chaincodeSpec,omitempty"`
}

Carries the chaincode function and its arguments.

func (*ChaincodeInvocationSpec) GetChaincodeSpec

func (m *ChaincodeInvocationSpec) GetChaincodeSpec() *ChaincodeSpec

func (*ChaincodeInvocationSpec) ProtoMessage

func (*ChaincodeInvocationSpec) ProtoMessage()

func (*ChaincodeInvocationSpec) Reset

func (m *ChaincodeInvocationSpec) Reset()

func (*ChaincodeInvocationSpec) String

func (m *ChaincodeInvocationSpec) String() string

type ChaincodeMessage

type ChaincodeMessage struct {
	Type      ChaincodeMessage_Type      `protobuf:"varint,1,opt,name=type,enum=protos.ChaincodeMessage_Type" json:"type,omitempty"`
	Timestamp *google_protobuf.Timestamp `protobuf:"bytes,2,opt,name=timestamp" json:"timestamp,omitempty"`
	Payload   []byte                     `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
	Uuid      string                     `protobuf:"bytes,4,opt,name=uuid" json:"uuid,omitempty"`
}

func (*ChaincodeMessage) GetTimestamp

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

func (*ChaincodeMessage) ProtoMessage

func (*ChaincodeMessage) ProtoMessage()

func (*ChaincodeMessage) Reset

func (m *ChaincodeMessage) Reset()

func (*ChaincodeMessage) String

func (m *ChaincodeMessage) String() string

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
)

func (ChaincodeMessage_Type) String

func (x ChaincodeMessage_Type) String() string

type ChaincodeRequestContext

type ChaincodeRequestContext struct {
	Id *ChaincodeIdentifier `protobuf:"bytes,1,opt,name=Id" json:"Id,omitempty"`
}

Used by the peer to identify the requesting chaincode and allows for proper access to state.

func (*ChaincodeRequestContext) GetId

func (*ChaincodeRequestContext) ProtoMessage

func (*ChaincodeRequestContext) ProtoMessage()

func (*ChaincodeRequestContext) Reset

func (m *ChaincodeRequestContext) Reset()

func (*ChaincodeRequestContext) String

func (m *ChaincodeRequestContext) String() string

type ChaincodeSpec

type ChaincodeSpec struct {
	Type                 ChaincodeSpec_Type   `protobuf:"varint,1,opt,name=type,enum=protos.ChaincodeSpec_Type" json:"type,omitempty"`
	ChaincodeID          *ChaincodeID         `protobuf:"bytes,2,opt,name=chaincodeID" json:"chaincodeID,omitempty"`
	CtorMsg              *ChaincodeInput      `protobuf:"bytes,3,opt,name=ctorMsg" json:"ctorMsg,omitempty"`
	Timeout              int32                `protobuf:"varint,4,opt,name=timeout" json:"timeout,omitempty"`
	SecureContext        string               `protobuf:"bytes,5,opt,name=secureContext" json:"secureContext,omitempty"`
	ConfidentialityLevel ConfidentialityLevel `protobuf:"varint,6,opt,name=confidentialityLevel,enum=protos.ConfidentialityLevel" json:"confidentialityLevel,omitempty"`
	Metadata             []byte               `protobuf:"bytes,7,opt,name=metadata,proto3" json:"metadata,omitempty"`
}

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

func (*ChaincodeSpec) GetChaincodeID

func (m *ChaincodeSpec) GetChaincodeID() *ChaincodeID

func (*ChaincodeSpec) GetCtorMsg

func (m *ChaincodeSpec) GetCtorMsg() *ChaincodeInput

func (*ChaincodeSpec) ProtoMessage

func (*ChaincodeSpec) ProtoMessage()

func (*ChaincodeSpec) Reset

func (m *ChaincodeSpec) Reset()

func (*ChaincodeSpec) String

func (m *ChaincodeSpec) String() string

type ChaincodeSpec_Type

type ChaincodeSpec_Type int32
const (
	ChaincodeSpec_UNDEFINED ChaincodeSpec_Type = 0
	ChaincodeSpec_GOLANG    ChaincodeSpec_Type = 1
	ChaincodeSpec_NODE      ChaincodeSpec_Type = 2
)

func (ChaincodeSpec_Type) String

func (x ChaincodeSpec_Type) String() string

type ChaincodeSupportClient

type ChaincodeSupportClient interface {
	// Return the datetime.
	GetExecutionContext(ctx context.Context, in *ChaincodeRequestContext, opts ...grpc.CallOption) (*ChaincodeExecutionContext, error)
	Register(ctx context.Context, opts ...grpc.CallOption) (ChaincodeSupport_RegisterClient, error)
}

func NewChaincodeSupportClient

func NewChaincodeSupportClient(cc *grpc.ClientConn) ChaincodeSupportClient

type ChaincodeSupportServer

type ChaincodeSupportServer interface {
	// Return the datetime.
	GetExecutionContext(context.Context, *ChaincodeRequestContext) (*ChaincodeExecutionContext, error)
	Register(ChaincodeSupport_RegisterServer) error
}

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) 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)
	// Invoke chaincode.
	Query(ctx context.Context, in *ChaincodeInvocationSpec, opts ...grpc.CallOption) (*Response, error)
}

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)
	// Invoke chaincode.
	Query(context.Context, *ChaincodeInvocationSpec) (*Response, error)
}

type Generic

type Generic struct {
	EventType string `protobuf:"bytes,1,opt,name=eventType" json:"eventType,omitempty"`
	Payload   []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
}

---------- producer events --------- Generic is used for encoding payload as JSON or raw bytes string type - "generic"

func (*Generic) ProtoMessage

func (*Generic) ProtoMessage()

func (*Generic) Reset

func (m *Generic) Reset()

func (*Generic) String

func (m *Generic) String() string

type HelloMessage

type HelloMessage struct {
	PeerEndpoint *PeerEndpoint `protobuf:"bytes,1,opt,name=peerEndpoint" json:"peerEndpoint,omitempty"`
	BlockNumber  uint64        `protobuf:"varint,2,opt,name=blockNumber" json:"blockNumber,omitempty"`
}

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

type Interest

type Interest struct {
	EventType    string                `protobuf:"bytes,1,opt,name=eventType" json:"eventType,omitempty"`
	ResponseType Interest_ResponseType `protobuf:"varint,2,opt,name=responseType,enum=protos.Interest_ResponseType" json:"responseType,omitempty"`
}

func (*Interest) ProtoMessage

func (*Interest) ProtoMessage()

func (*Interest) Reset

func (m *Interest) Reset()

func (*Interest) String

func (m *Interest) String() string

type Interest_ResponseType

type Interest_ResponseType int32
const (
	// don't send events (used to cancel interest)
	Interest_DONTSEND Interest_ResponseType = 0
	// send protobuf objects
	Interest_PROTOBUF Interest_ResponseType = 1
	// marshall into JSON byte array
	Interest_JSON Interest_ResponseType = 2
)

func (Interest_ResponseType) String

func (x Interest_ResponseType) String() string

type NonHashData

type NonHashData struct {
	LocalLedgerCommitTimestamp *google_protobuf.Timestamp `protobuf:"bytes,1,opt,name=localLedgerCommitTimestamp" json:"localLedgerCommitTimestamp,omitempty"`
	TransactionResults         []*TransactionResult       `protobuf:"bytes,2,rep,name=transactionResults" json:"transactionResults,omitempty"`
}

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. transactionResults - The results of transactions.

func (*NonHashData) GetLocalLedgerCommitTimestamp

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

func (*NonHashData) GetTransactionResults

func (m *NonHashData) GetTransactionResults() []*TransactionResult

func (*NonHashData) ProtoMessage

func (*NonHashData) ProtoMessage()

func (*NonHashData) Reset

func (m *NonHashData) Reset()

func (*NonHashData) String

func (m *NonHashData) String() string

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 *google_protobuf1.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 *google_protobuf1.Empty, opts ...grpc.CallOption) (*BlockCount, error)
}

func NewOpenchainClient

func NewOpenchainClient(cc *grpc.ClientConn) OpenchainClient

type OpenchainEvent

type OpenchainEvent struct {
	// TODO need timestamp
	//
	// Types that are valid to be assigned to Event:
	//	*OpenchainEvent_Register
	//	*OpenchainEvent_Block
	//	*OpenchainEvent_Generic
	Event isOpenchainEvent_Event `protobuf_oneof:"Event"`
}

OpenchainEvent is used by

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

func (*OpenchainEvent) GetBlock

func (m *OpenchainEvent) GetBlock() *Block

func (*OpenchainEvent) GetEvent

func (m *OpenchainEvent) GetEvent() isOpenchainEvent_Event

func (*OpenchainEvent) GetGeneric

func (m *OpenchainEvent) GetGeneric() *Generic

func (*OpenchainEvent) GetRegister

func (m *OpenchainEvent) GetRegister() *Register

func (*OpenchainEvent) ProtoMessage

func (*OpenchainEvent) ProtoMessage()

func (*OpenchainEvent) Reset

func (m *OpenchainEvent) Reset()

func (*OpenchainEvent) String

func (m *OpenchainEvent) String() string

func (*OpenchainEvent) XXX_OneofFuncs

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

XXX_OneofFuncs is for the internal use of the proto package.

type OpenchainEvent_Block

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

type OpenchainEvent_Generic

type OpenchainEvent_Generic struct {
	Generic *Generic `protobuf:"bytes,3,opt,name=generic,oneof"`
}

type OpenchainEvent_Register

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

type OpenchainEventsClient

type OpenchainEventsClient interface {
	// event chatting using OpenchainEvent
	Chat(ctx context.Context, opts ...grpc.CallOption) (OpenchainEvents_ChatClient, error)
}

func NewOpenchainEventsClient

func NewOpenchainEventsClient(cc *grpc.ClientConn) OpenchainEventsClient

type OpenchainEventsServer

type OpenchainEventsServer interface {
	// event chatting using OpenchainEvent
	Chat(OpenchainEvents_ChatServer) error
}

type OpenchainEvents_ChatClient

type OpenchainEvents_ChatClient interface {
	Send(*OpenchainEvent) error
	Recv() (*OpenchainEvent, error)
	grpc.ClientStream
}

type OpenchainEvents_ChatServer

type OpenchainEvents_ChatServer interface {
	Send(*OpenchainEvent) error
	Recv() (*OpenchainEvent, error)
	grpc.ServerStream
}

type OpenchainMessage

type OpenchainMessage struct {
	Type      OpenchainMessage_Type      `protobuf:"varint,1,opt,name=type,enum=protos.OpenchainMessage_Type" json:"type,omitempty"`
	Timestamp *google_protobuf.Timestamp `protobuf:"bytes,2,opt,name=timestamp" 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"`
}

func (*OpenchainMessage) GetTimestamp

func (m *OpenchainMessage) GetTimestamp() *google_protobuf.Timestamp

func (*OpenchainMessage) ProtoMessage

func (*OpenchainMessage) ProtoMessage()

func (*OpenchainMessage) Reset

func (m *OpenchainMessage) Reset()

func (*OpenchainMessage) String

func (m *OpenchainMessage) String() string

type OpenchainMessage_Type

type OpenchainMessage_Type int32
const (
	OpenchainMessage_UNDEFINED               OpenchainMessage_Type = 0
	OpenchainMessage_DISC_HELLO              OpenchainMessage_Type = 1
	OpenchainMessage_DISC_DISCONNECT         OpenchainMessage_Type = 2
	OpenchainMessage_DISC_GET_PEERS          OpenchainMessage_Type = 3
	OpenchainMessage_DISC_PEERS              OpenchainMessage_Type = 4
	OpenchainMessage_DISC_NEWMSG             OpenchainMessage_Type = 5
	OpenchainMessage_CHAIN_STATUS            OpenchainMessage_Type = 6
	OpenchainMessage_CHAIN_TRANSACTION       OpenchainMessage_Type = 7
	OpenchainMessage_CHAIN_GET_TRANSACTIONS  OpenchainMessage_Type = 8
	OpenchainMessage_CHAIN_QUERY             OpenchainMessage_Type = 9
	OpenchainMessage_SYNC_GET_BLOCKS         OpenchainMessage_Type = 11
	OpenchainMessage_SYNC_BLOCKS             OpenchainMessage_Type = 12
	OpenchainMessage_SYNC_BLOCK_ADDED        OpenchainMessage_Type = 13
	OpenchainMessage_SYNC_STATE_GET_SNAPSHOT OpenchainMessage_Type = 14
	OpenchainMessage_SYNC_STATE_SNAPSHOT     OpenchainMessage_Type = 15
	OpenchainMessage_SYNC_STATE_GET_DELTAS   OpenchainMessage_Type = 16
	OpenchainMessage_SYNC_STATE_DELTAS       OpenchainMessage_Type = 17
	OpenchainMessage_RESPONSE                OpenchainMessage_Type = 20
	OpenchainMessage_CONSENSUS               OpenchainMessage_Type = 21
)

func (OpenchainMessage_Type) String

func (x OpenchainMessage_Type) String() string

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, *google_protobuf1.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, *google_protobuf1.Empty) (*BlockCount, error)
}

type PeerAddress

type PeerAddress struct {
	Host string `protobuf:"bytes,1,opt,name=host" json:"host,omitempty"`
	Port int32  `protobuf:"varint,2,opt,name=port" json:"port,omitempty"`
}

func (*PeerAddress) ProtoMessage

func (*PeerAddress) ProtoMessage()

func (*PeerAddress) Reset

func (m *PeerAddress) Reset()

func (*PeerAddress) String

func (m *PeerAddress) String() string

type PeerClient

type PeerClient interface {
	// Accepts a stream of OpenchainMessage during chat session, while receiving
	// other OpenchainMessage (e.g. from other peers).
	Chat(ctx context.Context, opts ...grpc.CallOption) (Peer_ChatClient, error)
}

func NewPeerClient

func NewPeerClient(cc *grpc.ClientConn) PeerClient

type PeerEndpoint

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

func (*PeerEndpoint) GetID

func (m *PeerEndpoint) GetID() *PeerID

func (*PeerEndpoint) ProtoMessage

func (*PeerEndpoint) ProtoMessage()

func (*PeerEndpoint) Reset

func (m *PeerEndpoint) Reset()

func (*PeerEndpoint) String

func (m *PeerEndpoint) String() string

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) String

func (x PeerEndpoint_Type) String() string

type PeerID

type PeerID struct {
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}

func (*PeerID) ProtoMessage

func (*PeerID) ProtoMessage()

func (*PeerID) Reset

func (m *PeerID) Reset()

func (*PeerID) String

func (m *PeerID) String() string

type PeerServer

type PeerServer interface {
	// Accepts a stream of OpenchainMessage during chat session, while receiving
	// other OpenchainMessage (e.g. from other peers).
	Chat(Peer_ChatServer) error
}

type Peer_ChatClient

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

type Peer_ChatServer

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

type PeersMessage

type PeersMessage struct {
	Peers []*PeerEndpoint `protobuf:"bytes,1,rep,name=peers" json:"peers,omitempty"`
}

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

type PutStateInfo

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

func (*PutStateInfo) ProtoMessage

func (*PutStateInfo) ProtoMessage()

func (*PutStateInfo) Reset

func (m *PutStateInfo) Reset()

func (*PutStateInfo) String

func (m *PutStateInfo) String() string

type RangeQueryState

type RangeQueryState struct {
	StartKey string `protobuf:"bytes,1,opt,name=startKey" json:"startKey,omitempty"`
	EndKey   string `protobuf:"bytes,2,opt,name=endKey" json:"endKey,omitempty"`
}

func (*RangeQueryState) ProtoMessage

func (*RangeQueryState) ProtoMessage()

func (*RangeQueryState) Reset

func (m *RangeQueryState) Reset()

func (*RangeQueryState) String

func (m *RangeQueryState) String() string

type RangeQueryStateClose

type RangeQueryStateClose struct {
	ID string `protobuf:"bytes,1,opt,name=ID" json:"ID,omitempty"`
}

func (*RangeQueryStateClose) ProtoMessage

func (*RangeQueryStateClose) ProtoMessage()

func (*RangeQueryStateClose) Reset

func (m *RangeQueryStateClose) Reset()

func (*RangeQueryStateClose) String

func (m *RangeQueryStateClose) String() string

type RangeQueryStateKeyValue

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

func (*RangeQueryStateKeyValue) ProtoMessage

func (*RangeQueryStateKeyValue) ProtoMessage()

func (*RangeQueryStateKeyValue) Reset

func (m *RangeQueryStateKeyValue) Reset()

func (*RangeQueryStateKeyValue) String

func (m *RangeQueryStateKeyValue) String() string

type RangeQueryStateNext

type RangeQueryStateNext struct {
	ID string `protobuf:"bytes,1,opt,name=ID" json:"ID,omitempty"`
}

func (*RangeQueryStateNext) ProtoMessage

func (*RangeQueryStateNext) ProtoMessage()

func (*RangeQueryStateNext) Reset

func (m *RangeQueryStateNext) Reset()

func (*RangeQueryStateNext) String

func (m *RangeQueryStateNext) String() string

type RangeQueryStateResponse

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

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

type Register

type Register struct {
	Events []*Interest `protobuf:"bytes,1,rep,name=events" json:"events,omitempty"`
}

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

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

type Response

type Response struct {
	Status Response_StatusCode `protobuf:"varint,1,opt,name=status,enum=protos.Response_StatusCode" json:"status,omitempty"`
	Msg    []byte              `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
}

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) String

func (m *Response) String() string

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) String

func (x Response_StatusCode) String() string

type Secret

type Secret struct {
	EnrollId     string `protobuf:"bytes,1,opt,name=enrollId" json:"enrollId,omitempty"`
	EnrollSecret string `protobuf:"bytes,2,opt,name=enrollSecret" json:"enrollSecret,omitempty"`
}

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

func (*Secret) ProtoMessage

func (*Secret) ProtoMessage()

func (*Secret) Reset

func (m *Secret) Reset()

func (*Secret) String

func (m *Secret) String() string

type ServerStatus

type ServerStatus struct {
	Status ServerStatus_StatusCode `protobuf:"varint,1,opt,name=status,enum=protos.ServerStatus_StatusCode" json:"status,omitempty"`
}

func (*ServerStatus) ProtoMessage

func (*ServerStatus) ProtoMessage()

func (*ServerStatus) Reset

func (m *ServerStatus) Reset()

func (*ServerStatus) String

func (m *ServerStatus) String() string

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) String

func (x ServerStatus_StatusCode) String() string

type SyncBlockRange

type SyncBlockRange struct {
	Start uint64 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"`
	End   uint64 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"`
}

SyncBlockRange is the payload of OpenchainMessage.SYNC_GET_BLOCKS, 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) ProtoMessage

func (*SyncBlockRange) ProtoMessage()

func (*SyncBlockRange) Reset

func (m *SyncBlockRange) Reset()

func (*SyncBlockRange) String

func (m *SyncBlockRange) String() string

type SyncBlocks

type SyncBlocks struct {
	Range  *SyncBlockRange `protobuf:"bytes,1,opt,name=range" json:"range,omitempty"`
	Blocks []*Block        `protobuf:"bytes,2,rep,name=blocks" json:"blocks,omitempty"`
}

SyncBlocks is the payload of OpenchainMessage.SYNC_BLOCKS, where the range indicates the blocks responded to the request SYNC_GET_BLOCKS

func (*SyncBlocks) GetBlocks

func (m *SyncBlocks) GetBlocks() []*Block

func (*SyncBlocks) GetRange

func (m *SyncBlocks) GetRange() *SyncBlockRange

func (*SyncBlocks) ProtoMessage

func (*SyncBlocks) ProtoMessage()

func (*SyncBlocks) Reset

func (m *SyncBlocks) Reset()

func (*SyncBlocks) String

func (m *SyncBlocks) String() string

type SyncStateDeltas

type SyncStateDeltas struct {
	Range  *SyncBlockRange `protobuf:"bytes,1,opt,name=range" json:"range,omitempty"`
	Deltas [][]byte        `protobuf:"bytes,2,rep,name=deltas,proto3" json:"deltas,omitempty"`
}

SyncStateDeltas is the payload of the OpenchainMessage.SYNC_STATE in response to the OpenchainMessage.SYNC_GET_STATE message.

func (*SyncStateDeltas) GetRange

func (m *SyncStateDeltas) GetRange() *SyncBlockRange

func (*SyncStateDeltas) ProtoMessage

func (*SyncStateDeltas) ProtoMessage()

func (*SyncStateDeltas) Reset

func (m *SyncStateDeltas) Reset()

func (*SyncStateDeltas) String

func (m *SyncStateDeltas) String() string

type SyncStateDeltasRequest

type SyncStateDeltasRequest struct {
	Range *SyncBlockRange `protobuf:"bytes,1,opt,name=range" json:"range,omitempty"`
}

SyncStateRequest is the payload of OpenchainMessage.SYNC_GET_STATE. blockNumber indicates the block number for the delta which is being requested. If no payload is included with SYNC_GET_STATE, it represents a request for a snapshot of the current state.

func (*SyncStateDeltasRequest) GetRange

func (m *SyncStateDeltasRequest) GetRange() *SyncBlockRange

func (*SyncStateDeltasRequest) ProtoMessage

func (*SyncStateDeltasRequest) ProtoMessage()

func (*SyncStateDeltasRequest) Reset

func (m *SyncStateDeltasRequest) Reset()

func (*SyncStateDeltasRequest) String

func (m *SyncStateDeltasRequest) String() string

type SyncStateSnapshot

type SyncStateSnapshot struct {
	Delta       []byte                    `protobuf:"bytes,1,opt,name=delta,proto3" json:"delta,omitempty"`
	Sequence    uint64                    `protobuf:"varint,2,opt,name=sequence" json:"sequence,omitempty"`
	BlockNumber uint64                    `protobuf:"varint,3,opt,name=blockNumber" json:"blockNumber,omitempty"`
	Request     *SyncStateSnapshotRequest `protobuf:"bytes,4,opt,name=request" json:"request,omitempty"`
}

SyncState is the payload of OpenchainMessage.SYNC_SNAPSHOT, which is a response to penchainMessage.SYNC_GET_SNAPSHOT. It contains the snapshot or a chunk of the snapshot on stream, and in which case, the sequence indicate the order starting at 0. The terminating message will have len(delta) == 0.

func (*SyncStateSnapshot) GetRequest

func (*SyncStateSnapshot) ProtoMessage

func (*SyncStateSnapshot) ProtoMessage()

func (*SyncStateSnapshot) Reset

func (m *SyncStateSnapshot) Reset()

func (*SyncStateSnapshot) String

func (m *SyncStateSnapshot) String() string

type SyncStateSnapshotRequest

type SyncStateSnapshotRequest struct {
	CorrelationId uint64 `protobuf:"varint,1,opt,name=correlationId" json:"correlationId,omitempty"`
}

SyncSnapshotRequest Payload for the penchainMessage.SYNC_GET_SNAPSHOT message.

func (*SyncStateSnapshotRequest) ProtoMessage

func (*SyncStateSnapshotRequest) ProtoMessage()

func (*SyncStateSnapshotRequest) Reset

func (m *SyncStateSnapshotRequest) Reset()

func (*SyncStateSnapshotRequest) String

func (m *SyncStateSnapshotRequest) String() string

type Transaction

type Transaction struct {
	Type Transaction_Type `protobuf:"varint,1,opt,name=type,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"`
	Uuid                 string                     `protobuf:"bytes,5,opt,name=uuid" json:"uuid,omitempty"`
	Timestamp            *google_protobuf.Timestamp `protobuf:"bytes,6,opt,name=timestamp" json:"timestamp,omitempty"`
	ConfidentialityLevel ConfidentialityLevel       `protobuf:"varint,7,opt,name=confidentialityLevel,enum=protos.ConfidentialityLevel" json:"confidentialityLevel,omitempty"`
	Nonce                []byte                     `protobuf:"bytes,8,opt,name=nonce,proto3" json:"nonce,omitempty"`
	Cert                 []byte                     `protobuf:"bytes,9,opt,name=cert,proto3" json:"cert,omitempty"`
	Signature            []byte                     `protobuf:"bytes,10,opt,name=signature,proto3" json:"signature,omitempty"`
}

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 deploy chaincode.

func NewTransaction

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

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 (*Transaction) Bytes

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

Bytes returns this transaction as an array of bytes.

func (*Transaction) GetTimestamp

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

func (*Transaction) ProtoMessage

func (*Transaction) ProtoMessage()

func (*Transaction) Reset

func (m *Transaction) Reset()

func (*Transaction) String

func (m *Transaction) String() string

type TransactionBlock

type TransactionBlock struct {
	Transactions []*Transaction `protobuf:"bytes,1,rep,name=transactions" json:"transactions,omitempty"`
}

TransactionBlock carries a batch of transactions.

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

type TransactionResult

type TransactionResult struct {
	Uuid      string `protobuf:"bytes,1,opt,name=uuid" json:"uuid,omitempty"`
	Result    []byte `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"`
	ErrorCode uint32 `protobuf:"varint,3,opt,name=errorCode" json:"errorCode,omitempty"`
	Error     string `protobuf:"bytes,4,opt,name=error" json:"error,omitempty"`
}

TransactionResult contains the return value of a transaction. It does not track potential state changes that were a result of the transaction. uuid - 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.

func (*TransactionResult) ProtoMessage

func (*TransactionResult) ProtoMessage()

func (*TransactionResult) Reset

func (m *TransactionResult) Reset()

func (*TransactionResult) String

func (m *TransactionResult) String() string

type Transaction_Type

type Transaction_Type int32
const (
	Transaction_UNDEFINED           Transaction_Type = 0
	Transaction_CHAINCODE_NEW       Transaction_Type = 1
	Transaction_CHAINCODE_UPDATE    Transaction_Type = 2
	Transaction_CHAINCODE_EXECUTE   Transaction_Type = 3
	Transaction_CHAINCODE_QUERY     Transaction_Type = 4
	Transaction_CHAINCODE_TERMINATE Transaction_Type = 5
)

func (Transaction_Type) String

func (x Transaction_Type) String() string

Jump to

Keyboard shortcuts

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