Documentation ¶
Index ¶
- Variables
- func RegisterTodoServiceServer(s grpc.ServiceRegistrar, srv TodoServiceServer)
- type Todo
- func (*Todo) Descriptor() ([]byte, []int)deprecated
- func (x *Todo) GetAnotherField() string
- func (x *Todo) GetAnotherField2() string
- func (x *Todo) GetAnotherField3() string
- func (x *Todo) GetCreatedAt() *timestamppb.Timestamp
- func (x *Todo) GetCustomField() string
- func (x *Todo) GetId() string
- func (x *Todo) GetNewField() string
- func (x *Todo) GetTask() string
- func (*Todo) ProtoMessage()
- func (x *Todo) ProtoReflect() protoreflect.Message
- func (x *Todo) Reset()
- func (x *Todo) String() string
- type TodoServiceClient
- type TodoServiceServer
- type UnimplementedTodoServiceServer
- type UnsafeTodoServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_todos_proto protoreflect.FileDescriptor
var TodoService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "experiment.TodoService", HandlerType: (*TodoServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _TodoService_Create_Handler, }, { MethodName: "Get", Handler: _TodoService_Get_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "todos.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 { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Task string `protobuf:"bytes,2,opt,name=task,proto3" json:"task,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` CustomField string `protobuf:"bytes,4,opt,name=custom_field,json=customField,proto3" json:"custom_field,omitempty"` NewField string `protobuf:"bytes,5,opt,name=new_field,json=newField,proto3" json:"new_field,omitempty"` AnotherField string `protobuf:"bytes,6,opt,name=another_field,json=anotherField,proto3" json:"another_field,omitempty"` AnotherField2 string `protobuf:"bytes,7,opt,name=another_field2,json=anotherField2,proto3" json:"another_field2,omitempty"` AnotherField3 string `protobuf:"bytes,8,opt,name=another_field3,json=anotherField3,proto3" json:"another_field3,omitempty"` // contains filtered or unexported fields }
func (*Todo) Descriptor
deprecated
func (*Todo) GetAnotherField ¶ added in v0.0.3
func (*Todo) GetAnotherField2 ¶ added in v0.0.3
func (*Todo) GetAnotherField3 ¶ added in v0.0.4
func (*Todo) GetCreatedAt ¶
func (x *Todo) GetCreatedAt() *timestamppb.Timestamp
func (*Todo) GetCustomField ¶ added in v0.0.2
func (*Todo) GetNewField ¶ added in v0.0.2
func (*Todo) ProtoMessage ¶
func (*Todo) ProtoMessage()
func (*Todo) ProtoReflect ¶
func (x *Todo) ProtoReflect() protoreflect.Message
type TodoServiceClient ¶
type TodoServiceClient interface { Create(ctx context.Context, in *Todo, opts ...grpc.CallOption) (*Todo, error) Get(ctx context.Context, in *Todo, opts ...grpc.CallOption) (*Todo, 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 { Create(context.Context, *Todo) (*Todo, error) Get(context.Context, *Todo) (*Todo, error) // contains filtered or unexported methods }
TodoServiceServer is the server API for TodoService service. All implementations must embed UnimplementedTodoServiceServer for forward compatibility
type UnimplementedTodoServiceServer ¶
type UnimplementedTodoServiceServer struct { }
UnimplementedTodoServiceServer must be embedded to have forward compatible implementations.
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.