Documentation ¶
Index ¶
- func RegisterProductInfoServer(s *grpc.Server, srv ProductInfoServer)
- type Product
- func (*Product) Descriptor() ([]byte, []int)
- func (m *Product) GetDescription() string
- func (m *Product) GetId() string
- func (m *Product) GetName() string
- func (m *Product) GetPrice() float32
- func (*Product) ProtoMessage()
- func (m *Product) Reset()
- func (m *Product) String() string
- func (m *Product) XXX_DiscardUnknown()
- func (m *Product) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Product) XXX_Merge(src proto.Message)
- func (m *Product) XXX_Size() int
- func (m *Product) XXX_Unmarshal(b []byte) error
- type ProductInfoClient
- type ProductInfoServer
- type UnimplementedProductInfoServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Product) Descriptor ¶
func (*Product) GetDescription ¶
func (*Product) ProtoMessage ¶
func (*Product) ProtoMessage()
func (*Product) XXX_DiscardUnknown ¶
func (m *Product) XXX_DiscardUnknown()
func (*Product) XXX_Marshal ¶
func (*Product) XXX_Unmarshal ¶
type ProductInfoClient ¶
type ProductInfoClient interface { AddProduct(ctx context.Context, in *Product, opts ...grpc.CallOption) (*wrappers.StringValue, error) GetProduct(ctx context.Context, in *wrappers.StringValue, 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.ClientConn) ProductInfoClient
type ProductInfoServer ¶
type ProductInfoServer interface { AddProduct(context.Context, *Product) (*wrappers.StringValue, error) GetProduct(context.Context, *wrappers.StringValue) (*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) AddProduct(ctx context.Context, req *Product) (*wrappers.StringValue, error)
func (*UnimplementedProductInfoServer) GetProduct ¶
func (*UnimplementedProductInfoServer) GetProduct(ctx context.Context, req *wrappers.StringValue) (*Product, error)
Click to show internal directories.
Click to hide internal directories.