Documentation
¶
Overview ¶
Package proto_connector is a generated protocol buffer package.
It is generated from these files:
server.proto
It has these top-level messages:
Request LockOperation LedgerOperation CocoonCodeOperation Response
Index ¶
- Variables
- func RegisterConnectorServer(s *grpc.Server, srv ConnectorServer)
- type CocoonCodeOperation
- func (*CocoonCodeOperation) Descriptor() ([]byte, []int)
- func (m *CocoonCodeOperation) GetFunction() string
- func (m *CocoonCodeOperation) GetHeader() map[string]string
- func (m *CocoonCodeOperation) GetID() string
- func (m *CocoonCodeOperation) GetParams() []string
- func (*CocoonCodeOperation) ProtoMessage()
- func (m *CocoonCodeOperation) Reset()
- func (m *CocoonCodeOperation) String() string
- type ConnectorClient
- type ConnectorServer
- type LedgerOperation
- func (*LedgerOperation) Descriptor() ([]byte, []int)
- func (m *LedgerOperation) GetBody() []byte
- func (m *LedgerOperation) GetID() string
- func (m *LedgerOperation) GetLinkTo() string
- func (m *LedgerOperation) GetName() string
- func (m *LedgerOperation) GetParams() []string
- func (*LedgerOperation) ProtoMessage()
- func (m *LedgerOperation) Reset()
- func (m *LedgerOperation) String() string
- type LockOperation
- type OpType
- type Request
- func (*Request) Descriptor() ([]byte, []int)
- func (m *Request) GetCocoonCodeOp() *CocoonCodeOperation
- func (m *Request) GetLedgerOp() *LedgerOperation
- func (m *Request) GetLockOp() *LockOperation
- func (m *Request) GetOpType() OpType
- func (*Request) ProtoMessage()
- func (m *Request) Reset()
- func (m *Request) String() string
- type Response
Constants ¶
This section is empty.
Variables ¶
View Source
var OpType_name = map[int32]string{
0: "LedgerOp",
1: "CocoonCodeOp",
2: "LockOp",
}
View Source
var OpType_value = map[string]int32{
"LedgerOp": 0,
"CocoonCodeOp": 1,
"LockOp": 2,
}
Functions ¶
func RegisterConnectorServer ¶
func RegisterConnectorServer(s *grpc.Server, srv ConnectorServer)
Types ¶
type CocoonCodeOperation ¶
type CocoonCodeOperation struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` Function string `protobuf:"bytes,2,opt,name=function,proto3" json:"function,omitempty"` Params []string `protobuf:"bytes,3,rep,name=params" json:"params,omitempty"` Header map[string]string `` /* 146-byte string literal not displayed */ }
CocoonCodeOperation represents a cocoon code invoke operation
func (*CocoonCodeOperation) Descriptor ¶
func (*CocoonCodeOperation) Descriptor() ([]byte, []int)
func (*CocoonCodeOperation) GetFunction ¶
func (m *CocoonCodeOperation) GetFunction() string
func (*CocoonCodeOperation) GetHeader ¶
func (m *CocoonCodeOperation) GetHeader() map[string]string
func (*CocoonCodeOperation) GetID ¶
func (m *CocoonCodeOperation) GetID() string
func (*CocoonCodeOperation) GetParams ¶
func (m *CocoonCodeOperation) GetParams() []string
func (*CocoonCodeOperation) ProtoMessage ¶
func (*CocoonCodeOperation) ProtoMessage()
func (*CocoonCodeOperation) Reset ¶
func (m *CocoonCodeOperation) Reset()
func (*CocoonCodeOperation) String ¶
func (m *CocoonCodeOperation) String() string
type ConnectorClient ¶
type ConnectorClient interface {
Transact(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
}
func NewConnectorClient ¶
func NewConnectorClient(cc *grpc.ClientConn) ConnectorClient
type ConnectorServer ¶
type LedgerOperation ¶
type LedgerOperation struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Params []string `protobuf:"bytes,3,rep,name=params" json:"params,omitempty"` LinkTo string `protobuf:"bytes,4,opt,name=linkTo,proto3" json:"linkTo,omitempty"` Body []byte `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"` }
LedgerOperation represents an operation against the ledger
func (*LedgerOperation) Descriptor ¶
func (*LedgerOperation) Descriptor() ([]byte, []int)
func (*LedgerOperation) GetBody ¶
func (m *LedgerOperation) GetBody() []byte
func (*LedgerOperation) GetID ¶
func (m *LedgerOperation) GetID() string
func (*LedgerOperation) GetLinkTo ¶
func (m *LedgerOperation) GetLinkTo() string
func (*LedgerOperation) GetName ¶
func (m *LedgerOperation) GetName() string
func (*LedgerOperation) GetParams ¶
func (m *LedgerOperation) GetParams() []string
func (*LedgerOperation) ProtoMessage ¶
func (*LedgerOperation) ProtoMessage()
func (*LedgerOperation) Reset ¶
func (m *LedgerOperation) Reset()
func (*LedgerOperation) String ¶
func (m *LedgerOperation) String() string
type LockOperation ¶
type LockOperation struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Params []string `protobuf:"bytes,2,rep,name=params" json:"params,omitempty"` LinkTo string `protobuf:"bytes,3,opt,name=linkTo,proto3" json:"linkTo,omitempty"` }
LockOperation represents a key locking operation within a cocoon's scope.
func (*LockOperation) Descriptor ¶
func (*LockOperation) Descriptor() ([]byte, []int)
func (*LockOperation) GetLinkTo ¶
func (m *LockOperation) GetLinkTo() string
func (*LockOperation) GetName ¶
func (m *LockOperation) GetName() string
func (*LockOperation) GetParams ¶
func (m *LockOperation) GetParams() []string
func (*LockOperation) ProtoMessage ¶
func (*LockOperation) ProtoMessage()
func (*LockOperation) Reset ¶
func (m *LockOperation) Reset()
func (*LockOperation) String ¶
func (m *LockOperation) String() string
type Request ¶
type Request struct { OpType OpType `protobuf:"varint,1,opt,name=opType,proto3,enum=proto_connector.OpType" json:"opType,omitempty"` LedgerOp *LedgerOperation `protobuf:"bytes,2,opt,name=ledgerOp" json:"ledgerOp,omitempty"` CocoonCodeOp *CocoonCodeOperation `protobuf:"bytes,3,opt,name=cocoonCodeOp" json:"cocoonCodeOp,omitempty"` LockOp *LockOperation `protobuf:"bytes,4,opt,name=lockOp" json:"lockOp,omitempty"` }
Request represents a transaction request which can be either a ledger or cocoon code operation
func (*Request) Descriptor ¶
func (*Request) GetCocoonCodeOp ¶
func (m *Request) GetCocoonCodeOp() *CocoonCodeOperation
func (*Request) GetLedgerOp ¶
func (m *Request) GetLedgerOp() *LedgerOperation
func (*Request) GetLockOp ¶
func (m *Request) GetLockOp() *LockOperation
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
type Response ¶
type Response struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"` Body []byte `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` }
Response represents the response
func (*Response) Descriptor ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.