pb

package
v0.0.0-...-0194b68 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
var File_pb_store_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Action.ProtoReflect.Descriptor instead.

func (*Action) GetBody

func (x *Action) GetBody() []byte

func (*Action) GetType

func (x *Action) GetType() Action_Type

func (*Action) ProtoMessage

func (*Action) ProtoMessage()

func (*Action) ProtoReflect

func (x *Action) ProtoReflect() protoreflect.Message

func (*Action) Reset

func (x *Action) Reset()

func (*Action) String

func (x *Action) String() string

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

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

Deprecated: Use ExecRes.ProtoReflect.Descriptor instead.

func (*ExecRes) GetError

func (x *ExecRes) GetError() string

func (*ExecRes) GetLastInsertId

func (x *ExecRes) GetLastInsertId() int64

func (*ExecRes) GetRowsAffected

func (x *ExecRes) GetRowsAffected() int64

func (*ExecRes) ProtoMessage

func (*ExecRes) ProtoMessage()

func (*ExecRes) ProtoReflect

func (x *ExecRes) ProtoReflect() protoreflect.Message

func (*ExecRes) Reset

func (x *ExecRes) Reset()

func (*ExecRes) String

func (x *ExecRes) String() string

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

Deprecated: Use Parameter.ProtoReflect.Descriptor instead.

func (*Parameter) GetB

func (x *Parameter) GetB() bool

func (*Parameter) GetD

func (x *Parameter) GetD() float64

func (*Parameter) GetI

func (x *Parameter) GetI() int64

func (*Parameter) GetName

func (x *Parameter) GetName() string

func (*Parameter) GetS

func (x *Parameter) GetS() string

func (*Parameter) GetValue

func (m *Parameter) GetValue() isParameter_Value

func (*Parameter) GetY

func (x *Parameter) GetY() []byte

func (*Parameter) ProtoMessage

func (*Parameter) ProtoMessage()

func (*Parameter) ProtoReflect

func (x *Parameter) ProtoReflect() protoreflect.Message

func (*Parameter) Reset

func (x *Parameter) Reset()

func (*Parameter) String

func (x *Parameter) String() string

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

Deprecated: Use QueryReq.ProtoReflect.Descriptor instead.

func (*QueryReq) GetRequest

func (x *QueryReq) GetRequest() *Request

func (*QueryReq) GetStrongConsistency

func (x *QueryReq) GetStrongConsistency() bool

func (*QueryReq) ProtoMessage

func (*QueryReq) ProtoMessage()

func (*QueryReq) ProtoReflect

func (x *QueryReq) ProtoReflect() protoreflect.Message

func (*QueryReq) Reset

func (x *QueryReq) Reset()

func (*QueryReq) String

func (x *QueryReq) String() string

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

Deprecated: Use QueryRes.ProtoReflect.Descriptor instead.

func (*QueryRes) GetColumns

func (x *QueryRes) GetColumns() []string

func (*QueryRes) GetError

func (x *QueryRes) GetError() string

func (*QueryRes) GetTypes

func (x *QueryRes) GetTypes() []string

func (*QueryRes) GetValues

func (x *QueryRes) GetValues() []*Values

func (*QueryRes) ProtoMessage

func (*QueryRes) ProtoMessage()

func (*QueryRes) ProtoReflect

func (x *QueryRes) ProtoReflect() protoreflect.Message

func (*QueryRes) Reset

func (x *QueryRes) Reset()

func (*QueryRes) String

func (x *QueryRes) String() string

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetStatements

func (x *Request) GetStatements() []*Statement

func (*Request) GetTransaction

func (x *Request) GetTransaction() bool

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

func (x *Request) ProtoReflect() protoreflect.Message

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

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

Deprecated: Use Server.ProtoReflect.Descriptor instead.

func (*Server) GetId

func (x *Server) GetId() string

func (*Server) GetIsLeader

func (x *Server) GetIsLeader() bool

func (*Server) GetRpcAddr

func (x *Server) GetRpcAddr() string

func (*Server) ProtoMessage

func (*Server) ProtoMessage()

func (*Server) ProtoReflect

func (x *Server) ProtoReflect() protoreflect.Message

func (*Server) Reset

func (x *Server) Reset()

func (*Server) String

func (x *Server) String() string

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

Deprecated: Use Statement.ProtoReflect.Descriptor instead.

func (*Statement) GetParams

func (x *Statement) GetParams() []*Parameter

func (*Statement) GetSql

func (x *Statement) GetSql() string

func (*Statement) ProtoMessage

func (*Statement) ProtoMessage()

func (*Statement) ProtoReflect

func (x *Statement) ProtoReflect() protoreflect.Message

func (*Statement) Reset

func (x *Statement) Reset()

func (*Statement) String

func (x *Statement) String() string

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

func (UnimplementedStoreServer) Query

func (UnimplementedStoreServer) QueryString

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

Deprecated: Use Values.ProtoReflect.Descriptor instead.

func (*Values) GetParams

func (x *Values) GetParams() []*Parameter

func (*Values) ProtoMessage

func (*Values) ProtoMessage()

func (*Values) ProtoReflect

func (x *Values) ProtoReflect() protoreflect.Message

func (*Values) Reset

func (x *Values) Reset()

func (*Values) String

func (x *Values) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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