Documentation ¶
Overview ¶
Package pb is a generated protocol buffer package.
It is generated from these files:
todo.proto
It has these top-level messages:
Void Task Tasks
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterTodoServer ¶
func RegisterTodoServer(s *grpc.Server, srv TodoServer)
Types ¶
type Task ¶
type Task struct { Title string `protobuf:"bytes,1,opt,name=title" json:"title,omitempty"` Content string `protobuf:"bytes,2,opt,name=content" json:"content,omitempty"` }
Task 是單個工作記事資料。
func (*Task) Descriptor ¶
func (*Task) GetContent ¶
func (*Task) ProtoMessage ¶
func (*Task) ProtoMessage()
type Tasks ¶
type Tasks struct {
Tasks []*Task `protobuf:"bytes,1,rep,name=tasks" json:"tasks,omitempty"`
}
Tasks 會回傳多個工作記事資料。
func (*Tasks) Descriptor ¶
func (*Tasks) ProtoMessage ¶
func (*Tasks) ProtoMessage()
type TodoClient ¶
type TodoClient interface { Add(ctx context.Context, in *Task, opts ...grpc.CallOption) (*Task, error) List(ctx context.Context, in *Void, opts ...grpc.CallOption) (*Tasks, error) }
func NewTodoClient ¶
func NewTodoClient(cc *grpc.ClientConn) TodoClient
type TodoServer ¶
Click to show internal directories.
Click to hide internal directories.