Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterTodoHTTPServer(s *http.Server, srv TodoHTTPServer)
- func RegisterTodoServer(s grpc.ServiceRegistrar, srv TodoServer)
- type AddReply
- type AddRequest
- type DeleteReply
- func (*DeleteReply) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteReply) GetItems() []*Item
- func (x *DeleteReply) GetMessage() string
- func (*DeleteReply) ProtoMessage()
- func (x *DeleteReply) ProtoReflect() protoreflect.Message
- func (x *DeleteReply) Reset()
- func (x *DeleteReply) String() string
- type DeleteRequest
- func (*DeleteRequest) Descriptor() ([]byte, []int)deprecated
- func (m *DeleteRequest) GetDeleteLabel() isDeleteRequest_DeleteLabel
- func (x *DeleteRequest) GetId() string
- func (x *DeleteRequest) GetTitle() string
- func (*DeleteRequest) ProtoMessage()
- func (x *DeleteRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteRequest) Reset()
- func (x *DeleteRequest) String() string
- type DeleteRequest_Id
- type DeleteRequest_Title
- type Item
- func (*Item) Descriptor() ([]byte, []int)deprecated
- func (x *Item) GetCreatedAt() *timestamppb.Timestamp
- func (x *Item) GetDescription() string
- func (x *Item) GetId() string
- func (x *Item) GetMarked() bool
- func (x *Item) GetTitle() string
- func (x *Item) GetUpdatedAt() *timestamppb.Timestamp
- func (*Item) ProtoMessage()
- func (x *Item) ProtoReflect() protoreflect.Message
- func (x *Item) Reset()
- func (x *Item) String() string
- type ListReply
- type ListRequest
- type MarkReply
- type MarkRequest
- type TodoClient
- type TodoHTTPClient
- type TodoHTTPClientImpl
- func (c *TodoHTTPClientImpl) Add(ctx context.Context, in *AddRequest, opts ...http.CallOption) (*AddReply, error)
- func (c *TodoHTTPClientImpl) Delete(ctx context.Context, in *DeleteRequest, opts ...http.CallOption) (*DeleteReply, error)
- func (c *TodoHTTPClientImpl) List(ctx context.Context, in *ListRequest, opts ...http.CallOption) (*ListReply, error)
- func (c *TodoHTTPClientImpl) Mark(ctx context.Context, in *MarkRequest, opts ...http.CallOption) (*MarkReply, error)
- type TodoHTTPServer
- type TodoServer
- type UnimplementedTodoServer
- func (UnimplementedTodoServer) Add(context.Context, *AddRequest) (*AddReply, error)
- func (UnimplementedTodoServer) Delete(context.Context, *DeleteRequest) (*DeleteReply, error)
- func (UnimplementedTodoServer) List(context.Context, *ListRequest) (*ListReply, error)
- func (UnimplementedTodoServer) Mark(context.Context, *MarkRequest) (*MarkReply, error)
- type UnsafeTodoServer
Constants ¶
const ( Todo_List_FullMethodName = "/todo.v1.Todo/List" Todo_Add_FullMethodName = "/todo.v1.Todo/Add" Todo_Delete_FullMethodName = "/todo.v1.Todo/Delete" Todo_Mark_FullMethodName = "/todo.v1.Todo/Mark" )
const OperationTodoAdd = "/todo.v1.Todo/Add"
const OperationTodoDelete = "/todo.v1.Todo/Delete"
const OperationTodoList = "/todo.v1.Todo/List"
const OperationTodoMark = "/todo.v1.Todo/Mark"
Variables ¶
var File_todo_v1_todo_proto protoreflect.FileDescriptor
var Todo_ServiceDesc = grpc.ServiceDesc{ ServiceName: "todo.v1.Todo", HandlerType: (*TodoServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "List", Handler: _Todo_List_Handler, }, { MethodName: "Add", Handler: _Todo_Add_Handler, }, { MethodName: "Delete", Handler: _Todo_Delete_Handler, }, { MethodName: "Mark", Handler: _Todo_Mark_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "todo/v1/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 RegisterTodoHTTPServer ¶
func RegisterTodoHTTPServer(s *http.Server, srv TodoHTTPServer)
func RegisterTodoServer ¶
func RegisterTodoServer(s grpc.ServiceRegistrar, srv TodoServer)
Types ¶
type AddReply ¶
type AddReply struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` Item *Item `protobuf:"bytes,2,opt,name=item,proto3" json:"item,omitempty"` // contains filtered or unexported fields }
func (*AddReply) Descriptor
deprecated
func (*AddReply) GetMessage ¶
func (*AddReply) ProtoMessage ¶
func (*AddReply) ProtoMessage()
func (*AddReply) ProtoReflect ¶
func (x *AddReply) ProtoReflect() protoreflect.Message
type AddRequest ¶
type AddRequest struct { Item *Item `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"` // contains filtered or unexported fields }
func (*AddRequest) Descriptor
deprecated
func (*AddRequest) Descriptor() ([]byte, []int)
Deprecated: Use AddRequest.ProtoReflect.Descriptor instead.
func (*AddRequest) GetItem ¶
func (x *AddRequest) GetItem() *Item
func (*AddRequest) ProtoMessage ¶
func (*AddRequest) ProtoMessage()
func (*AddRequest) ProtoReflect ¶
func (x *AddRequest) ProtoReflect() protoreflect.Message
func (*AddRequest) Reset ¶
func (x *AddRequest) Reset()
func (*AddRequest) String ¶
func (x *AddRequest) String() string
type DeleteReply ¶
type DeleteReply struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` Items []*Item `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"` // contains filtered or unexported fields }
func (*DeleteReply) Descriptor
deprecated
func (*DeleteReply) Descriptor() ([]byte, []int)
Deprecated: Use DeleteReply.ProtoReflect.Descriptor instead.
func (*DeleteReply) GetItems ¶
func (x *DeleteReply) GetItems() []*Item
func (*DeleteReply) GetMessage ¶
func (x *DeleteReply) GetMessage() string
func (*DeleteReply) ProtoMessage ¶
func (*DeleteReply) ProtoMessage()
func (*DeleteReply) ProtoReflect ¶
func (x *DeleteReply) ProtoReflect() protoreflect.Message
func (*DeleteReply) Reset ¶
func (x *DeleteReply) Reset()
func (*DeleteReply) String ¶
func (x *DeleteReply) String() string
type DeleteRequest ¶
type DeleteRequest struct { // Types that are assignable to DeleteLabel: // // *DeleteRequest_Title // *DeleteRequest_Id DeleteLabel isDeleteRequest_DeleteLabel `protobuf_oneof:"deleteLabel"` // contains filtered or unexported fields }
func (*DeleteRequest) Descriptor
deprecated
func (*DeleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) GetDeleteLabel ¶
func (m *DeleteRequest) GetDeleteLabel() isDeleteRequest_DeleteLabel
func (*DeleteRequest) GetId ¶
func (x *DeleteRequest) GetId() string
func (*DeleteRequest) GetTitle ¶
func (x *DeleteRequest) GetTitle() string
func (*DeleteRequest) ProtoMessage ¶
func (*DeleteRequest) ProtoMessage()
func (*DeleteRequest) ProtoReflect ¶
func (x *DeleteRequest) ProtoReflect() protoreflect.Message
func (*DeleteRequest) Reset ¶
func (x *DeleteRequest) Reset()
func (*DeleteRequest) String ¶
func (x *DeleteRequest) String() string
type DeleteRequest_Id ¶
type DeleteRequest_Id struct {
Id string `protobuf:"bytes,2,opt,name=id,proto3,oneof"`
}
type DeleteRequest_Title ¶
type DeleteRequest_Title struct {
Title string `protobuf:"bytes,1,opt,name=title,proto3,oneof"`
}
type Item ¶
type Item struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` Marked bool `protobuf:"varint,4,opt,name=marked,proto3" json:"marked,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // contains filtered or unexported fields }
func (*Item) Descriptor
deprecated
func (*Item) GetCreatedAt ¶
func (x *Item) GetCreatedAt() *timestamppb.Timestamp
func (*Item) GetDescription ¶
func (*Item) GetUpdatedAt ¶
func (x *Item) GetUpdatedAt() *timestamppb.Timestamp
func (*Item) ProtoMessage ¶
func (*Item) ProtoMessage()
func (*Item) ProtoReflect ¶
func (x *Item) ProtoReflect() protoreflect.Message
type ListReply ¶
type ListReply struct { Items []*Item `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` // contains filtered or unexported fields }
func (*ListReply) Descriptor
deprecated
func (*ListReply) ProtoMessage ¶
func (*ListReply) ProtoMessage()
func (*ListReply) ProtoReflect ¶
func (x *ListReply) ProtoReflect() protoreflect.Message
type ListRequest ¶
type ListRequest struct {
// contains filtered or unexported fields
}
func (*ListRequest) Descriptor
deprecated
func (*ListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
func (*ListRequest) ProtoMessage ¶
func (*ListRequest) ProtoMessage()
func (*ListRequest) ProtoReflect ¶
func (x *ListRequest) ProtoReflect() protoreflect.Message
func (*ListRequest) Reset ¶
func (x *ListRequest) Reset()
func (*ListRequest) String ¶
func (x *ListRequest) String() string
type MarkReply ¶
type MarkReply struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` Item *Item `protobuf:"bytes,2,opt,name=item,proto3" json:"item,omitempty"` // contains filtered or unexported fields }
func (*MarkReply) Descriptor
deprecated
func (*MarkReply) GetMessage ¶
func (*MarkReply) ProtoMessage ¶
func (*MarkReply) ProtoMessage()
func (*MarkReply) ProtoReflect ¶
func (x *MarkReply) ProtoReflect() protoreflect.Message
type MarkRequest ¶
type MarkRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*MarkRequest) Descriptor
deprecated
func (*MarkRequest) Descriptor() ([]byte, []int)
Deprecated: Use MarkRequest.ProtoReflect.Descriptor instead.
func (*MarkRequest) GetId ¶
func (x *MarkRequest) GetId() string
func (*MarkRequest) ProtoMessage ¶
func (*MarkRequest) ProtoMessage()
func (*MarkRequest) ProtoReflect ¶
func (x *MarkRequest) ProtoReflect() protoreflect.Message
func (*MarkRequest) Reset ¶
func (x *MarkRequest) Reset()
func (*MarkRequest) String ¶
func (x *MarkRequest) String() string
type TodoClient ¶
type TodoClient interface { List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListReply, error) Add(ctx context.Context, in *AddRequest, opts ...grpc.CallOption) (*AddReply, error) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteReply, error) Mark(ctx context.Context, in *MarkRequest, opts ...grpc.CallOption) (*MarkReply, 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 TodoHTTPClient ¶
type TodoHTTPClient interface { Add(ctx context.Context, req *AddRequest, opts ...http.CallOption) (rsp *AddReply, err error) Delete(ctx context.Context, req *DeleteRequest, opts ...http.CallOption) (rsp *DeleteReply, err error) List(ctx context.Context, req *ListRequest, opts ...http.CallOption) (rsp *ListReply, err error) Mark(ctx context.Context, req *MarkRequest, opts ...http.CallOption) (rsp *MarkReply, err error) }
func NewTodoHTTPClient ¶
func NewTodoHTTPClient(client *http.Client) TodoHTTPClient
type TodoHTTPClientImpl ¶
type TodoHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*TodoHTTPClientImpl) Add ¶
func (c *TodoHTTPClientImpl) Add(ctx context.Context, in *AddRequest, opts ...http.CallOption) (*AddReply, error)
func (*TodoHTTPClientImpl) Delete ¶
func (c *TodoHTTPClientImpl) Delete(ctx context.Context, in *DeleteRequest, opts ...http.CallOption) (*DeleteReply, error)
func (*TodoHTTPClientImpl) List ¶
func (c *TodoHTTPClientImpl) List(ctx context.Context, in *ListRequest, opts ...http.CallOption) (*ListReply, error)
func (*TodoHTTPClientImpl) Mark ¶
func (c *TodoHTTPClientImpl) Mark(ctx context.Context, in *MarkRequest, opts ...http.CallOption) (*MarkReply, error)
type TodoHTTPServer ¶
type TodoHTTPServer interface { Add(context.Context, *AddRequest) (*AddReply, error) Delete(context.Context, *DeleteRequest) (*DeleteReply, error) List(context.Context, *ListRequest) (*ListReply, error) Mark(context.Context, *MarkRequest) (*MarkReply, error) }
type TodoServer ¶
type TodoServer interface { List(context.Context, *ListRequest) (*ListReply, error) Add(context.Context, *AddRequest) (*AddReply, error) Delete(context.Context, *DeleteRequest) (*DeleteReply, error) Mark(context.Context, *MarkRequest) (*MarkReply, error) // contains filtered or unexported methods }
TodoServer is the server API for Todo service. All implementations must embed UnimplementedTodoServer for forward compatibility
type UnimplementedTodoServer ¶
type UnimplementedTodoServer struct { }
UnimplementedTodoServer must be embedded to have forward compatible implementations.
func (UnimplementedTodoServer) Add ¶
func (UnimplementedTodoServer) Add(context.Context, *AddRequest) (*AddReply, error)
func (UnimplementedTodoServer) Delete ¶
func (UnimplementedTodoServer) Delete(context.Context, *DeleteRequest) (*DeleteReply, error)
func (UnimplementedTodoServer) List ¶
func (UnimplementedTodoServer) List(context.Context, *ListRequest) (*ListReply, error)
func (UnimplementedTodoServer) Mark ¶
func (UnimplementedTodoServer) Mark(context.Context, *MarkRequest) (*MarkReply, error)
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.