pb

package
v0.0.0-...-93f0e81 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: CC0-1.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DB_Set_FullMethodName = "/kvdb.DB/Set"
	DB_Get_FullMethodName = "/kvdb.DB/Get"
)

Variables

View Source
var DB_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "kvdb.DB",
	HandlerType: (*DBServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Set",
			Handler:    _DB_Set_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _DB_Get_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/kvdb.proto",
}

DB_ServiceDesc is the grpc.ServiceDesc for DB service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_api_kvdb_proto protoreflect.FileDescriptor

Functions

func RegisterDBServer

func RegisterDBServer(s grpc.ServiceRegistrar, srv DBServer)

Types

type DBClient

type DBClient interface {
	Set(ctx context.Context, in *SetRequest, opts ...grpc.CallOption) (*SetResponse, error)
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
}

DBClient is the client API for DB 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 NewDBClient

func NewDBClient(cc grpc.ClientConnInterface) DBClient

type DBServer

type DBServer interface {
	Set(context.Context, *SetRequest) (*SetResponse, error)
	Get(context.Context, *GetRequest) (*GetResponse, error)
	// contains filtered or unexported methods
}

DBServer is the server API for DB service. All implementations must embed UnimplementedDBServer for forward compatibility

type GetRequest

type GetRequest struct {
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRequest) Descriptor deprecated

func (*GetRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.

func (*GetRequest) GetKey

func (x *GetRequest) GetKey() string

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) ProtoReflect

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

func (*GetRequest) Reset

func (x *GetRequest) Reset()

func (*GetRequest) String

func (x *GetRequest) String() string

type GetResponse

type GetResponse struct {
	Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*GetResponse) Descriptor deprecated

func (*GetResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.

func (*GetResponse) GetValue

func (x *GetResponse) GetValue() string

func (*GetResponse) ProtoMessage

func (*GetResponse) ProtoMessage()

func (*GetResponse) ProtoReflect

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

func (*GetResponse) Reset

func (x *GetResponse) Reset()

func (*GetResponse) String

func (x *GetResponse) String() string

type SetRequest

type SetRequest struct {
	Key   string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*SetRequest) Descriptor deprecated

func (*SetRequest) Descriptor() ([]byte, []int)

Deprecated: Use SetRequest.ProtoReflect.Descriptor instead.

func (*SetRequest) GetKey

func (x *SetRequest) GetKey() string

func (*SetRequest) GetValue

func (x *SetRequest) GetValue() string

func (*SetRequest) ProtoMessage

func (*SetRequest) ProtoMessage()

func (*SetRequest) ProtoReflect

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

func (*SetRequest) Reset

func (x *SetRequest) Reset()

func (*SetRequest) String

func (x *SetRequest) String() string

type SetResponse

type SetResponse struct {
	StatusCode int32 `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
	// contains filtered or unexported fields
}

func (*SetResponse) Descriptor deprecated

func (*SetResponse) Descriptor() ([]byte, []int)

Deprecated: Use SetResponse.ProtoReflect.Descriptor instead.

func (*SetResponse) GetStatusCode

func (x *SetResponse) GetStatusCode() int32

func (*SetResponse) ProtoMessage

func (*SetResponse) ProtoMessage()

func (*SetResponse) ProtoReflect

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

func (*SetResponse) Reset

func (x *SetResponse) Reset()

func (*SetResponse) String

func (x *SetResponse) String() string

type UnimplementedDBServer

type UnimplementedDBServer struct {
}

UnimplementedDBServer must be embedded to have forward compatible implementations.

func (UnimplementedDBServer) Get

func (UnimplementedDBServer) Set

type UnsafeDBServer

type UnsafeDBServer interface {
	// contains filtered or unexported methods
}

UnsafeDBServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DBServer will result in compilation errors.

Jump to

Keyboard shortcuts

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