Documentation ¶
Overview ¶
Package gen is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterCommandServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterCommandServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CommandServiceClient) error
- func RegisterCommandServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterCommandServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CommandServiceServer) error
- func RegisterCommandServiceServer(s *grpc.Server, srv CommandServiceServer)
- type CommandServiceClient
- type CommandServiceServer
- type CreateRequest
- func (*CreateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateRequest) GetDetails() string
- func (x *CreateRequest) GetDue() *timestamppb.Timestamp
- func (x *CreateRequest) GetName() string
- func (*CreateRequest) ProtoMessage()
- func (x *CreateRequest) ProtoReflect() protoreflect.Message
- func (x *CreateRequest) Reset()
- func (x *CreateRequest) String() string
- type EntityID
- type UnimplementedCommandServiceServer
- type UnsafeCommandServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_todo_service_todo_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCommandServiceHandler ¶
func RegisterCommandServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterCommandServiceHandler registers the http handlers for service CommandService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterCommandServiceHandlerClient ¶
func RegisterCommandServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CommandServiceClient) error
RegisterCommandServiceHandlerClient registers the http handlers for service CommandService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CommandServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CommandServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "CommandServiceClient" to call the correct interceptors.
func RegisterCommandServiceHandlerFromEndpoint ¶
func RegisterCommandServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterCommandServiceHandlerFromEndpoint is same as RegisterCommandServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterCommandServiceHandlerServer ¶
func RegisterCommandServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CommandServiceServer) error
RegisterCommandServiceHandlerServer registers the http handlers for service CommandService to "mux". UnaryRPC :call CommandServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterCommandServiceHandlerFromEndpoint instead.
func RegisterCommandServiceServer ¶
func RegisterCommandServiceServer(s *grpc.Server, srv CommandServiceServer)
Types ¶
type CommandServiceClient ¶
type CommandServiceClient interface {
Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*EntityID, error)
}
CommandServiceClient is the client API for CommandService 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 NewCommandServiceClient ¶
func NewCommandServiceClient(cc grpc.ClientConnInterface) CommandServiceClient
type CommandServiceServer ¶
type CommandServiceServer interface { Create(context.Context, *CreateRequest) (*EntityID, error) // contains filtered or unexported methods }
CommandServiceServer is the server API for CommandService service. All implementations must embed UnimplementedCommandServiceServer for forward compatibility
type CreateRequest ¶
type CreateRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Details string `protobuf:"bytes,2,opt,name=details,proto3" json:"details,omitempty"` Due *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=due,proto3" json:"due,omitempty"` // contains filtered or unexported fields }
func (*CreateRequest) Descriptor
deprecated
func (*CreateRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.
func (*CreateRequest) GetDetails ¶
func (x *CreateRequest) GetDetails() string
func (*CreateRequest) GetDue ¶
func (x *CreateRequest) GetDue() *timestamppb.Timestamp
func (*CreateRequest) GetName ¶
func (x *CreateRequest) GetName() string
func (*CreateRequest) ProtoMessage ¶
func (*CreateRequest) ProtoMessage()
func (*CreateRequest) ProtoReflect ¶
func (x *CreateRequest) ProtoReflect() protoreflect.Message
func (*CreateRequest) Reset ¶
func (x *CreateRequest) Reset()
func (*CreateRequest) String ¶
func (x *CreateRequest) String() string
type EntityID ¶
type EntityID struct { Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*EntityID) Descriptor
deprecated
func (*EntityID) ProtoMessage ¶
func (*EntityID) ProtoMessage()
func (*EntityID) ProtoReflect ¶
func (x *EntityID) ProtoReflect() protoreflect.Message
type UnimplementedCommandServiceServer ¶
type UnimplementedCommandServiceServer struct { }
UnimplementedCommandServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedCommandServiceServer) Create ¶
func (UnimplementedCommandServiceServer) Create(context.Context, *CreateRequest) (*EntityID, error)
type UnsafeCommandServiceServer ¶
type UnsafeCommandServiceServer interface {
// contains filtered or unexported methods
}
UnsafeCommandServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CommandServiceServer will result in compilation errors.