Documentation ¶
Index ¶
- Variables
- func RegisterProductInfoServer(s *grpc.Server, srv ProductInfoServer)
- type Product
- func (*Product) Descriptor() ([]byte, []int)deprecated
- func (x *Product) GetDescription() string
- func (x *Product) GetId() string
- func (x *Product) GetName() string
- func (x *Product) GetPrice() float32
- func (*Product) ProtoMessage()
- func (x *Product) ProtoReflect() protoreflect.Message
- func (x *Product) Reset()
- func (x *Product) String() string
- type ProductID
- type ProductInfoClient
- type ProductInfoServer
- type UnimplementedProductInfoServer
Constants ¶
This section is empty.
Variables ¶
View Source
var File_ecommerce_product_info_proto protoreflect.FileDescriptor
Functions ¶
func RegisterProductInfoServer ¶
func RegisterProductInfoServer(s *grpc.Server, srv ProductInfoServer)
Types ¶
type Product ¶
type Product struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` Price float32 `protobuf:"fixed32,4,opt,name=price,proto3" json:"price,omitempty"` // contains filtered or unexported fields }
func (*Product) Descriptor
deprecated
func (*Product) GetDescription ¶
func (*Product) ProtoMessage ¶
func (*Product) ProtoMessage()
func (*Product) ProtoReflect ¶
func (x *Product) ProtoReflect() protoreflect.Message
type ProductID ¶
type ProductID struct { Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*ProductID) Descriptor
deprecated
func (*ProductID) ProtoMessage ¶
func (*ProductID) ProtoMessage()
func (*ProductID) ProtoReflect ¶
func (x *ProductID) ProtoReflect() protoreflect.Message
type ProductInfoClient ¶
type ProductInfoClient interface { AddProduct(ctx context.Context, in *Product, opts ...grpc.CallOption) (*ProductID, error) GetProduct(ctx context.Context, in *ProductID, opts ...grpc.CallOption) (*Product, error) }
ProductInfoClient is the client API for ProductInfo service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewProductInfoClient ¶
func NewProductInfoClient(cc grpc.ClientConnInterface) ProductInfoClient
type ProductInfoServer ¶
type ProductInfoServer interface { AddProduct(context.Context, *Product) (*ProductID, error) GetProduct(context.Context, *ProductID) (*Product, error) }
ProductInfoServer is the server API for ProductInfo service.
type UnimplementedProductInfoServer ¶
type UnimplementedProductInfoServer struct { }
UnimplementedProductInfoServer can be embedded to have forward compatible implementations.
func (*UnimplementedProductInfoServer) AddProduct ¶
func (*UnimplementedProductInfoServer) GetProduct ¶
Click to show internal directories.
Click to hide internal directories.