Documentation ¶
Index ¶
- Variables
- func RegisterItemServiceServer(s *grpc.Server, srv ItemServiceServer)
- type CategoriesList
- type Category
- type GetCategoriesParams
- type GetItemsByCategoryParams
- func (*GetItemsByCategoryParams) Descriptor() ([]byte, []int)deprecated
- func (x *GetItemsByCategoryParams) GetCategoryId() int64
- func (*GetItemsByCategoryParams) ProtoMessage()
- func (x *GetItemsByCategoryParams) ProtoReflect() protoreflect.Message
- func (x *GetItemsByCategoryParams) Reset()
- func (x *GetItemsByCategoryParams) String() string
- type Item
- type ItemServiceClient
- type ItemServiceServer
- type ItemsList
- type NewCategory
- type NewItem
- type UnimplementedItemServiceServer
- func (*UnimplementedItemServiceServer) CreateNewCategory(context.Context, *NewCategory) (*Category, error)
- func (*UnimplementedItemServiceServer) CreateNewItem(context.Context, *NewItem) (*Item, error)
- func (*UnimplementedItemServiceServer) GetCategories(context.Context, *GetCategoriesParams) (*CategoriesList, error)
- func (*UnimplementedItemServiceServer) GetItemsByCategory(context.Context, *GetItemsByCategoryParams) (*ItemsList, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var File_pkg_items_pb_items_proto protoreflect.FileDescriptor
Functions ¶
func RegisterItemServiceServer ¶
func RegisterItemServiceServer(s *grpc.Server, srv ItemServiceServer)
Types ¶
type CategoriesList ¶
type CategoriesList struct { Categories []*Category `protobuf:"bytes,1,rep,name=categories,proto3" json:"categories,omitempty"` // contains filtered or unexported fields }
func (*CategoriesList) Descriptor
deprecated
func (*CategoriesList) Descriptor() ([]byte, []int)
Deprecated: Use CategoriesList.ProtoReflect.Descriptor instead.
func (*CategoriesList) GetCategories ¶
func (x *CategoriesList) GetCategories() []*Category
func (*CategoriesList) ProtoMessage ¶
func (*CategoriesList) ProtoMessage()
func (*CategoriesList) ProtoReflect ¶
func (x *CategoriesList) ProtoReflect() protoreflect.Message
func (*CategoriesList) Reset ¶
func (x *CategoriesList) Reset()
func (*CategoriesList) String ¶
func (x *CategoriesList) String() string
type Category ¶
type Category struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*Category) Descriptor
deprecated
func (*Category) ProtoMessage ¶
func (*Category) ProtoMessage()
func (*Category) ProtoReflect ¶
func (x *Category) ProtoReflect() protoreflect.Message
type GetCategoriesParams ¶
type GetCategoriesParams struct {
// contains filtered or unexported fields
}
func (*GetCategoriesParams) Descriptor
deprecated
func (*GetCategoriesParams) Descriptor() ([]byte, []int)
Deprecated: Use GetCategoriesParams.ProtoReflect.Descriptor instead.
func (*GetCategoriesParams) ProtoMessage ¶
func (*GetCategoriesParams) ProtoMessage()
func (*GetCategoriesParams) ProtoReflect ¶
func (x *GetCategoriesParams) ProtoReflect() protoreflect.Message
func (*GetCategoriesParams) Reset ¶
func (x *GetCategoriesParams) Reset()
func (*GetCategoriesParams) String ¶
func (x *GetCategoriesParams) String() string
type GetItemsByCategoryParams ¶
type GetItemsByCategoryParams struct { CategoryId int64 `protobuf:"varint,1,opt,name=category_id,json=categoryId,proto3" json:"category_id,omitempty"` // contains filtered or unexported fields }
func (*GetItemsByCategoryParams) Descriptor
deprecated
func (*GetItemsByCategoryParams) Descriptor() ([]byte, []int)
Deprecated: Use GetItemsByCategoryParams.ProtoReflect.Descriptor instead.
func (*GetItemsByCategoryParams) GetCategoryId ¶
func (x *GetItemsByCategoryParams) GetCategoryId() int64
func (*GetItemsByCategoryParams) ProtoMessage ¶
func (*GetItemsByCategoryParams) ProtoMessage()
func (*GetItemsByCategoryParams) ProtoReflect ¶
func (x *GetItemsByCategoryParams) ProtoReflect() protoreflect.Message
func (*GetItemsByCategoryParams) Reset ¶
func (x *GetItemsByCategoryParams) Reset()
func (*GetItemsByCategoryParams) String ¶
func (x *GetItemsByCategoryParams) String() string
type Item ¶
type Item struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` CategoryId int64 `protobuf:"varint,3,opt,name=category_id,json=categoryId,proto3" json:"category_id,omitempty"` // contains filtered or unexported fields }
func (*Item) Descriptor
deprecated
func (*Item) GetCategoryId ¶
func (*Item) ProtoMessage ¶
func (*Item) ProtoMessage()
func (*Item) ProtoReflect ¶
func (x *Item) ProtoReflect() protoreflect.Message
type ItemServiceClient ¶
type ItemServiceClient interface { CreateNewCategory(ctx context.Context, in *NewCategory, opts ...grpc.CallOption) (*Category, error) GetCategories(ctx context.Context, in *GetCategoriesParams, opts ...grpc.CallOption) (*CategoriesList, error) CreateNewItem(ctx context.Context, in *NewItem, opts ...grpc.CallOption) (*Item, error) GetItemsByCategory(ctx context.Context, in *GetItemsByCategoryParams, opts ...grpc.CallOption) (*ItemsList, error) }
ItemServiceClient is the client API for ItemService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewItemServiceClient ¶
func NewItemServiceClient(cc grpc.ClientConnInterface) ItemServiceClient
type ItemServiceServer ¶
type ItemServiceServer interface { CreateNewCategory(context.Context, *NewCategory) (*Category, error) GetCategories(context.Context, *GetCategoriesParams) (*CategoriesList, error) CreateNewItem(context.Context, *NewItem) (*Item, error) GetItemsByCategory(context.Context, *GetItemsByCategoryParams) (*ItemsList, error) }
ItemServiceServer is the server API for ItemService service.
type ItemsList ¶
type ItemsList struct { Items []*Item `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` // contains filtered or unexported fields }
func (*ItemsList) Descriptor
deprecated
func (*ItemsList) ProtoMessage ¶
func (*ItemsList) ProtoMessage()
func (*ItemsList) ProtoReflect ¶
func (x *ItemsList) ProtoReflect() protoreflect.Message
type NewCategory ¶
type NewCategory struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*NewCategory) Descriptor
deprecated
func (*NewCategory) Descriptor() ([]byte, []int)
Deprecated: Use NewCategory.ProtoReflect.Descriptor instead.
func (*NewCategory) GetName ¶
func (x *NewCategory) GetName() string
func (*NewCategory) ProtoMessage ¶
func (*NewCategory) ProtoMessage()
func (*NewCategory) ProtoReflect ¶
func (x *NewCategory) ProtoReflect() protoreflect.Message
func (*NewCategory) Reset ¶
func (x *NewCategory) Reset()
func (*NewCategory) String ¶
func (x *NewCategory) String() string
type NewItem ¶
type NewItem struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` CategoryId int64 `protobuf:"varint,2,opt,name=category_id,json=categoryId,proto3" json:"category_id,omitempty"` // contains filtered or unexported fields }
func (*NewItem) Descriptor
deprecated
func (*NewItem) GetCategoryId ¶
func (*NewItem) ProtoMessage ¶
func (*NewItem) ProtoMessage()
func (*NewItem) ProtoReflect ¶
func (x *NewItem) ProtoReflect() protoreflect.Message
type UnimplementedItemServiceServer ¶
type UnimplementedItemServiceServer struct { }
UnimplementedItemServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedItemServiceServer) CreateNewCategory ¶
func (*UnimplementedItemServiceServer) CreateNewCategory(context.Context, *NewCategory) (*Category, error)
func (*UnimplementedItemServiceServer) CreateNewItem ¶
func (*UnimplementedItemServiceServer) GetCategories ¶
func (*UnimplementedItemServiceServer) GetCategories(context.Context, *GetCategoriesParams) (*CategoriesList, error)
func (*UnimplementedItemServiceServer) GetItemsByCategory ¶
func (*UnimplementedItemServiceServer) GetItemsByCategory(context.Context, *GetItemsByCategoryParams) (*ItemsList, error)
Click to show internal directories.
Click to hide internal directories.