Documentation ¶
Index ¶
- Variables
- func RegisterTodoServiceServer(s grpc.ServiceRegistrar, srv TodoServiceServer)
- type AddTodoRequest
- type AddTodoResponse
- type DeleteTodoRequest
- type DeleteTodoResponse
- type GetTodoRequest
- type GetTodoResponse
- type ListTodoRequest
- func (*ListTodoRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListTodoRequest) GetComplete() bool
- func (x *ListTodoRequest) GetLimit() int64
- func (*ListTodoRequest) ProtoMessage()
- func (x *ListTodoRequest) ProtoReflect() protoreflect.Message
- func (x *ListTodoRequest) Reset()
- func (x *ListTodoRequest) String() string
- type ListTodoResponse
- type Todo
- func (*Todo) Descriptor() ([]byte, []int)deprecated
- func (x *Todo) GetComplete() bool
- func (x *Todo) GetContent() string
- func (x *Todo) GetCreated() int64
- func (x *Todo) GetId() 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
- func (UnimplementedTodoServiceServer) AddTodo(context.Context, *AddTodoRequest) (*AddTodoResponse, error)
- func (UnimplementedTodoServiceServer) DeleteTodo(context.Context, *DeleteTodoRequest) (*DeleteTodoResponse, error)
- func (UnimplementedTodoServiceServer) GetTodo(context.Context, *GetTodoRequest) (*GetTodoResponse, error)
- func (UnimplementedTodoServiceServer) ListTodo(context.Context, *ListTodoRequest) (*ListTodoResponse, error)
- func (UnimplementedTodoServiceServer) UpdateTodo(context.Context, *UpdateTodoRequest) (*UpdateTodoResponse, error)
- type UnsafeTodoServiceServer
- type UpdateTodoRequest
- func (*UpdateTodoRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateTodoRequest) GetComplete() bool
- func (x *UpdateTodoRequest) GetContent() string
- func (x *UpdateTodoRequest) GetId() string
- func (*UpdateTodoRequest) ProtoMessage()
- func (x *UpdateTodoRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateTodoRequest) Reset()
- func (x *UpdateTodoRequest) String() string
- type UpdateTodoResponse
Constants ¶
This section is empty.
Variables ¶
var File_todo_v1_todo_proto protoreflect.FileDescriptor
var TodoService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "todo.v1.TodoService", HandlerType: (*TodoServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "AddTodo", Handler: _TodoService_AddTodo_Handler, }, { MethodName: "DeleteTodo", Handler: _TodoService_DeleteTodo_Handler, }, { MethodName: "GetTodo", Handler: _TodoService_GetTodo_Handler, }, { MethodName: "ListTodo", Handler: _TodoService_ListTodo_Handler, }, { MethodName: "UpdateTodo", Handler: _TodoService_UpdateTodo_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "todo/v1/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 AddTodoRequest ¶
type AddTodoRequest struct { Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` // contains filtered or unexported fields }
func (*AddTodoRequest) Descriptor
deprecated
func (*AddTodoRequest) Descriptor() ([]byte, []int)
Deprecated: Use AddTodoRequest.ProtoReflect.Descriptor instead.
func (*AddTodoRequest) GetContent ¶
func (x *AddTodoRequest) GetContent() string
func (*AddTodoRequest) ProtoMessage ¶
func (*AddTodoRequest) ProtoMessage()
func (*AddTodoRequest) ProtoReflect ¶
func (x *AddTodoRequest) ProtoReflect() protoreflect.Message
func (*AddTodoRequest) Reset ¶
func (x *AddTodoRequest) Reset()
func (*AddTodoRequest) String ¶
func (x *AddTodoRequest) String() string
type AddTodoResponse ¶
type AddTodoResponse struct { Todo *Todo `protobuf:"bytes,1,opt,name=todo,proto3" json:"todo,omitempty"` // contains filtered or unexported fields }
func (*AddTodoResponse) Descriptor
deprecated
func (*AddTodoResponse) Descriptor() ([]byte, []int)
Deprecated: Use AddTodoResponse.ProtoReflect.Descriptor instead.
func (*AddTodoResponse) GetTodo ¶
func (x *AddTodoResponse) GetTodo() *Todo
func (*AddTodoResponse) ProtoMessage ¶
func (*AddTodoResponse) ProtoMessage()
func (*AddTodoResponse) ProtoReflect ¶
func (x *AddTodoResponse) ProtoReflect() protoreflect.Message
func (*AddTodoResponse) Reset ¶
func (x *AddTodoResponse) Reset()
func (*AddTodoResponse) String ¶
func (x *AddTodoResponse) String() string
type DeleteTodoRequest ¶
type DeleteTodoRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*DeleteTodoRequest) Descriptor
deprecated
func (*DeleteTodoRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteTodoRequest.ProtoReflect.Descriptor instead.
func (*DeleteTodoRequest) GetId ¶
func (x *DeleteTodoRequest) GetId() string
func (*DeleteTodoRequest) ProtoMessage ¶
func (*DeleteTodoRequest) ProtoMessage()
func (*DeleteTodoRequest) ProtoReflect ¶
func (x *DeleteTodoRequest) ProtoReflect() protoreflect.Message
func (*DeleteTodoRequest) Reset ¶
func (x *DeleteTodoRequest) Reset()
func (*DeleteTodoRequest) String ¶
func (x *DeleteTodoRequest) String() string
type DeleteTodoResponse ¶
type DeleteTodoResponse struct { Todo *Todo `protobuf:"bytes,1,opt,name=todo,proto3" json:"todo,omitempty"` // contains filtered or unexported fields }
func (*DeleteTodoResponse) Descriptor
deprecated
func (*DeleteTodoResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteTodoResponse.ProtoReflect.Descriptor instead.
func (*DeleteTodoResponse) GetTodo ¶
func (x *DeleteTodoResponse) GetTodo() *Todo
func (*DeleteTodoResponse) ProtoMessage ¶
func (*DeleteTodoResponse) ProtoMessage()
func (*DeleteTodoResponse) ProtoReflect ¶
func (x *DeleteTodoResponse) ProtoReflect() protoreflect.Message
func (*DeleteTodoResponse) Reset ¶
func (x *DeleteTodoResponse) Reset()
func (*DeleteTodoResponse) String ¶
func (x *DeleteTodoResponse) String() string
type GetTodoRequest ¶
type GetTodoRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetTodoRequest) Descriptor
deprecated
func (*GetTodoRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetTodoRequest.ProtoReflect.Descriptor instead.
func (*GetTodoRequest) GetId ¶
func (x *GetTodoRequest) GetId() string
func (*GetTodoRequest) ProtoMessage ¶
func (*GetTodoRequest) ProtoMessage()
func (*GetTodoRequest) ProtoReflect ¶
func (x *GetTodoRequest) ProtoReflect() protoreflect.Message
func (*GetTodoRequest) Reset ¶
func (x *GetTodoRequest) Reset()
func (*GetTodoRequest) String ¶
func (x *GetTodoRequest) String() string
type GetTodoResponse ¶
type GetTodoResponse struct { Todo *Todo `protobuf:"bytes,1,opt,name=todo,proto3" json:"todo,omitempty"` // contains filtered or unexported fields }
func (*GetTodoResponse) Descriptor
deprecated
func (*GetTodoResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetTodoResponse.ProtoReflect.Descriptor instead.
func (*GetTodoResponse) GetTodo ¶
func (x *GetTodoResponse) GetTodo() *Todo
func (*GetTodoResponse) ProtoMessage ¶
func (*GetTodoResponse) ProtoMessage()
func (*GetTodoResponse) ProtoReflect ¶
func (x *GetTodoResponse) ProtoReflect() protoreflect.Message
func (*GetTodoResponse) Reset ¶
func (x *GetTodoResponse) Reset()
func (*GetTodoResponse) String ¶
func (x *GetTodoResponse) String() string
type ListTodoRequest ¶
type ListTodoRequest struct { Limit int64 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` Complete bool `protobuf:"varint,2,opt,name=complete,proto3" json:"complete,omitempty"` // contains filtered or unexported fields }
func (*ListTodoRequest) Descriptor
deprecated
func (*ListTodoRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListTodoRequest.ProtoReflect.Descriptor instead.
func (*ListTodoRequest) GetComplete ¶
func (x *ListTodoRequest) GetComplete() bool
func (*ListTodoRequest) GetLimit ¶
func (x *ListTodoRequest) GetLimit() int64
func (*ListTodoRequest) ProtoMessage ¶
func (*ListTodoRequest) ProtoMessage()
func (*ListTodoRequest) ProtoReflect ¶
func (x *ListTodoRequest) ProtoReflect() protoreflect.Message
func (*ListTodoRequest) Reset ¶
func (x *ListTodoRequest) Reset()
func (*ListTodoRequest) String ¶
func (x *ListTodoRequest) String() string
type ListTodoResponse ¶
type ListTodoResponse struct { Items []*Todo `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` // contains filtered or unexported fields }
func (*ListTodoResponse) Descriptor
deprecated
func (*ListTodoResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListTodoResponse.ProtoReflect.Descriptor instead.
func (*ListTodoResponse) GetItems ¶
func (x *ListTodoResponse) GetItems() []*Todo
func (*ListTodoResponse) ProtoMessage ¶
func (*ListTodoResponse) ProtoMessage()
func (*ListTodoResponse) ProtoReflect ¶
func (x *ListTodoResponse) ProtoReflect() protoreflect.Message
func (*ListTodoResponse) Reset ¶
func (x *ListTodoResponse) Reset()
func (*ListTodoResponse) String ¶
func (x *ListTodoResponse) String() string
type Todo ¶
type Todo struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` Created int64 `protobuf:"varint,3,opt,name=created,proto3" json:"created,omitempty"` Complete bool `protobuf:"varint,4,opt,name=complete,proto3" json:"complete,omitempty"` // contains filtered or unexported fields }
func (*Todo) Descriptor
deprecated
func (*Todo) GetComplete ¶
func (*Todo) GetContent ¶
func (*Todo) GetCreated ¶
func (*Todo) ProtoMessage ¶
func (*Todo) ProtoMessage()
func (*Todo) ProtoReflect ¶
func (x *Todo) ProtoReflect() protoreflect.Message
type TodoServiceClient ¶
type TodoServiceClient interface { AddTodo(ctx context.Context, in *AddTodoRequest, opts ...grpc.CallOption) (*AddTodoResponse, error) DeleteTodo(ctx context.Context, in *DeleteTodoRequest, opts ...grpc.CallOption) (*DeleteTodoResponse, error) GetTodo(ctx context.Context, in *GetTodoRequest, opts ...grpc.CallOption) (*GetTodoResponse, error) ListTodo(ctx context.Context, in *ListTodoRequest, opts ...grpc.CallOption) (*ListTodoResponse, error) UpdateTodo(ctx context.Context, in *UpdateTodoRequest, opts ...grpc.CallOption) (*UpdateTodoResponse, 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 { AddTodo(context.Context, *AddTodoRequest) (*AddTodoResponse, error) DeleteTodo(context.Context, *DeleteTodoRequest) (*DeleteTodoResponse, error) GetTodo(context.Context, *GetTodoRequest) (*GetTodoResponse, error) ListTodo(context.Context, *ListTodoRequest) (*ListTodoResponse, error) UpdateTodo(context.Context, *UpdateTodoRequest) (*UpdateTodoResponse, 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.
func (UnimplementedTodoServiceServer) AddTodo ¶
func (UnimplementedTodoServiceServer) AddTodo(context.Context, *AddTodoRequest) (*AddTodoResponse, error)
func (UnimplementedTodoServiceServer) DeleteTodo ¶
func (UnimplementedTodoServiceServer) DeleteTodo(context.Context, *DeleteTodoRequest) (*DeleteTodoResponse, error)
func (UnimplementedTodoServiceServer) GetTodo ¶
func (UnimplementedTodoServiceServer) GetTodo(context.Context, *GetTodoRequest) (*GetTodoResponse, error)
func (UnimplementedTodoServiceServer) ListTodo ¶
func (UnimplementedTodoServiceServer) ListTodo(context.Context, *ListTodoRequest) (*ListTodoResponse, error)
func (UnimplementedTodoServiceServer) UpdateTodo ¶
func (UnimplementedTodoServiceServer) UpdateTodo(context.Context, *UpdateTodoRequest) (*UpdateTodoResponse, 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.
type UpdateTodoRequest ¶
type UpdateTodoRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` Complete bool `protobuf:"varint,3,opt,name=complete,proto3" json:"complete,omitempty"` // contains filtered or unexported fields }
func (*UpdateTodoRequest) Descriptor
deprecated
func (*UpdateTodoRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateTodoRequest.ProtoReflect.Descriptor instead.
func (*UpdateTodoRequest) GetComplete ¶
func (x *UpdateTodoRequest) GetComplete() bool
func (*UpdateTodoRequest) GetContent ¶
func (x *UpdateTodoRequest) GetContent() string
func (*UpdateTodoRequest) GetId ¶
func (x *UpdateTodoRequest) GetId() string
func (*UpdateTodoRequest) ProtoMessage ¶
func (*UpdateTodoRequest) ProtoMessage()
func (*UpdateTodoRequest) ProtoReflect ¶
func (x *UpdateTodoRequest) ProtoReflect() protoreflect.Message
func (*UpdateTodoRequest) Reset ¶
func (x *UpdateTodoRequest) Reset()
func (*UpdateTodoRequest) String ¶
func (x *UpdateTodoRequest) String() string
type UpdateTodoResponse ¶
type UpdateTodoResponse struct { Todo *Todo `protobuf:"bytes,1,opt,name=todo,proto3" json:"todo,omitempty"` // contains filtered or unexported fields }
func (*UpdateTodoResponse) Descriptor
deprecated
func (*UpdateTodoResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdateTodoResponse.ProtoReflect.Descriptor instead.
func (*UpdateTodoResponse) GetTodo ¶
func (x *UpdateTodoResponse) GetTodo() *Todo
func (*UpdateTodoResponse) ProtoMessage ¶
func (*UpdateTodoResponse) ProtoMessage()
func (*UpdateTodoResponse) ProtoReflect ¶
func (x *UpdateTodoResponse) ProtoReflect() protoreflect.Message
func (*UpdateTodoResponse) Reset ¶
func (x *UpdateTodoResponse) Reset()
func (*UpdateTodoResponse) String ¶
func (x *UpdateTodoResponse) String() string