Documentation
¶
Overview ¶
Package todo provides a service client for obtaining a user's todo list items.
Package todo is a generated protocol buffer package.
It is generated from these files:
todo.proto
It has these top-level messages:
ListRequest ListResponse Item
Index ¶
Constants ¶
View Source
const (
// Simple is the name of the service implementation of the TodoHandler
Simple = "org.sugr.micro.test.todo.simple"
)
Variables ¶
This section is empty.
Functions ¶
func RegisterTodoHandler ¶
func RegisterTodoHandler(s server.Server, hdlr TodoHandler, opts ...server.HandlerOption)
Types ¶
type Item ¶
type Item struct {
Title string `protobuf:"bytes,1,opt,name=title" json:"title,omitempty"`
Body string `protobuf:"bytes,2,opt,name=body" json:"body,omitempty"`
}
func (*Item) Descriptor ¶
func (*Item) ProtoMessage ¶
func (*Item) ProtoMessage()
type ListRequest ¶
type ListRequest struct {
Auth string `protobuf:"bytes,1,opt,name=auth" json:"auth,omitempty"`
Limit int64 `protobuf:"varint,2,opt,name=limit" json:"limit,omitempty"`
Offset int64 `protobuf:"varint,3,opt,name=offset" json:"offset,omitempty"`
}
func (*ListRequest) Descriptor ¶
func (*ListRequest) Descriptor() ([]byte, []int)
func (*ListRequest) ProtoMessage ¶
func (*ListRequest) ProtoMessage()
func (*ListRequest) Reset ¶
func (m *ListRequest) Reset()
func (*ListRequest) String ¶
func (m *ListRequest) String() string
type ListResponse ¶
type ListResponse struct {
Valid bool `protobuf:"varint,1,opt,name=valid" json:"valid,omitempty"`
Items []*Item `protobuf:"bytes,2,rep,name=items" json:"items,omitempty"`
}
func (*ListResponse) Descriptor ¶
func (*ListResponse) Descriptor() ([]byte, []int)
func (*ListResponse) GetItems ¶
func (m *ListResponse) GetItems() []*Item
func (*ListResponse) ProtoMessage ¶
func (*ListResponse) ProtoMessage()
func (*ListResponse) Reset ¶
func (m *ListResponse) Reset()
func (*ListResponse) String ¶
func (m *ListResponse) String() string
type Todo ¶
type Todo struct {
TodoHandler
}
func (*Todo) List ¶
func (h *Todo) List(ctx context.Context, in *ListRequest, out *ListResponse) error
type TodoClient ¶
type TodoClient interface {
// TodoList returns a list of todo items.
List(ctx context.Context, in *ListRequest, opts ...client.CallOption) (*ListResponse, error)
}
func NewTodoClient ¶
func NewTodoClient(serviceName string, c client.Client) TodoClient
type TodoHandler ¶
type TodoHandler interface {
// TodoList returns a list of todo items.
List(context.Context, *ListRequest, *ListResponse) error
}
Click to show internal directories.
Click to hide internal directories.