Documentation
¶
Overview ¶
Package sum is a generated protocol buffer package.
It is generated from these files:
proto/sum.proto
It has these top-level messages:
Record RecordResponse ListRequest RecordListResponse FindResponse Oracle OracleResponse Call Data CallResponse ById ByName ByMeta ServerInfo Empty
Index ¶
- func RegisterSumServiceServer(s *grpc.Server, srv SumServiceServer)
- type ById
- type ByMeta
- type ByName
- type Call
- type CallResponse
- type Data
- type Empty
- type FindResponse
- type ListRequest
- type Oracle
- type OracleResponse
- type Record
- type RecordListResponse
- func (*RecordListResponse) Descriptor() ([]byte, []int)
- func (m *RecordListResponse) GetPages() uint64
- func (m *RecordListResponse) GetRecords() []*Record
- func (m *RecordListResponse) GetTotal() uint64
- func (*RecordListResponse) ProtoMessage()
- func (m *RecordListResponse) Reset()
- func (m *RecordListResponse) String() string
- type RecordResponse
- type ServerInfo
- func (*ServerInfo) Descriptor() ([]byte, []int)
- func (m *ServerInfo) GetArgv() []string
- func (m *ServerInfo) GetOracles() uint64
- func (m *ServerInfo) GetPid() uint64
- func (m *ServerInfo) GetRecords() uint64
- func (m *ServerInfo) GetUid() uint64
- func (m *ServerInfo) GetUptime() uint64
- func (m *ServerInfo) GetVersion() string
- func (*ServerInfo) ProtoMessage()
- func (m *ServerInfo) Reset()
- func (m *ServerInfo) String() string
- type SumServiceClient
- type SumServiceServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterSumServiceServer ¶
func RegisterSumServiceServer(s *grpc.Server, srv SumServiceServer)
Types ¶
type ById ¶
type ById struct {
Id uint64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
}
func (*ById) Descriptor ¶
func (*ById) ProtoMessage ¶
func (*ById) ProtoMessage()
type ByMeta ¶
type ByMeta struct {
Meta string `protobuf:"bytes,1,opt,name=meta" json:"meta,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
}
func (*ByMeta) Descriptor ¶
func (*ByMeta) ProtoMessage ¶
func (*ByMeta) ProtoMessage()
type ByName ¶
type ByName struct {
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}
func (*ByName) Descriptor ¶
func (*ByName) ProtoMessage ¶
func (*ByName) ProtoMessage()
type Call ¶
type Call struct {
OracleId uint64 `protobuf:"varint,1,opt,name=oracle_id,json=oracleId" json:"oracle_id,omitempty"`
Args []string `protobuf:"bytes,2,rep,name=args" json:"args,omitempty"`
}
func (*Call) Descriptor ¶
func (*Call) GetOracleId ¶
func (*Call) ProtoMessage ¶
func (*Call) ProtoMessage()
type CallResponse ¶
type CallResponse struct {
Success bool `protobuf:"varint,1,opt,name=success" json:"success,omitempty"`
Msg string `protobuf:"bytes,2,opt,name=msg" json:"msg,omitempty"`
Data *Data `protobuf:"bytes,3,opt,name=data" json:"data,omitempty"`
}
func (*CallResponse) Descriptor ¶
func (*CallResponse) Descriptor() ([]byte, []int)
func (*CallResponse) GetData ¶
func (m *CallResponse) GetData() *Data
func (*CallResponse) GetMsg ¶
func (m *CallResponse) GetMsg() string
func (*CallResponse) GetSuccess ¶
func (m *CallResponse) GetSuccess() bool
func (*CallResponse) ProtoMessage ¶
func (*CallResponse) ProtoMessage()
func (*CallResponse) Reset ¶
func (m *CallResponse) Reset()
func (*CallResponse) String ¶
func (m *CallResponse) String() string
type Data ¶
type Data struct {
Compressed bool `protobuf:"varint,1,opt,name=compressed" json:"compressed,omitempty"`
Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
}
func (*Data) Descriptor ¶
func (*Data) GetCompressed ¶
func (*Data) GetPayload ¶
func (*Data) ProtoMessage ¶
func (*Data) ProtoMessage()
type Empty ¶
type Empty struct {
}
func (*Empty) Descriptor ¶
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
type FindResponse ¶
type FindResponse struct {
Success bool `protobuf:"varint,1,opt,name=success" json:"success,omitempty"`
Msg string `protobuf:"bytes,2,opt,name=msg" json:"msg,omitempty"`
Records []*Record `protobuf:"bytes,3,rep,name=records" json:"records,omitempty"`
}
func (*FindResponse) Descriptor ¶
func (*FindResponse) Descriptor() ([]byte, []int)
func (*FindResponse) GetMsg ¶
func (m *FindResponse) GetMsg() string
func (*FindResponse) GetRecords ¶
func (m *FindResponse) GetRecords() []*Record
func (*FindResponse) GetSuccess ¶
func (m *FindResponse) GetSuccess() bool
func (*FindResponse) ProtoMessage ¶
func (*FindResponse) ProtoMessage()
func (*FindResponse) Reset ¶
func (m *FindResponse) Reset()
func (*FindResponse) String ¶
func (m *FindResponse) String() string
type ListRequest ¶
type ListRequest struct {
Page uint64 `protobuf:"varint,1,opt,name=page" json:"page,omitempty"`
PerPage uint64 `protobuf:"varint,2,opt,name=per_page,json=perPage" json:"per_page,omitempty"`
}
func (*ListRequest) Descriptor ¶
func (*ListRequest) Descriptor() ([]byte, []int)
func (*ListRequest) GetPage ¶
func (m *ListRequest) GetPage() uint64
func (*ListRequest) GetPerPage ¶
func (m *ListRequest) GetPerPage() uint64
func (*ListRequest) ProtoMessage ¶
func (*ListRequest) ProtoMessage()
func (*ListRequest) Reset ¶
func (m *ListRequest) Reset()
func (*ListRequest) String ¶
func (m *ListRequest) String() string
type Oracle ¶
type Oracle struct {
Id uint64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
Code string `protobuf:"bytes,3,opt,name=code" json:"code,omitempty"`
}
func (*Oracle) Descriptor ¶
func (*Oracle) ProtoMessage ¶
func (*Oracle) ProtoMessage()
type OracleResponse ¶
type OracleResponse struct {
Success bool `protobuf:"varint,1,opt,name=success" json:"success,omitempty"`
Msg string `protobuf:"bytes,2,opt,name=msg" json:"msg,omitempty"`
Oracles []*Oracle `protobuf:"bytes,3,rep,name=oracles" json:"oracles,omitempty"`
}
func (*OracleResponse) Descriptor ¶
func (*OracleResponse) Descriptor() ([]byte, []int)
func (*OracleResponse) GetMsg ¶
func (m *OracleResponse) GetMsg() string
func (*OracleResponse) GetOracles ¶
func (m *OracleResponse) GetOracles() []*Oracle
func (*OracleResponse) GetSuccess ¶
func (m *OracleResponse) GetSuccess() bool
func (*OracleResponse) ProtoMessage ¶
func (*OracleResponse) ProtoMessage()
func (*OracleResponse) Reset ¶
func (m *OracleResponse) Reset()
func (*OracleResponse) String ¶
func (m *OracleResponse) String() string
type Record ¶
type Record struct {
Id uint64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
Data []float64 `protobuf:"fixed64,2,rep,packed,name=data" json:"data,omitempty"`
Meta map[string]string `` /* 128-byte string literal not displayed */
}
func (*Record) Descriptor ¶
func (*Record) ProtoMessage ¶
func (*Record) ProtoMessage()
type RecordListResponse ¶
type RecordListResponse struct {
Total uint64 `protobuf:"varint,1,opt,name=total" json:"total,omitempty"`
Pages uint64 `protobuf:"varint,2,opt,name=pages" json:"pages,omitempty"`
Records []*Record `protobuf:"bytes,3,rep,name=records" json:"records,omitempty"`
}
func (*RecordListResponse) Descriptor ¶
func (*RecordListResponse) Descriptor() ([]byte, []int)
func (*RecordListResponse) GetPages ¶
func (m *RecordListResponse) GetPages() uint64
func (*RecordListResponse) GetRecords ¶
func (m *RecordListResponse) GetRecords() []*Record
func (*RecordListResponse) GetTotal ¶
func (m *RecordListResponse) GetTotal() uint64
func (*RecordListResponse) ProtoMessage ¶
func (*RecordListResponse) ProtoMessage()
func (*RecordListResponse) Reset ¶
func (m *RecordListResponse) Reset()
func (*RecordListResponse) String ¶
func (m *RecordListResponse) String() string
type RecordResponse ¶
type RecordResponse struct {
Success bool `protobuf:"varint,1,opt,name=success" json:"success,omitempty"`
Msg string `protobuf:"bytes,2,opt,name=msg" json:"msg,omitempty"`
Record *Record `protobuf:"bytes,3,opt,name=record" json:"record,omitempty"`
}
func (*RecordResponse) Descriptor ¶
func (*RecordResponse) Descriptor() ([]byte, []int)
func (*RecordResponse) GetMsg ¶
func (m *RecordResponse) GetMsg() string
func (*RecordResponse) GetRecord ¶
func (m *RecordResponse) GetRecord() *Record
func (*RecordResponse) GetSuccess ¶
func (m *RecordResponse) GetSuccess() bool
func (*RecordResponse) ProtoMessage ¶
func (*RecordResponse) ProtoMessage()
func (*RecordResponse) Reset ¶
func (m *RecordResponse) Reset()
func (*RecordResponse) String ¶
func (m *RecordResponse) String() string
type ServerInfo ¶
type ServerInfo struct {
Version string `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"`
Uptime uint64 `protobuf:"varint,2,opt,name=uptime" json:"uptime,omitempty"`
Pid uint64 `protobuf:"varint,3,opt,name=pid" json:"pid,omitempty"`
Uid uint64 `protobuf:"varint,4,opt,name=uid" json:"uid,omitempty"`
Argv []string `protobuf:"bytes,5,rep,name=argv" json:"argv,omitempty"`
Records uint64 `protobuf:"varint,6,opt,name=records" json:"records,omitempty"`
Oracles uint64 `protobuf:"varint,7,opt,name=oracles" json:"oracles,omitempty"`
}
func (*ServerInfo) Descriptor ¶
func (*ServerInfo) Descriptor() ([]byte, []int)
func (*ServerInfo) GetArgv ¶
func (m *ServerInfo) GetArgv() []string
func (*ServerInfo) GetOracles ¶
func (m *ServerInfo) GetOracles() uint64
func (*ServerInfo) GetPid ¶
func (m *ServerInfo) GetPid() uint64
func (*ServerInfo) GetRecords ¶
func (m *ServerInfo) GetRecords() uint64
func (*ServerInfo) GetUid ¶
func (m *ServerInfo) GetUid() uint64
func (*ServerInfo) GetUptime ¶
func (m *ServerInfo) GetUptime() uint64
func (*ServerInfo) GetVersion ¶
func (m *ServerInfo) GetVersion() string
func (*ServerInfo) ProtoMessage ¶
func (*ServerInfo) ProtoMessage()
func (*ServerInfo) Reset ¶
func (m *ServerInfo) Reset()
func (*ServerInfo) String ¶
func (m *ServerInfo) String() string
type SumServiceClient ¶
type SumServiceClient interface {
// vectors CRUD
CreateRecord(ctx context.Context, in *Record, opts ...grpc.CallOption) (*RecordResponse, error)
UpdateRecord(ctx context.Context, in *Record, opts ...grpc.CallOption) (*RecordResponse, error)
ReadRecord(ctx context.Context, in *ById, opts ...grpc.CallOption) (*RecordResponse, error)
ListRecords(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*RecordListResponse, error)
DeleteRecord(ctx context.Context, in *ById, opts ...grpc.CallOption) (*RecordResponse, error)
// find a vector given a meta name and value to filter for
FindRecords(ctx context.Context, in *ByMeta, opts ...grpc.CallOption) (*FindResponse, error)
// oracles CRUD
CreateOracle(ctx context.Context, in *Oracle, opts ...grpc.CallOption) (*OracleResponse, error)
UpdateOracle(ctx context.Context, in *Oracle, opts ...grpc.CallOption) (*OracleResponse, error)
ReadOracle(ctx context.Context, in *ById, opts ...grpc.CallOption) (*OracleResponse, error)
FindOracle(ctx context.Context, in *ByName, opts ...grpc.CallOption) (*OracleResponse, error)
DeleteOracle(ctx context.Context, in *ById, opts ...grpc.CallOption) (*OracleResponse, error)
// execute a call to a oracle given its id
Run(ctx context.Context, in *Call, opts ...grpc.CallOption) (*CallResponse, error)
// get info about the service
Info(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ServerInfo, error)
}
func NewSumServiceClient ¶
func NewSumServiceClient(cc *grpc.ClientConn) SumServiceClient
type SumServiceServer ¶
type SumServiceServer interface {
// vectors CRUD
CreateRecord(context.Context, *Record) (*RecordResponse, error)
UpdateRecord(context.Context, *Record) (*RecordResponse, error)
ReadRecord(context.Context, *ById) (*RecordResponse, error)
ListRecords(context.Context, *ListRequest) (*RecordListResponse, error)
DeleteRecord(context.Context, *ById) (*RecordResponse, error)
// find a vector given a meta name and value to filter for
FindRecords(context.Context, *ByMeta) (*FindResponse, error)
// oracles CRUD
CreateOracle(context.Context, *Oracle) (*OracleResponse, error)
UpdateOracle(context.Context, *Oracle) (*OracleResponse, error)
ReadOracle(context.Context, *ById) (*OracleResponse, error)
FindOracle(context.Context, *ByName) (*OracleResponse, error)
DeleteOracle(context.Context, *ById) (*OracleResponse, error)
// execute a call to a oracle given its id
Run(context.Context, *Call) (*CallResponse, error)
// get info about the service
Info(context.Context, *Empty) (*ServerInfo, error)
}
Click to show internal directories.
Click to hide internal directories.