Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterToDoServer(s grpc.ServiceRegistrar, srv ToDoServer)
- type Null
- type ToDoClient
- type ToDoServer
- type ToDo_GetAllTodosServiceClient
- type ToDo_GetAllTodosServiceServer
- type Todo
- type TodoQuery
- type TodoRequest
- func (*TodoRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TodoRequest) GetDescription() string
- func (x *TodoRequest) GetTitel() string
- func (*TodoRequest) ProtoMessage()
- func (x *TodoRequest) ProtoReflect() protoreflect.Message
- func (x *TodoRequest) Reset()
- func (x *TodoRequest) String() string
- type TodoResponse
- type UnimplementedToDoServer
- func (UnimplementedToDoServer) CreateTodoService(context.Context, *TodoRequest) (*TodoResponse, error)
- func (UnimplementedToDoServer) DeleteTodoService(context.Context, *TodoQuery) (*Todo, error)
- func (UnimplementedToDoServer) GetAllTodosService(*Null, grpc.ServerStreamingServer[Todo]) error
- func (UnimplementedToDoServer) GetTodoByIDService(context.Context, *TodoQuery) (*Todo, error)
- func (UnimplementedToDoServer) UpdateTodoService(context.Context, *Todo) (*Todo, error)
- type UnsafeToDoServer
Constants ¶
const ( ToDo_CreateTodoService_FullMethodName = "/TodoGrpc.toDo/createTodoService" ToDo_DeleteTodoService_FullMethodName = "/TodoGrpc.toDo/deleteTodoService" ToDo_GetAllTodosService_FullMethodName = "/TodoGrpc.toDo/getAllTodosService" ToDo_GetTodoByIDService_FullMethodName = "/TodoGrpc.toDo/getTodoByIDService" ToDo_UpdateTodoService_FullMethodName = "/TodoGrpc.toDo/updateTodoService" )
Variables ¶
var File_models_todo_proto protoreflect.FileDescriptor
var ToDo_ServiceDesc = grpc.ServiceDesc{ ServiceName: "TodoGrpc.toDo", HandlerType: (*ToDoServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "createTodoService", Handler: _ToDo_CreateTodoService_Handler, }, { MethodName: "deleteTodoService", Handler: _ToDo_DeleteTodoService_Handler, }, { MethodName: "getTodoByIDService", Handler: _ToDo_GetTodoByIDService_Handler, }, { MethodName: "updateTodoService", Handler: _ToDo_UpdateTodoService_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "getAllTodosService", Handler: _ToDo_GetAllTodosService_Handler, ServerStreams: true, }, }, Metadata: "models/todo.proto", }
ToDo_ServiceDesc is the grpc.ServiceDesc for ToDo service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterToDoServer ¶
func RegisterToDoServer(s grpc.ServiceRegistrar, srv ToDoServer)
Types ¶
type Null ¶
type Null struct {
// contains filtered or unexported fields
}
func (*Null) Descriptor
deprecated
func (*Null) ProtoMessage ¶
func (*Null) ProtoMessage()
func (*Null) ProtoReflect ¶
func (x *Null) ProtoReflect() protoreflect.Message
type ToDoClient ¶
type ToDoClient interface { CreateTodoService(ctx context.Context, in *TodoRequest, opts ...grpc.CallOption) (*TodoResponse, error) DeleteTodoService(ctx context.Context, in *TodoQuery, opts ...grpc.CallOption) (*Todo, error) GetAllTodosService(ctx context.Context, in *Null, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Todo], error) GetTodoByIDService(ctx context.Context, in *TodoQuery, opts ...grpc.CallOption) (*Todo, error) UpdateTodoService(ctx context.Context, in *Todo, opts ...grpc.CallOption) (*Todo, error) }
ToDoClient is the client API for ToDo 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 NewToDoClient ¶
func NewToDoClient(cc grpc.ClientConnInterface) ToDoClient
type ToDoServer ¶
type ToDoServer interface { CreateTodoService(context.Context, *TodoRequest) (*TodoResponse, error) DeleteTodoService(context.Context, *TodoQuery) (*Todo, error) GetAllTodosService(*Null, grpc.ServerStreamingServer[Todo]) error GetTodoByIDService(context.Context, *TodoQuery) (*Todo, error) UpdateTodoService(context.Context, *Todo) (*Todo, error) // contains filtered or unexported methods }
ToDoServer is the server API for ToDo service. All implementations must embed UnimplementedToDoServer for forward compatibility.
type ToDo_GetAllTodosServiceClient ¶
type ToDo_GetAllTodosServiceClient = grpc.ServerStreamingClient[Todo]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type ToDo_GetAllTodosServiceServer ¶
type ToDo_GetAllTodosServiceServer = grpc.ServerStreamingServer[Todo]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Todo ¶
type Todo struct { Id string `protobuf:"bytes,1,opt,name=Id,proto3" json:"Id,omitempty"` Description string `protobuf:"bytes,2,opt,name=Description,proto3" json:"Description,omitempty"` Titel string `protobuf:"bytes,3,opt,name=Titel,proto3" json:"Titel,omitempty"` // contains filtered or unexported fields }
func (*Todo) Descriptor
deprecated
func (*Todo) GetDescription ¶
func (*Todo) ProtoMessage ¶
func (*Todo) ProtoMessage()
func (*Todo) ProtoReflect ¶
func (x *Todo) ProtoReflect() protoreflect.Message
type TodoQuery ¶
type TodoQuery struct { Id string `protobuf:"bytes,1,opt,name=Id,proto3" json:"Id,omitempty"` // contains filtered or unexported fields }
func (*TodoQuery) Descriptor
deprecated
func (*TodoQuery) ProtoMessage ¶
func (*TodoQuery) ProtoMessage()
func (*TodoQuery) ProtoReflect ¶
func (x *TodoQuery) ProtoReflect() protoreflect.Message
type TodoRequest ¶
type TodoRequest struct { Description string `protobuf:"bytes,1,opt,name=Description,proto3" json:"Description,omitempty"` Titel string `protobuf:"bytes,2,opt,name=Titel,proto3" json:"Titel,omitempty"` // contains filtered or unexported fields }
func (*TodoRequest) Descriptor
deprecated
func (*TodoRequest) Descriptor() ([]byte, []int)
Deprecated: Use TodoRequest.ProtoReflect.Descriptor instead.
func (*TodoRequest) GetDescription ¶
func (x *TodoRequest) GetDescription() string
func (*TodoRequest) GetTitel ¶ added in v0.1.1
func (x *TodoRequest) GetTitel() string
func (*TodoRequest) ProtoMessage ¶
func (*TodoRequest) ProtoMessage()
func (*TodoRequest) ProtoReflect ¶
func (x *TodoRequest) ProtoReflect() protoreflect.Message
func (*TodoRequest) Reset ¶
func (x *TodoRequest) Reset()
func (*TodoRequest) String ¶
func (x *TodoRequest) String() string
type TodoResponse ¶
type TodoResponse struct { Id string `protobuf:"bytes,1,opt,name=Id,proto3" json:"Id,omitempty"` // contains filtered or unexported fields }
func (*TodoResponse) Descriptor
deprecated
func (*TodoResponse) Descriptor() ([]byte, []int)
Deprecated: Use TodoResponse.ProtoReflect.Descriptor instead.
func (*TodoResponse) GetId ¶
func (x *TodoResponse) GetId() string
func (*TodoResponse) ProtoMessage ¶
func (*TodoResponse) ProtoMessage()
func (*TodoResponse) ProtoReflect ¶
func (x *TodoResponse) ProtoReflect() protoreflect.Message
func (*TodoResponse) Reset ¶
func (x *TodoResponse) Reset()
func (*TodoResponse) String ¶
func (x *TodoResponse) String() string
type UnimplementedToDoServer ¶
type UnimplementedToDoServer struct{}
UnimplementedToDoServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedToDoServer) CreateTodoService ¶
func (UnimplementedToDoServer) CreateTodoService(context.Context, *TodoRequest) (*TodoResponse, error)
func (UnimplementedToDoServer) DeleteTodoService ¶
func (UnimplementedToDoServer) GetAllTodosService ¶
func (UnimplementedToDoServer) GetAllTodosService(*Null, grpc.ServerStreamingServer[Todo]) error
func (UnimplementedToDoServer) GetTodoByIDService ¶
func (UnimplementedToDoServer) UpdateTodoService ¶
type UnsafeToDoServer ¶
type UnsafeToDoServer interface {
// contains filtered or unexported methods
}
UnsafeToDoServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ToDoServer will result in compilation errors.