api

package
v0.0.0-...-af74388 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Commands_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "commands.Commands",
	HandlerType: (*CommandsServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Echo",
			Handler:    _Commands_Echo_Handler,
		},
		{
			MethodName: "Set",
			Handler:    _Commands_Set_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _Commands_Get_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/commands.proto",
}

Commands_ServiceDesc is the grpc.ServiceDesc for Commands 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_commands_proto protoreflect.FileDescriptor

Functions

func RegisterCommandsServer

func RegisterCommandsServer(s grpc.ServiceRegistrar, srv CommandsServer)

Types

type CommandsClient

type CommandsClient interface {
	Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error)
	Set(ctx context.Context, in *SetRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
}

CommandsClient is the client API for Commands 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 NewCommandsClient

func NewCommandsClient(cc grpc.ClientConnInterface) CommandsClient

type CommandsServer

type CommandsServer interface {
	Echo(context.Context, *EchoRequest) (*EchoResponse, error)
	Set(context.Context, *SetRequest) (*emptypb.Empty, error)
	Get(context.Context, *GetRequest) (*GetResponse, error)
	// contains filtered or unexported methods
}

CommandsServer is the server API for Commands service. All implementations must embed UnimplementedCommandsServer for forward compatibility

type EchoRequest

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

func (*EchoRequest) Descriptor deprecated

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

Deprecated: Use EchoRequest.ProtoReflect.Descriptor instead.

func (*EchoRequest) GetMessage

func (x *EchoRequest) GetMessage() string

func (*EchoRequest) ProtoMessage

func (*EchoRequest) ProtoMessage()

func (*EchoRequest) ProtoReflect

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

func (*EchoRequest) Reset

func (x *EchoRequest) Reset()

func (*EchoRequest) String

func (x *EchoRequest) String() string

type EchoResponse

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

func (*EchoResponse) Descriptor deprecated

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

Deprecated: Use EchoResponse.ProtoReflect.Descriptor instead.

func (*EchoResponse) GetMessage

func (x *EchoResponse) GetMessage() string

func (*EchoResponse) ProtoMessage

func (*EchoResponse) ProtoMessage()

func (*EchoResponse) ProtoReflect

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

func (*EchoResponse) Reset

func (x *EchoResponse) Reset()

func (*EchoResponse) String

func (x *EchoResponse) String() string

type GetRequest

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

func (*GetRequest) Descriptor deprecated

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

Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.

func (*GetRequest) GetId

func (x *GetRequest) GetId() 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 {
	Id    string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,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) GetId

func (x *SetRequest) GetId() 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 UnimplementedCommandsServer

type UnimplementedCommandsServer struct {
}

UnimplementedCommandsServer must be embedded to have forward compatible implementations.

func (UnimplementedCommandsServer) Echo

func (UnimplementedCommandsServer) Get

func (UnimplementedCommandsServer) Set

type UnsafeCommandsServer

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

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

Jump to

Keyboard shortcuts

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