Documentation
¶
Index ¶
- Variables
- func RegisterStoreServer(s grpc.ServiceRegistrar, srv StoreServer)
- type Action
- type Action_Type
- func (Action_Type) Descriptor() protoreflect.EnumDescriptor
- func (x Action_Type) Enum() *Action_Type
- func (Action_Type) EnumDescriptor() ([]byte, []int)deprecated
- func (x Action_Type) Number() protoreflect.EnumNumber
- func (x Action_Type) String() string
- func (Action_Type) Type() protoreflect.EnumType
- type ExecRes
- func (*ExecRes) Descriptor() ([]byte, []int)deprecated
- func (x *ExecRes) GetError() string
- func (x *ExecRes) GetLastInsertId() int64
- func (x *ExecRes) GetRowsAffected() int64
- func (*ExecRes) ProtoMessage()
- func (x *ExecRes) ProtoReflect() protoreflect.Message
- func (x *ExecRes) Reset()
- func (x *ExecRes) String() string
- type ExecStringReq
- type GetServerRequest
- type GetServerResponse
- func (*GetServerResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetServerResponse) GetServers() []*Server
- func (*GetServerResponse) ProtoMessage()
- func (x *GetServerResponse) ProtoReflect() protoreflect.Message
- func (x *GetServerResponse) Reset()
- func (x *GetServerResponse) String() string
- type Parameter
- func (*Parameter) Descriptor() ([]byte, []int)deprecated
- func (x *Parameter) GetB() bool
- func (x *Parameter) GetD() float64
- func (x *Parameter) GetI() int64
- func (x *Parameter) GetName() string
- func (x *Parameter) GetS() string
- func (m *Parameter) GetValue() isParameter_Value
- func (x *Parameter) GetY() []byte
- func (*Parameter) ProtoMessage()
- func (x *Parameter) ProtoReflect() protoreflect.Message
- func (x *Parameter) Reset()
- func (x *Parameter) String() string
- type Parameter_B
- type Parameter_D
- type Parameter_I
- type Parameter_S
- type Parameter_Y
- type QueryReq
- type QueryRes
- func (*QueryRes) Descriptor() ([]byte, []int)deprecated
- func (x *QueryRes) GetColumns() []string
- func (x *QueryRes) GetError() string
- func (x *QueryRes) GetTypes() []string
- func (x *QueryRes) GetValues() []*Values
- func (*QueryRes) ProtoMessage()
- func (x *QueryRes) ProtoReflect() protoreflect.Message
- func (x *QueryRes) Reset()
- func (x *QueryRes) String() string
- type QueryStringReq
- type Request
- type Server
- type Statement
- type StoreClient
- type StoreExecResponse
- func (*StoreExecResponse) Descriptor() ([]byte, []int)deprecated
- func (x *StoreExecResponse) GetResults() []*ExecRes
- func (*StoreExecResponse) ProtoMessage()
- func (x *StoreExecResponse) ProtoReflect() protoreflect.Message
- func (x *StoreExecResponse) Reset()
- func (x *StoreExecResponse) String() string
- type StoreQueryResponse
- func (*StoreQueryResponse) Descriptor() ([]byte, []int)deprecated
- func (x *StoreQueryResponse) GetResults() []*QueryRes
- func (*StoreQueryResponse) ProtoMessage()
- func (x *StoreQueryResponse) ProtoReflect() protoreflect.Message
- func (x *StoreQueryResponse) Reset()
- func (x *StoreQueryResponse) String() string
- type StoreServer
- type UnimplementedStoreServer
- func (UnimplementedStoreServer) ExecString(context.Context, *ExecStringReq) (*StoreExecResponse, error)
- func (UnimplementedStoreServer) Execute(context.Context, *Request) (*StoreExecResponse, error)
- func (UnimplementedStoreServer) Query(context.Context, *QueryReq) (*StoreQueryResponse, error)
- func (UnimplementedStoreServer) QueryString(context.Context, *QueryStringReq) (*StoreQueryResponse, error)
- type UnsafeStoreServer
- type Values
Constants ¶
This section is empty.
Variables ¶
var ( Action_Type_name = map[int32]string{ 0: "ACTION_QUERY", 1: "ACTION_EXECUTE", 2: "ACTION_NO", } Action_Type_value = map[string]int32{ "ACTION_QUERY": 0, "ACTION_EXECUTE": 1, "ACTION_NO": 2, } )
Enum value maps for Action_Type.
var File_pb_store_proto protoreflect.FileDescriptor
var Store_ServiceDesc = grpc.ServiceDesc{ ServiceName: "store.Store", HandlerType: (*StoreServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Execute", Handler: _Store_Execute_Handler, }, { MethodName: "Query", Handler: _Store_Query_Handler, }, { MethodName: "ExecString", Handler: _Store_ExecString_Handler, }, { MethodName: "QueryString", Handler: _Store_QueryString_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pb/store.proto", }
Store_ServiceDesc is the grpc.ServiceDesc for Store service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterStoreServer ¶
func RegisterStoreServer(s grpc.ServiceRegistrar, srv StoreServer)
Types ¶
type Action ¶
type Action struct { Type Action_Type `protobuf:"varint,1,opt,name=type,proto3,enum=store.Action_Type" json:"type,omitempty"` Body []byte `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` // contains filtered or unexported fields }
func (*Action) Descriptor
deprecated
func (*Action) GetType ¶
func (x *Action) GetType() Action_Type
func (*Action) ProtoMessage ¶
func (*Action) ProtoMessage()
func (*Action) ProtoReflect ¶
func (x *Action) ProtoReflect() protoreflect.Message
type Action_Type ¶
type Action_Type int32
const ( Action_ACTION_QUERY Action_Type = 0 Action_ACTION_EXECUTE Action_Type = 1 Action_ACTION_NO Action_Type = 2 )
func (Action_Type) Descriptor ¶
func (Action_Type) Descriptor() protoreflect.EnumDescriptor
func (Action_Type) Enum ¶
func (x Action_Type) Enum() *Action_Type
func (Action_Type) EnumDescriptor
deprecated
func (Action_Type) EnumDescriptor() ([]byte, []int)
Deprecated: Use Action_Type.Descriptor instead.
func (Action_Type) Number ¶
func (x Action_Type) Number() protoreflect.EnumNumber
func (Action_Type) String ¶
func (x Action_Type) String() string
func (Action_Type) Type ¶
func (Action_Type) Type() protoreflect.EnumType
type ExecRes ¶
type ExecRes struct { LastInsertId int64 `protobuf:"varint,1,opt,name=last_insert_id,json=lastInsertId,proto3" json:"last_insert_id,omitempty"` RowsAffected int64 `protobuf:"varint,2,opt,name=rows_affected,json=rowsAffected,proto3" json:"rows_affected,omitempty"` Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` // contains filtered or unexported fields }
func (*ExecRes) Descriptor
deprecated
func (*ExecRes) GetLastInsertId ¶
func (*ExecRes) GetRowsAffected ¶
func (*ExecRes) ProtoMessage ¶
func (*ExecRes) ProtoMessage()
func (*ExecRes) ProtoReflect ¶
func (x *ExecRes) ProtoReflect() protoreflect.Message
type ExecStringReq ¶
type ExecStringReq struct { Exec string `protobuf:"bytes,1,opt,name=exec,proto3" json:"exec,omitempty"` // contains filtered or unexported fields }
func (*ExecStringReq) Descriptor
deprecated
func (*ExecStringReq) Descriptor() ([]byte, []int)
Deprecated: Use ExecStringReq.ProtoReflect.Descriptor instead.
func (*ExecStringReq) GetExec ¶
func (x *ExecStringReq) GetExec() string
func (*ExecStringReq) ProtoMessage ¶
func (*ExecStringReq) ProtoMessage()
func (*ExecStringReq) ProtoReflect ¶
func (x *ExecStringReq) ProtoReflect() protoreflect.Message
func (*ExecStringReq) Reset ¶
func (x *ExecStringReq) Reset()
func (*ExecStringReq) String ¶
func (x *ExecStringReq) String() string
type GetServerRequest ¶
type GetServerRequest struct {
// contains filtered or unexported fields
}
func (*GetServerRequest) Descriptor
deprecated
func (*GetServerRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetServerRequest.ProtoReflect.Descriptor instead.
func (*GetServerRequest) ProtoMessage ¶
func (*GetServerRequest) ProtoMessage()
func (*GetServerRequest) ProtoReflect ¶
func (x *GetServerRequest) ProtoReflect() protoreflect.Message
func (*GetServerRequest) Reset ¶
func (x *GetServerRequest) Reset()
func (*GetServerRequest) String ¶
func (x *GetServerRequest) String() string
type GetServerResponse ¶
type GetServerResponse struct { Servers []*Server `protobuf:"bytes,1,rep,name=servers,proto3" json:"servers,omitempty"` // contains filtered or unexported fields }
func (*GetServerResponse) Descriptor
deprecated
func (*GetServerResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetServerResponse.ProtoReflect.Descriptor instead.
func (*GetServerResponse) GetServers ¶
func (x *GetServerResponse) GetServers() []*Server
func (*GetServerResponse) ProtoMessage ¶
func (*GetServerResponse) ProtoMessage()
func (*GetServerResponse) ProtoReflect ¶
func (x *GetServerResponse) ProtoReflect() protoreflect.Message
func (*GetServerResponse) Reset ¶
func (x *GetServerResponse) Reset()
func (*GetServerResponse) String ¶
func (x *GetServerResponse) String() string
type Parameter ¶
type Parameter struct { // Types that are assignable to Value: // // *Parameter_I // *Parameter_D // *Parameter_B // *Parameter_Y // *Parameter_S Value isParameter_Value `protobuf_oneof:"value"` Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
Protobuf defintions take inspiration from rqlite
func (*Parameter) Descriptor
deprecated
func (*Parameter) ProtoMessage ¶
func (*Parameter) ProtoMessage()
func (*Parameter) ProtoReflect ¶
func (x *Parameter) ProtoReflect() protoreflect.Message
type Parameter_B ¶
type Parameter_B struct {
B bool `protobuf:"varint,3,opt,name=b,proto3,oneof"`
}
type Parameter_D ¶
type Parameter_D struct {
D float64 `protobuf:"fixed64,2,opt,name=d,proto3,oneof"`
}
type Parameter_I ¶
type Parameter_I struct {
I int64 `protobuf:"zigzag64,1,opt,name=i,proto3,oneof"`
}
type Parameter_S ¶
type Parameter_S struct {
S string `protobuf:"bytes,5,opt,name=s,proto3,oneof"`
}
type Parameter_Y ¶
type Parameter_Y struct {
Y []byte `protobuf:"bytes,4,opt,name=y,proto3,oneof"`
}
type QueryReq ¶
type QueryReq struct { Request *Request `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` StrongConsistency bool `protobuf:"varint,2,opt,name=strong_consistency,json=strongConsistency,proto3" json:"strong_consistency,omitempty"` // contains filtered or unexported fields }
Same fields as request for now, but in the future it might change.
func (*QueryReq) Descriptor
deprecated
func (*QueryReq) GetRequest ¶
func (*QueryReq) GetStrongConsistency ¶
func (*QueryReq) ProtoMessage ¶
func (*QueryReq) ProtoMessage()
func (*QueryReq) ProtoReflect ¶
func (x *QueryReq) ProtoReflect() protoreflect.Message
type QueryRes ¶
type QueryRes struct { Columns []string `protobuf:"bytes,1,rep,name=columns,proto3" json:"columns,omitempty"` // The names of the columns Types []string `protobuf:"bytes,2,rep,name=types,proto3" json:"types,omitempty"` // The types of the values Values []*Values `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"` // contains filtered or unexported fields }
func (*QueryRes) Descriptor
deprecated
func (*QueryRes) GetColumns ¶
func (*QueryRes) ProtoMessage ¶
func (*QueryRes) ProtoMessage()
func (*QueryRes) ProtoReflect ¶
func (x *QueryRes) ProtoReflect() protoreflect.Message
type QueryStringReq ¶
type QueryStringReq struct { Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` // contains filtered or unexported fields }
func (*QueryStringReq) Descriptor
deprecated
func (*QueryStringReq) Descriptor() ([]byte, []int)
Deprecated: Use QueryStringReq.ProtoReflect.Descriptor instead.
func (*QueryStringReq) GetQuery ¶
func (x *QueryStringReq) GetQuery() string
func (*QueryStringReq) ProtoMessage ¶
func (*QueryStringReq) ProtoMessage()
func (*QueryStringReq) ProtoReflect ¶
func (x *QueryStringReq) ProtoReflect() protoreflect.Message
func (*QueryStringReq) Reset ¶
func (x *QueryStringReq) Reset()
func (*QueryStringReq) String ¶
func (x *QueryStringReq) String() string
type Request ¶
type Request struct { Transaction bool `protobuf:"varint,1,opt,name=transaction,proto3" json:"transaction,omitempty"` Statements []*Statement `protobuf:"bytes,2,rep,name=statements,proto3" json:"statements,omitempty"` // contains filtered or unexported fields }
func (*Request) Descriptor
deprecated
func (*Request) GetStatements ¶
func (*Request) GetTransaction ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
type Server ¶
type Server struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` RpcAddr string `protobuf:"bytes,2,opt,name=rpc_addr,json=rpcAddr,proto3" json:"rpc_addr,omitempty"` IsLeader bool `protobuf:"varint,3,opt,name=is_leader,json=isLeader,proto3" json:"is_leader,omitempty"` // contains filtered or unexported fields }
func (*Server) Descriptor
deprecated
func (*Server) GetIsLeader ¶
func (*Server) GetRpcAddr ¶
func (*Server) ProtoMessage ¶
func (*Server) ProtoMessage()
func (*Server) ProtoReflect ¶
func (x *Server) ProtoReflect() protoreflect.Message
type Statement ¶
type Statement struct { Sql string `protobuf:"bytes,1,opt,name=sql,proto3" json:"sql,omitempty"` Params []*Parameter `protobuf:"bytes,2,rep,name=params,proto3" json:"params,omitempty"` // contains filtered or unexported fields }
func (*Statement) Descriptor
deprecated
func (*Statement) ProtoMessage ¶
func (*Statement) ProtoMessage()
func (*Statement) ProtoReflect ¶
func (x *Statement) ProtoReflect() protoreflect.Message
type StoreClient ¶
type StoreClient interface { Execute(ctx context.Context, in *Request, opts ...grpc.CallOption) (*StoreExecResponse, error) Query(ctx context.Context, in *QueryReq, opts ...grpc.CallOption) (*StoreQueryResponse, error) ExecString(ctx context.Context, in *ExecStringReq, opts ...grpc.CallOption) (*StoreExecResponse, error) QueryString(ctx context.Context, in *QueryStringReq, opts ...grpc.CallOption) (*StoreQueryResponse, error) }
StoreClient is the client API for Store service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewStoreClient ¶
func NewStoreClient(cc grpc.ClientConnInterface) StoreClient
type StoreExecResponse ¶
type StoreExecResponse struct { Results []*ExecRes `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` // contains filtered or unexported fields }
func (*StoreExecResponse) Descriptor
deprecated
func (*StoreExecResponse) Descriptor() ([]byte, []int)
Deprecated: Use StoreExecResponse.ProtoReflect.Descriptor instead.
func (*StoreExecResponse) GetResults ¶
func (x *StoreExecResponse) GetResults() []*ExecRes
func (*StoreExecResponse) ProtoMessage ¶
func (*StoreExecResponse) ProtoMessage()
func (*StoreExecResponse) ProtoReflect ¶
func (x *StoreExecResponse) ProtoReflect() protoreflect.Message
func (*StoreExecResponse) Reset ¶
func (x *StoreExecResponse) Reset()
func (*StoreExecResponse) String ¶
func (x *StoreExecResponse) String() string
type StoreQueryResponse ¶
type StoreQueryResponse struct { Results []*QueryRes `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` // contains filtered or unexported fields }
func (*StoreQueryResponse) Descriptor
deprecated
func (*StoreQueryResponse) Descriptor() ([]byte, []int)
Deprecated: Use StoreQueryResponse.ProtoReflect.Descriptor instead.
func (*StoreQueryResponse) GetResults ¶
func (x *StoreQueryResponse) GetResults() []*QueryRes
func (*StoreQueryResponse) ProtoMessage ¶
func (*StoreQueryResponse) ProtoMessage()
func (*StoreQueryResponse) ProtoReflect ¶
func (x *StoreQueryResponse) ProtoReflect() protoreflect.Message
func (*StoreQueryResponse) Reset ¶
func (x *StoreQueryResponse) Reset()
func (*StoreQueryResponse) String ¶
func (x *StoreQueryResponse) String() string
type StoreServer ¶
type StoreServer interface { Execute(context.Context, *Request) (*StoreExecResponse, error) Query(context.Context, *QueryReq) (*StoreQueryResponse, error) ExecString(context.Context, *ExecStringReq) (*StoreExecResponse, error) QueryString(context.Context, *QueryStringReq) (*StoreQueryResponse, error) // contains filtered or unexported methods }
StoreServer is the server API for Store service. All implementations must embed UnimplementedStoreServer for forward compatibility
type UnimplementedStoreServer ¶
type UnimplementedStoreServer struct { }
UnimplementedStoreServer must be embedded to have forward compatible implementations.
func (UnimplementedStoreServer) ExecString ¶
func (UnimplementedStoreServer) ExecString(context.Context, *ExecStringReq) (*StoreExecResponse, error)
func (UnimplementedStoreServer) Execute ¶
func (UnimplementedStoreServer) Execute(context.Context, *Request) (*StoreExecResponse, error)
func (UnimplementedStoreServer) Query ¶
func (UnimplementedStoreServer) Query(context.Context, *QueryReq) (*StoreQueryResponse, error)
func (UnimplementedStoreServer) QueryString ¶
func (UnimplementedStoreServer) QueryString(context.Context, *QueryStringReq) (*StoreQueryResponse, error)
type UnsafeStoreServer ¶
type UnsafeStoreServer interface {
// contains filtered or unexported methods
}
UnsafeStoreServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to StoreServer will result in compilation errors.
type Values ¶
type Values struct { Params []*Parameter `protobuf:"bytes,1,rep,name=params,proto3" json:"params,omitempty"` // contains filtered or unexported fields }
func (*Values) Descriptor
deprecated
func (*Values) ProtoMessage ¶
func (*Values) ProtoMessage()
func (*Values) ProtoReflect ¶
func (x *Values) ProtoReflect() protoreflect.Message