proto_connector

package
v0.0.0-...-7b2e207 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2018 License: AGPL-3.0 Imports: 5 Imported by: 4

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

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 ConnectorServer interface {
	Transact(context.Context, *Request) (*Response, error)
}

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 OpType

type OpType int32

OpType represents operation types

const (
	OpType_LedgerOp     OpType = 0
	OpType_CocoonCodeOp OpType = 1
	OpType_LockOp       OpType = 2
)

func (OpType) EnumDescriptor

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

func (OpType) String

func (x OpType) 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) Descriptor() ([]byte, []int)

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

func (m *Request) GetOpType() OpType

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) Reset

func (m *Request) Reset()

func (*Request) String

func (m *Request) String() string

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) Descriptor() ([]byte, []int)

func (*Response) GetBody

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

func (*Response) GetID

func (m *Response) GetID() string

func (*Response) GetStatus

func (m *Response) GetStatus() int32

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) String

func (m *Response) String() string

Jump to

Keyboard shortcuts

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