Documentation
¶
Overview ¶
Package item is a generated protocol buffer package.
It is generated from these files:
protobuf/item/item.proto
It has these top-level messages:
Item TodayItemsRequest TodayItemsResponse AddRequest AddResponse RemoveRequest RemoveResponse
Index ¶
- Variables
- func RegisterItemServiceServer(s *grpc.Server, srv ItemServiceServer)
- type AddRequest
- type AddResponse
- type Item
- func (*Item) Descriptor() ([]byte, []int)
- func (m *Item) GetCompleted() bool
- func (m *Item) GetDate() string
- func (m *Item) GetGoal() string
- func (m *Item) GetId() string
- func (m *Item) GetNotes() string
- func (m *Item) GetNotesMd() string
- func (m *Item) GetTags() string
- func (m *Item) GetUrl() string
- func (*Item) ProtoMessage()
- func (m *Item) Reset()
- func (m *Item) String() string
- type ItemServiceClient
- type ItemServiceServer
- type RemoveRequest
- type RemoveResponse
- type ResponseStatus
- type TodayItemsRequest
- type TodayItemsResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ResponseStatus_name = map[int32]string{
0: "UNKNOWN",
1: "SUCCESS",
2: "INTERNAL_ERROR",
16: "ITEM_INVALID_GOAL",
17: "ITEM_NOT_FOUND",
}
View Source
var ResponseStatus_value = map[string]int32{
"UNKNOWN": 0,
"SUCCESS": 1,
"INTERNAL_ERROR": 2,
"ITEM_INVALID_GOAL": 16,
"ITEM_NOT_FOUND": 17,
}
Functions ¶
func RegisterItemServiceServer ¶
func RegisterItemServiceServer(s *grpc.Server, srv ItemServiceServer)
Types ¶
type AddRequest ¶
type AddRequest struct {
Item *Item `protobuf:"bytes,1,opt,name=item" json:"item,omitempty"`
}
AddRequest holds information of item which is going to be added.
func (*AddRequest) Descriptor ¶
func (*AddRequest) Descriptor() ([]byte, []int)
func (*AddRequest) GetItem ¶
func (m *AddRequest) GetItem() *Item
func (*AddRequest) ProtoMessage ¶
func (*AddRequest) ProtoMessage()
func (*AddRequest) Reset ¶
func (m *AddRequest) Reset()
func (*AddRequest) String ¶
func (m *AddRequest) String() string
type AddResponse ¶
type AddResponse struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Status ResponseStatus `protobuf:"varint,2,opt,name=status,enum=kudu.item.ResponseStatus" json:"status,omitempty"` }
AddResponse holds newly added item id.
func (*AddResponse) Descriptor ¶
func (*AddResponse) Descriptor() ([]byte, []int)
func (*AddResponse) GetId ¶
func (m *AddResponse) GetId() string
func (*AddResponse) GetStatus ¶
func (m *AddResponse) GetStatus() ResponseStatus
func (*AddResponse) ProtoMessage ¶
func (*AddResponse) ProtoMessage()
func (*AddResponse) Reset ¶
func (m *AddResponse) Reset()
func (*AddResponse) String ¶
func (m *AddResponse) String() string
type Item ¶
type Item struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Goal string `protobuf:"bytes,2,opt,name=goal" json:"goal,omitempty"` Url string `protobuf:"bytes,3,opt,name=url" json:"url,omitempty"` Tags string `protobuf:"bytes,4,opt,name=tags" json:"tags,omitempty"` Notes string `protobuf:"bytes,5,opt,name=notes" json:"notes,omitempty"` NotesMd string `protobuf:"bytes,6,opt,name=notes_md,json=notesMd" json:"notes_md,omitempty"` Date string `protobuf:"bytes,7,opt,name=date" json:"date,omitempty"` Completed bool `protobuf:"varint,8,opt,name=completed" json:"completed,omitempty"` }
Item holds item information.
func (*Item) Descriptor ¶
func (*Item) GetCompleted ¶
func (*Item) GetNotesMd ¶
func (*Item) ProtoMessage ¶
func (*Item) ProtoMessage()
type ItemServiceClient ¶
type ItemServiceClient interface { TodayItems(ctx context.Context, in *TodayItemsRequest, opts ...grpc.CallOption) (*TodayItemsResponse, error) AddItem(ctx context.Context, in *AddRequest, opts ...grpc.CallOption) (*AddResponse, error) RemoveItem(ctx context.Context, in *RemoveRequest, opts ...grpc.CallOption) (*RemoveResponse, error) }
func NewItemServiceClient ¶
func NewItemServiceClient(cc *grpc.ClientConn) ItemServiceClient
type ItemServiceServer ¶
type ItemServiceServer interface { TodayItems(context.Context, *TodayItemsRequest) (*TodayItemsResponse, error) AddItem(context.Context, *AddRequest) (*AddResponse, error) RemoveItem(context.Context, *RemoveRequest) (*RemoveResponse, error) }
type RemoveRequest ¶
type RemoveRequest struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
}
RemoveRequest holds item id which is goint to be deleted.
func (*RemoveRequest) Descriptor ¶
func (*RemoveRequest) Descriptor() ([]byte, []int)
func (*RemoveRequest) GetId ¶
func (m *RemoveRequest) GetId() string
func (*RemoveRequest) ProtoMessage ¶
func (*RemoveRequest) ProtoMessage()
func (*RemoveRequest) Reset ¶
func (m *RemoveRequest) Reset()
func (*RemoveRequest) String ¶
func (m *RemoveRequest) String() string
type RemoveResponse ¶
type RemoveResponse struct {
Status ResponseStatus `protobuf:"varint,1,opt,name=status,enum=kudu.item.ResponseStatus" json:"status,omitempty"`
}
RemoveResponse holds remove item response status.
func (*RemoveResponse) Descriptor ¶
func (*RemoveResponse) Descriptor() ([]byte, []int)
func (*RemoveResponse) GetStatus ¶
func (m *RemoveResponse) GetStatus() ResponseStatus
func (*RemoveResponse) ProtoMessage ¶
func (*RemoveResponse) ProtoMessage()
func (*RemoveResponse) Reset ¶
func (m *RemoveResponse) Reset()
func (*RemoveResponse) String ¶
func (m *RemoveResponse) String() string
type ResponseStatus ¶
type ResponseStatus int32
ResponseStatus is response status enum.
const ( ResponseStatus_UNKNOWN ResponseStatus = 0 ResponseStatus_SUCCESS ResponseStatus = 1 ResponseStatus_INTERNAL_ERROR ResponseStatus = 2 ResponseStatus_ITEM_INVALID_GOAL ResponseStatus = 16 ResponseStatus_ITEM_NOT_FOUND ResponseStatus = 17 )
func (ResponseStatus) EnumDescriptor ¶
func (ResponseStatus) EnumDescriptor() ([]byte, []int)
func (ResponseStatus) String ¶
func (x ResponseStatus) String() string
type TodayItemsRequest ¶
type TodayItemsRequest struct { Goal string `protobuf:"bytes,1,opt,name=goal" json:"goal,omitempty"` Tags string `protobuf:"bytes,2,opt,name=tags" json:"tags,omitempty"` }
TodayItemsRequest holds information which can be used to filter today item list.
func (*TodayItemsRequest) Descriptor ¶
func (*TodayItemsRequest) Descriptor() ([]byte, []int)
func (*TodayItemsRequest) GetGoal ¶
func (m *TodayItemsRequest) GetGoal() string
func (*TodayItemsRequest) GetTags ¶
func (m *TodayItemsRequest) GetTags() string
func (*TodayItemsRequest) ProtoMessage ¶
func (*TodayItemsRequest) ProtoMessage()
func (*TodayItemsRequest) Reset ¶
func (m *TodayItemsRequest) Reset()
func (*TodayItemsRequest) String ¶
func (m *TodayItemsRequest) String() string
type TodayItemsResponse ¶
type TodayItemsResponse struct { Items []*Item `protobuf:"bytes,1,rep,name=items" json:"items,omitempty"` Status ResponseStatus `protobuf:"varint,2,opt,name=status,enum=kudu.item.ResponseStatus" json:"status,omitempty"` }
TodayItemsResponse holds today item list.
func (*TodayItemsResponse) Descriptor ¶
func (*TodayItemsResponse) Descriptor() ([]byte, []int)
func (*TodayItemsResponse) GetItems ¶
func (m *TodayItemsResponse) GetItems() []*Item
func (*TodayItemsResponse) GetStatus ¶
func (m *TodayItemsResponse) GetStatus() ResponseStatus
func (*TodayItemsResponse) ProtoMessage ¶
func (*TodayItemsResponse) ProtoMessage()
func (*TodayItemsResponse) Reset ¶
func (m *TodayItemsResponse) Reset()
func (*TodayItemsResponse) String ¶
func (m *TodayItemsResponse) String() string
Click to show internal directories.
Click to hide internal directories.