Documentation ¶
Overview ¶
Package plutodbpb is a generated protocol buffer package.
PlutoDB Service ¶
It is generated from these files:
db_service.proto
It has these top-level messages:
Status GetHistoryRequest GetHistoryResponse FetchRequest FetchResponse GetTxnMultiRequest GetTxnMultiResponse
Index ¶
- Variables
- func RegisterPlutoDBServiceHandlers(s *tcprpc.Server, prefix string, srv PlutoDBServiceInterface)
- type DBStatusCode
- type FetchRequest
- type FetchResponse
- func (*FetchResponse) Descriptor() ([]byte, []int)
- func (m *FetchResponse) GetSettings() *chain.Settings
- func (m *FetchResponse) GetStatus() *Status
- func (m *FetchResponse) GetTxns() []*chain.Txn
- func (*FetchResponse) ProtoMessage()
- func (m *FetchResponse) Reset()
- func (m *FetchResponse) String() string
- type GetHistoryRequest
- func (*GetHistoryRequest) Descriptor() ([]byte, []int)
- func (m *GetHistoryRequest) GetAccount() uint64
- func (m *GetHistoryRequest) GetLimit() uint32
- func (m *GetHistoryRequest) GetToken() string
- func (*GetHistoryRequest) ProtoMessage()
- func (m *GetHistoryRequest) Reset()
- func (m *GetHistoryRequest) String() string
- type GetHistoryResponse
- func (*GetHistoryResponse) Descriptor() ([]byte, []int)
- func (m *GetHistoryResponse) GetStatus() *Status
- func (m *GetHistoryResponse) GetToken() string
- func (m *GetHistoryResponse) GetTxns() []*chain.Txn
- func (*GetHistoryResponse) ProtoMessage()
- func (m *GetHistoryResponse) Reset()
- func (m *GetHistoryResponse) String() string
- type GetTxnMultiRequest
- type GetTxnMultiResponse
- type PlutoDBServiceInterface
- type Status
- type TCPRPCPlutoDBServiceClient
- func (cl TCPRPCPlutoDBServiceClient) Fetch(ctx context.Context, args *FetchRequest) (*FetchResponse, error)
- func (cl TCPRPCPlutoDBServiceClient) GetHistory(ctx context.Context, args *GetHistoryRequest) (*GetHistoryResponse, error)
- func (cl TCPRPCPlutoDBServiceClient) GetTxnMulti(ctx context.Context, args *GetTxnMultiRequest) (*GetTxnMultiResponse, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var DBStatusCode_name = map[int32]string{
0: "OK",
1: "INVALID_TOKEN",
2: "OTHER_ERROR",
}
View Source
var DBStatusCode_value = map[string]int32{
"OK": 0,
"INVALID_TOKEN": 1,
"OTHER_ERROR": 2,
}
Functions ¶
func RegisterPlutoDBServiceHandlers ¶
func RegisterPlutoDBServiceHandlers(s *tcprpc.Server, prefix string, srv PlutoDBServiceInterface)
Types ¶
type DBStatusCode ¶
type DBStatusCode int32
const ( DBStatusCode_OK DBStatusCode = 0 DBStatusCode_INVALID_TOKEN DBStatusCode = 1 DBStatusCode_OTHER_ERROR DBStatusCode = 2 )
func (DBStatusCode) EnumDescriptor ¶
func (DBStatusCode) EnumDescriptor() ([]byte, []int)
func (DBStatusCode) String ¶
func (x DBStatusCode) String() string
type FetchRequest ¶
type FetchRequest struct { Account uint64 `protobuf:"varint,1,opt,name=account,proto3" json:"account,omitempty"` Limit uint32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` }
func (*FetchRequest) Descriptor ¶
func (*FetchRequest) Descriptor() ([]byte, []int)
func (*FetchRequest) GetAccount ¶
func (m *FetchRequest) GetAccount() uint64
func (*FetchRequest) GetLimit ¶
func (m *FetchRequest) GetLimit() uint32
func (*FetchRequest) ProtoMessage ¶
func (*FetchRequest) ProtoMessage()
func (*FetchRequest) Reset ¶
func (m *FetchRequest) Reset()
func (*FetchRequest) String ¶
func (m *FetchRequest) String() string
type FetchResponse ¶
type FetchResponse struct { Status *Status `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"` Txns []*chain.Txn `protobuf:"bytes,2,rep,name=txns" json:"txns,omitempty"` Settings *chain.Settings `protobuf:"bytes,3,opt,name=settings" json:"settings,omitempty"` }
func (*FetchResponse) Descriptor ¶
func (*FetchResponse) Descriptor() ([]byte, []int)
func (*FetchResponse) GetSettings ¶
func (m *FetchResponse) GetSettings() *chain.Settings
func (*FetchResponse) GetStatus ¶
func (m *FetchResponse) GetStatus() *Status
func (*FetchResponse) GetTxns ¶
func (m *FetchResponse) GetTxns() []*chain.Txn
func (*FetchResponse) ProtoMessage ¶
func (*FetchResponse) ProtoMessage()
func (*FetchResponse) Reset ¶
func (m *FetchResponse) Reset()
func (*FetchResponse) String ¶
func (m *FetchResponse) String() string
type GetHistoryRequest ¶
type GetHistoryRequest struct { Account uint64 `protobuf:"varint,1,opt,name=account,proto3" json:"account,omitempty"` Limit uint32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` }
func (*GetHistoryRequest) Descriptor ¶
func (*GetHistoryRequest) Descriptor() ([]byte, []int)
func (*GetHistoryRequest) GetAccount ¶
func (m *GetHistoryRequest) GetAccount() uint64
func (*GetHistoryRequest) GetLimit ¶
func (m *GetHistoryRequest) GetLimit() uint32
func (*GetHistoryRequest) GetToken ¶
func (m *GetHistoryRequest) GetToken() string
func (*GetHistoryRequest) ProtoMessage ¶
func (*GetHistoryRequest) ProtoMessage()
func (*GetHistoryRequest) Reset ¶
func (m *GetHistoryRequest) Reset()
func (*GetHistoryRequest) String ¶
func (m *GetHistoryRequest) String() string
type GetHistoryResponse ¶
type GetHistoryResponse struct { Status *Status `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"` Txns []*chain.Txn `protobuf:"bytes,2,rep,name=txns" json:"txns,omitempty"` Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` }
func (*GetHistoryResponse) Descriptor ¶
func (*GetHistoryResponse) Descriptor() ([]byte, []int)
func (*GetHistoryResponse) GetStatus ¶
func (m *GetHistoryResponse) GetStatus() *Status
func (*GetHistoryResponse) GetToken ¶
func (m *GetHistoryResponse) GetToken() string
func (*GetHistoryResponse) GetTxns ¶
func (m *GetHistoryResponse) GetTxns() []*chain.Txn
func (*GetHistoryResponse) ProtoMessage ¶
func (*GetHistoryResponse) ProtoMessage()
func (*GetHistoryResponse) Reset ¶
func (m *GetHistoryResponse) Reset()
func (*GetHistoryResponse) String ¶
func (m *GetHistoryResponse) String() string
type GetTxnMultiRequest ¶
type GetTxnMultiRequest struct {
IDs []*chain.TxnID `protobuf:"bytes,1,rep,name=IDs" json:"IDs,omitempty"`
}
func (*GetTxnMultiRequest) Descriptor ¶
func (*GetTxnMultiRequest) Descriptor() ([]byte, []int)
func (*GetTxnMultiRequest) GetIDs ¶
func (m *GetTxnMultiRequest) GetIDs() []*chain.TxnID
func (*GetTxnMultiRequest) ProtoMessage ¶
func (*GetTxnMultiRequest) ProtoMessage()
func (*GetTxnMultiRequest) Reset ¶
func (m *GetTxnMultiRequest) Reset()
func (*GetTxnMultiRequest) String ¶
func (m *GetTxnMultiRequest) String() string
type GetTxnMultiResponse ¶
type GetTxnMultiResponse struct { Status *Status `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"` Txns []*chain.Txn `protobuf:"bytes,2,rep,name=txns" json:"txns,omitempty"` }
func (*GetTxnMultiResponse) Descriptor ¶
func (*GetTxnMultiResponse) Descriptor() ([]byte, []int)
func (*GetTxnMultiResponse) GetStatus ¶
func (m *GetTxnMultiResponse) GetStatus() *Status
func (*GetTxnMultiResponse) GetTxns ¶
func (m *GetTxnMultiResponse) GetTxns() []*chain.Txn
func (*GetTxnMultiResponse) ProtoMessage ¶
func (*GetTxnMultiResponse) ProtoMessage()
func (*GetTxnMultiResponse) Reset ¶
func (m *GetTxnMultiResponse) Reset()
func (*GetTxnMultiResponse) String ¶
func (m *GetTxnMultiResponse) String() string
type PlutoDBServiceInterface ¶
type PlutoDBServiceInterface interface { GetHistory(context.Context, *GetHistoryRequest) (*GetHistoryResponse, error) Fetch(context.Context, *FetchRequest) (*FetchResponse, error) GetTxnMulti(context.Context, *GetTxnMultiRequest) (*GetTxnMultiResponse, error) }
type Status ¶
type Status struct { // A simple error code that can be easily handled by the client. Code DBStatusCode `protobuf:"varint,1,opt,name=code,proto3,enum=plutodbpb.DBStatusCode" json:"code,omitempty"` // A developer-facing human-readable error message in English. It should // both explain the error and offer an actionable resolution to it. Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // Additional error information that the client code can use to handle // the error, such as retry delay or a help link. Details []*google_protobuf.Any `protobuf:"bytes,3,rep,name=details" json:"details,omitempty"` }
func (*Status) Descriptor ¶
func (*Status) GetCode ¶
func (m *Status) GetCode() DBStatusCode
func (*Status) GetDetails ¶
func (m *Status) GetDetails() []*google_protobuf.Any
func (*Status) GetMessage ¶
func (*Status) ProtoMessage ¶
func (*Status) ProtoMessage()
type TCPRPCPlutoDBServiceClient ¶
type TCPRPCPlutoDBServiceClient struct {
// contains filtered or unexported fields
}
func NewTCPRPCPlutoDBServiceClient ¶
func NewTCPRPCPlutoDBServiceClient(cl *tcprpc.Client, pref string) TCPRPCPlutoDBServiceClient
func (TCPRPCPlutoDBServiceClient) Fetch ¶
func (cl TCPRPCPlutoDBServiceClient) Fetch(ctx context.Context, args *FetchRequest) (*FetchResponse, error)
func (TCPRPCPlutoDBServiceClient) GetHistory ¶
func (cl TCPRPCPlutoDBServiceClient) GetHistory(ctx context.Context, args *GetHistoryRequest) (*GetHistoryResponse, error)
func (TCPRPCPlutoDBServiceClient) GetTxnMulti ¶
func (cl TCPRPCPlutoDBServiceClient) GetTxnMulti(ctx context.Context, args *GetTxnMultiRequest) (*GetTxnMultiResponse, error)
Click to show internal directories.
Click to hide internal directories.