Documentation ¶
Index ¶
- func RegisterProductServiceServer(s *grpc.Server, srv ProductServiceServer)
- type Product
- func (*Product) Descriptor() ([]byte, []int)
- func (m *Product) GetDescription() string
- func (m *Product) GetId() int32
- 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 ProductList
- func (*ProductList) Descriptor() ([]byte, []int)
- func (m *ProductList) GetProducts() []*Product
- func (*ProductList) ProtoMessage()
- func (m *ProductList) Reset()
- func (m *ProductList) String() string
- func (m *ProductList) XXX_DiscardUnknown()
- func (m *ProductList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ProductList) XXX_Merge(src proto.Message)
- func (m *ProductList) XXX_Size() int
- func (m *ProductList) XXX_Unmarshal(b []byte) error
- type ProductQuery
- func (*ProductQuery) Descriptor() ([]byte, []int)
- func (m *ProductQuery) GetId() int32
- func (*ProductQuery) ProtoMessage()
- func (m *ProductQuery) Reset()
- func (m *ProductQuery) String() string
- func (m *ProductQuery) XXX_DiscardUnknown()
- func (m *ProductQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ProductQuery) XXX_Merge(src proto.Message)
- func (m *ProductQuery) XXX_Size() int
- func (m *ProductQuery) XXX_Unmarshal(b []byte) error
- type ProductServiceClient
- type ProductServiceServer
- type UnimplementedProductServiceServer
- func (*UnimplementedProductServiceServer) AddProduct(ctx context.Context, req *Product) (*empty.Empty, error)
- func (*UnimplementedProductServiceServer) GetProduct(ctx context.Context, req *ProductQuery) (*Product, error)
- func (*UnimplementedProductServiceServer) GetProducts(ctx context.Context, req *empty.Empty) (*ProductList, error)
- func (*UnimplementedProductServiceServer) UpdateProduct(ctx context.Context, req *Product) (*empty.Empty, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterProductServiceServer ¶
func RegisterProductServiceServer(s *grpc.Server, srv ProductServiceServer)
Types ¶
type Product ¶
type Product struct { Id int32 `protobuf:"varint,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 ProductList ¶
type ProductList struct { Products []*Product `protobuf:"bytes,1,rep,name=products,proto3" json:"products,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ProductList) Descriptor ¶
func (*ProductList) Descriptor() ([]byte, []int)
func (*ProductList) GetProducts ¶
func (m *ProductList) GetProducts() []*Product
func (*ProductList) ProtoMessage ¶
func (*ProductList) ProtoMessage()
func (*ProductList) Reset ¶
func (m *ProductList) Reset()
func (*ProductList) String ¶
func (m *ProductList) String() string
func (*ProductList) XXX_DiscardUnknown ¶
func (m *ProductList) XXX_DiscardUnknown()
func (*ProductList) XXX_Marshal ¶
func (m *ProductList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ProductList) XXX_Merge ¶
func (m *ProductList) XXX_Merge(src proto.Message)
func (*ProductList) XXX_Size ¶
func (m *ProductList) XXX_Size() int
func (*ProductList) XXX_Unmarshal ¶
func (m *ProductList) XXX_Unmarshal(b []byte) error
type ProductQuery ¶
type ProductQuery struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ProductQuery) Descriptor ¶
func (*ProductQuery) Descriptor() ([]byte, []int)
func (*ProductQuery) GetId ¶
func (m *ProductQuery) GetId() int32
func (*ProductQuery) ProtoMessage ¶
func (*ProductQuery) ProtoMessage()
func (*ProductQuery) Reset ¶
func (m *ProductQuery) Reset()
func (*ProductQuery) String ¶
func (m *ProductQuery) String() string
func (*ProductQuery) XXX_DiscardUnknown ¶
func (m *ProductQuery) XXX_DiscardUnknown()
func (*ProductQuery) XXX_Marshal ¶
func (m *ProductQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ProductQuery) XXX_Merge ¶
func (m *ProductQuery) XXX_Merge(src proto.Message)
func (*ProductQuery) XXX_Size ¶
func (m *ProductQuery) XXX_Size() int
func (*ProductQuery) XXX_Unmarshal ¶
func (m *ProductQuery) XXX_Unmarshal(b []byte) error
type ProductServiceClient ¶
type ProductServiceClient interface { GetProducts(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ProductList, error) GetProduct(ctx context.Context, in *ProductQuery, opts ...grpc.CallOption) (*Product, error) AddProduct(ctx context.Context, in *Product, opts ...grpc.CallOption) (*empty.Empty, error) UpdateProduct(ctx context.Context, in *Product, opts ...grpc.CallOption) (*empty.Empty, 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.ClientConn) ProductServiceClient
type ProductServiceServer ¶
type ProductServiceServer interface { GetProducts(context.Context, *empty.Empty) (*ProductList, error) GetProduct(context.Context, *ProductQuery) (*Product, error) AddProduct(context.Context, *Product) (*empty.Empty, error) UpdateProduct(context.Context, *Product) (*empty.Empty, error) }
ProductServiceServer is the server API for ProductService service.
type UnimplementedProductServiceServer ¶
type UnimplementedProductServiceServer struct { }
UnimplementedProductServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedProductServiceServer) AddProduct ¶
func (*UnimplementedProductServiceServer) GetProduct ¶
func (*UnimplementedProductServiceServer) GetProduct(ctx context.Context, req *ProductQuery) (*Product, error)
func (*UnimplementedProductServiceServer) GetProducts ¶
func (*UnimplementedProductServiceServer) GetProducts(ctx context.Context, req *empty.Empty) (*ProductList, error)
func (*UnimplementedProductServiceServer) UpdateProduct ¶
Click to show internal directories.
Click to hide internal directories.