Documentation ¶
Index ¶
- Variables
- func RegisterProductServiceServer(s *grpc.Server, srv ProductServiceServer)
- type ProductListResponse
- func (*ProductListResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ProductListResponse) GetProductList() []*ProductResponse
- func (*ProductListResponse) ProtoMessage()
- func (x *ProductListResponse) ProtoReflect() protoreflect.Message
- func (x *ProductListResponse) Reset()
- func (x *ProductListResponse) String() string
- type ProductQueryRequest
- func (*ProductQueryRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ProductQueryRequest) GetCategoryID() int32
- func (x *ProductQueryRequest) GetID() int32
- func (*ProductQueryRequest) ProtoMessage()
- func (x *ProductQueryRequest) ProtoReflect() protoreflect.Message
- func (x *ProductQueryRequest) Reset()
- func (x *ProductQueryRequest) String() string
- type ProductResponse
- func (*ProductResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ProductResponse) GetCategoryID() int32
- func (x *ProductResponse) GetDescription() string
- func (x *ProductResponse) GetID() int32
- func (x *ProductResponse) GetImage() string
- func (x *ProductResponse) GetName() string
- func (x *ProductResponse) GetPrice() float64
- func (x *ProductResponse) GetStock() int32
- func (*ProductResponse) ProtoMessage()
- func (x *ProductResponse) ProtoReflect() protoreflect.Message
- func (x *ProductResponse) Reset()
- func (x *ProductResponse) String() string
- type ProductServiceClient
- type ProductServiceServer
- type ProductService_FindAllClient
- type ProductService_FindAllServer
- type ProductService_FindByCategoryClient
- type ProductService_FindByCategoryServer
- type UnimplementedProductServiceServer
- func (*UnimplementedProductServiceServer) FindAll(*ProductQueryRequest, ProductService_FindAllServer) error
- func (*UnimplementedProductServiceServer) FindByCategory(*ProductQueryRequest, ProductService_FindByCategoryServer) error
- func (*UnimplementedProductServiceServer) FindByID(context.Context, *ProductQueryRequest) (*ProductResponse, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var File_protocols_product_proto protoreflect.FileDescriptor
Functions ¶
func RegisterProductServiceServer ¶
func RegisterProductServiceServer(s *grpc.Server, srv ProductServiceServer)
Types ¶
type ProductListResponse ¶
type ProductListResponse struct { ProductList []*ProductResponse `protobuf:"bytes,1,rep,name=ProductList,proto3" json:"ProductList,omitempty"` // contains filtered or unexported fields }
func (*ProductListResponse) Descriptor
deprecated
func (*ProductListResponse) Descriptor() ([]byte, []int)
Deprecated: Use ProductListResponse.ProtoReflect.Descriptor instead.
func (*ProductListResponse) GetProductList ¶
func (x *ProductListResponse) GetProductList() []*ProductResponse
func (*ProductListResponse) ProtoMessage ¶
func (*ProductListResponse) ProtoMessage()
func (*ProductListResponse) ProtoReflect ¶
func (x *ProductListResponse) ProtoReflect() protoreflect.Message
func (*ProductListResponse) Reset ¶
func (x *ProductListResponse) Reset()
func (*ProductListResponse) String ¶
func (x *ProductListResponse) String() string
type ProductQueryRequest ¶
type ProductQueryRequest struct { ID int32 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` CategoryID int32 `protobuf:"varint,2,opt,name=CategoryID,proto3" json:"CategoryID,omitempty"` // contains filtered or unexported fields }
func (*ProductQueryRequest) Descriptor
deprecated
func (*ProductQueryRequest) Descriptor() ([]byte, []int)
Deprecated: Use ProductQueryRequest.ProtoReflect.Descriptor instead.
func (*ProductQueryRequest) GetCategoryID ¶
func (x *ProductQueryRequest) GetCategoryID() int32
func (*ProductQueryRequest) GetID ¶
func (x *ProductQueryRequest) GetID() int32
func (*ProductQueryRequest) ProtoMessage ¶
func (*ProductQueryRequest) ProtoMessage()
func (*ProductQueryRequest) ProtoReflect ¶
func (x *ProductQueryRequest) ProtoReflect() protoreflect.Message
func (*ProductQueryRequest) Reset ¶
func (x *ProductQueryRequest) Reset()
func (*ProductQueryRequest) String ¶
func (x *ProductQueryRequest) String() string
type ProductResponse ¶
type ProductResponse struct { ID int32 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` CategoryID int32 `protobuf:"varint,2,opt,name=CategoryID,proto3" json:"CategoryID,omitempty"` Name string `protobuf:"bytes,3,opt,name=Name,proto3" json:"Name,omitempty"` Description string `protobuf:"bytes,4,opt,name=Description,proto3" json:"Description,omitempty"` Image string `protobuf:"bytes,5,opt,name=Image,proto3" json:"Image,omitempty"` Stock int32 `protobuf:"varint,6,opt,name=Stock,proto3" json:"Stock,omitempty"` Price float64 `protobuf:"fixed64,7,opt,name=Price,proto3" json:"Price,omitempty"` // contains filtered or unexported fields }
func (*ProductResponse) Descriptor
deprecated
func (*ProductResponse) Descriptor() ([]byte, []int)
Deprecated: Use ProductResponse.ProtoReflect.Descriptor instead.
func (*ProductResponse) GetCategoryID ¶
func (x *ProductResponse) GetCategoryID() int32
func (*ProductResponse) GetDescription ¶
func (x *ProductResponse) GetDescription() string
func (*ProductResponse) GetID ¶
func (x *ProductResponse) GetID() int32
func (*ProductResponse) GetImage ¶
func (x *ProductResponse) GetImage() string
func (*ProductResponse) GetName ¶
func (x *ProductResponse) GetName() string
func (*ProductResponse) GetPrice ¶
func (x *ProductResponse) GetPrice() float64
func (*ProductResponse) GetStock ¶
func (x *ProductResponse) GetStock() int32
func (*ProductResponse) ProtoMessage ¶
func (*ProductResponse) ProtoMessage()
func (*ProductResponse) ProtoReflect ¶
func (x *ProductResponse) ProtoReflect() protoreflect.Message
func (*ProductResponse) Reset ¶
func (x *ProductResponse) Reset()
func (*ProductResponse) String ¶
func (x *ProductResponse) String() string
type ProductServiceClient ¶
type ProductServiceClient interface { FindByID(ctx context.Context, in *ProductQueryRequest, opts ...grpc.CallOption) (*ProductResponse, error) FindByCategory(ctx context.Context, in *ProductQueryRequest, opts ...grpc.CallOption) (ProductService_FindByCategoryClient, error) FindAll(ctx context.Context, in *ProductQueryRequest, opts ...grpc.CallOption) (ProductService_FindAllClient, error) }
ProductServiceClient is the client API for ProductService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewProductServiceClient ¶
func NewProductServiceClient(cc grpc.ClientConnInterface) ProductServiceClient
type ProductServiceServer ¶
type ProductServiceServer interface { FindByID(context.Context, *ProductQueryRequest) (*ProductResponse, error) FindByCategory(*ProductQueryRequest, ProductService_FindByCategoryServer) error FindAll(*ProductQueryRequest, ProductService_FindAllServer) error }
ProductServiceServer is the server API for ProductService service.
type ProductService_FindAllClient ¶
type ProductService_FindAllClient interface { Recv() (*ProductResponse, error) grpc.ClientStream }
type ProductService_FindAllServer ¶
type ProductService_FindAllServer interface { Send(*ProductResponse) error grpc.ServerStream }
type ProductService_FindByCategoryClient ¶
type ProductService_FindByCategoryClient interface { Recv() (*ProductResponse, error) grpc.ClientStream }
type ProductService_FindByCategoryServer ¶
type ProductService_FindByCategoryServer interface { Send(*ProductResponse) error grpc.ServerStream }
type UnimplementedProductServiceServer ¶
type UnimplementedProductServiceServer struct { }
UnimplementedProductServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedProductServiceServer) FindAll ¶
func (*UnimplementedProductServiceServer) FindAll(*ProductQueryRequest, ProductService_FindAllServer) error
func (*UnimplementedProductServiceServer) FindByCategory ¶
func (*UnimplementedProductServiceServer) FindByCategory(*ProductQueryRequest, ProductService_FindByCategoryServer) error
func (*UnimplementedProductServiceServer) FindByID ¶
func (*UnimplementedProductServiceServer) FindByID(context.Context, *ProductQueryRequest) (*ProductResponse, error)
Click to show internal directories.
Click to hide internal directories.