Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var File_todo_todo_proto protoreflect.FileDescriptor
var TodoService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "user.TodoService", HandlerType: (*TodoServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetTodo", Handler: _TodoService_GetTodo_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "todo/todo.proto", }
TodoService_ServiceDesc is the grpc.ServiceDesc for TodoService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterTodoServiceServer ¶
func RegisterTodoServiceServer(s grpc.ServiceRegistrar, srv TodoServiceServer)
Types ¶
type Todo ¶
type Todo struct { UnimplementedTodoServiceServer Id int Title string }
type TodoContent ¶
type TodoContent struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` // contains filtered or unexported fields }
func (*TodoContent) Descriptor
deprecated
func (*TodoContent) Descriptor() ([]byte, []int)
Deprecated: Use TodoContent.ProtoReflect.Descriptor instead.
func (*TodoContent) GetId ¶
func (x *TodoContent) GetId() int64
func (*TodoContent) GetTitle ¶
func (x *TodoContent) GetTitle() string
func (*TodoContent) ProtoMessage ¶
func (*TodoContent) ProtoMessage()
func (*TodoContent) ProtoReflect ¶
func (x *TodoContent) ProtoReflect() protoreflect.Message
func (*TodoContent) Reset ¶
func (x *TodoContent) Reset()
func (*TodoContent) String ¶
func (x *TodoContent) String() string
type TodoServiceClient ¶
type TodoServiceClient interface {
GetTodo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*TodoContent, error)
}
TodoServiceClient is the client API for TodoService 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 NewTodoServiceClient ¶
func NewTodoServiceClient(cc grpc.ClientConnInterface) TodoServiceClient
type TodoServiceServer ¶
type TodoServiceServer interface { GetTodo(context.Context, *emptypb.Empty) (*TodoContent, error) // contains filtered or unexported methods }
TodoServiceServer is the server API for TodoService service. All implementations must embed UnimplementedTodoServiceServer for forward compatibility
func NewTodoGrpcHandler ¶
func NewTodoGrpcHandler() TodoServiceServer
type UnimplementedTodoServiceServer ¶
type UnimplementedTodoServiceServer struct { }
UnimplementedTodoServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedTodoServiceServer) GetTodo ¶
func (UnimplementedTodoServiceServer) GetTodo(context.Context, *emptypb.Empty) (*TodoContent, error)
type UnsafeTodoServiceServer ¶
type UnsafeTodoServiceServer interface {
// contains filtered or unexported methods
}
UnsafeTodoServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TodoServiceServer will result in compilation errors.