Documentation ¶
Index ¶
- func RegisterProductCatalogServiceServer(s *grpc.Server, srv ProductCatalogServiceServer)
- func RegisterRecommendationServiceServer(s *grpc.Server, srv RecommendationServiceServer)
- type Empty
- func (*Empty) Descriptor() ([]byte, []int)
- func (*Empty) ProtoMessage()
- func (m *Empty) Reset()
- func (m *Empty) String() string
- func (m *Empty) XXX_DiscardUnknown()
- func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Empty) XXX_Merge(src proto.Message)
- func (m *Empty) XXX_Size() int
- func (m *Empty) XXX_Unmarshal(b []byte) error
- type GetProductRequest
- func (*GetProductRequest) Descriptor() ([]byte, []int)
- func (m *GetProductRequest) GetId() string
- func (*GetProductRequest) ProtoMessage()
- func (m *GetProductRequest) Reset()
- func (m *GetProductRequest) String() string
- func (m *GetProductRequest) XXX_DiscardUnknown()
- func (m *GetProductRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetProductRequest) XXX_Merge(src proto.Message)
- func (m *GetProductRequest) XXX_Size() int
- func (m *GetProductRequest) XXX_Unmarshal(b []byte) error
- type ListProductsResponse
- func (*ListProductsResponse) Descriptor() ([]byte, []int)
- func (m *ListProductsResponse) GetProducts() []*Product
- func (*ListProductsResponse) ProtoMessage()
- func (m *ListProductsResponse) Reset()
- func (m *ListProductsResponse) String() string
- func (m *ListProductsResponse) XXX_DiscardUnknown()
- func (m *ListProductsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListProductsResponse) XXX_Merge(src proto.Message)
- func (m *ListProductsResponse) XXX_Size() int
- func (m *ListProductsResponse) XXX_Unmarshal(b []byte) error
- type ListRecommendationsRequest
- func (*ListRecommendationsRequest) Descriptor() ([]byte, []int)
- func (m *ListRecommendationsRequest) GetProductIds() []string
- func (m *ListRecommendationsRequest) GetUserId() string
- func (*ListRecommendationsRequest) ProtoMessage()
- func (m *ListRecommendationsRequest) Reset()
- func (m *ListRecommendationsRequest) String() string
- func (m *ListRecommendationsRequest) XXX_DiscardUnknown()
- func (m *ListRecommendationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListRecommendationsRequest) XXX_Merge(src proto.Message)
- func (m *ListRecommendationsRequest) XXX_Size() int
- func (m *ListRecommendationsRequest) XXX_Unmarshal(b []byte) error
- type ListRecommendationsResponse
- func (*ListRecommendationsResponse) Descriptor() ([]byte, []int)
- func (m *ListRecommendationsResponse) GetProductIds() []string
- func (*ListRecommendationsResponse) ProtoMessage()
- func (m *ListRecommendationsResponse) Reset()
- func (m *ListRecommendationsResponse) String() string
- func (m *ListRecommendationsResponse) XXX_DiscardUnknown()
- func (m *ListRecommendationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListRecommendationsResponse) XXX_Merge(src proto.Message)
- func (m *ListRecommendationsResponse) XXX_Size() int
- func (m *ListRecommendationsResponse) XXX_Unmarshal(b []byte) error
- type Money
- func (*Money) Descriptor() ([]byte, []int)
- func (m *Money) GetCurrencyCode() string
- func (m *Money) GetNanos() int32
- func (m *Money) GetUnits() int64
- func (*Money) ProtoMessage()
- func (m *Money) Reset()
- func (m *Money) String() string
- func (m *Money) XXX_DiscardUnknown()
- func (m *Money) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Money) XXX_Merge(src proto.Message)
- func (m *Money) XXX_Size() int
- func (m *Money) XXX_Unmarshal(b []byte) error
- type Product
- func (*Product) Descriptor() ([]byte, []int)
- func (m *Product) GetCategories() []string
- func (m *Product) GetDescription() string
- func (m *Product) GetId() string
- func (m *Product) GetName() string
- func (m *Product) GetPicture() string
- func (m *Product) GetPriceUsd() *Money
- 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 ProductCatalogServiceClient
- type ProductCatalogServiceServer
- type RecommendationServiceClient
- type RecommendationServiceServer
- type SearchProductsRequest
- func (*SearchProductsRequest) Descriptor() ([]byte, []int)
- func (m *SearchProductsRequest) GetQuery() string
- func (*SearchProductsRequest) ProtoMessage()
- func (m *SearchProductsRequest) Reset()
- func (m *SearchProductsRequest) String() string
- func (m *SearchProductsRequest) XXX_DiscardUnknown()
- func (m *SearchProductsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SearchProductsRequest) XXX_Merge(src proto.Message)
- func (m *SearchProductsRequest) XXX_Size() int
- func (m *SearchProductsRequest) XXX_Unmarshal(b []byte) error
- type SearchProductsResponse
- func (*SearchProductsResponse) Descriptor() ([]byte, []int)
- func (m *SearchProductsResponse) GetResults() []*Product
- func (*SearchProductsResponse) ProtoMessage()
- func (m *SearchProductsResponse) Reset()
- func (m *SearchProductsResponse) String() string
- func (m *SearchProductsResponse) XXX_DiscardUnknown()
- func (m *SearchProductsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SearchProductsResponse) XXX_Merge(src proto.Message)
- func (m *SearchProductsResponse) XXX_Size() int
- func (m *SearchProductsResponse) XXX_Unmarshal(b []byte) error
- type UnimplementedProductCatalogServiceServer
- func (*UnimplementedProductCatalogServiceServer) GetProduct(ctx context.Context, req *GetProductRequest) (*Product, error)
- func (*UnimplementedProductCatalogServiceServer) ListProducts(ctx context.Context, req *Empty) (*ListProductsResponse, error)
- func (*UnimplementedProductCatalogServiceServer) SearchProducts(ctx context.Context, req *SearchProductsRequest) (*SearchProductsResponse, error)
- type UnimplementedRecommendationServiceServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterProductCatalogServiceServer ¶
func RegisterProductCatalogServiceServer(s *grpc.Server, srv ProductCatalogServiceServer)
func RegisterRecommendationServiceServer ¶
func RegisterRecommendationServiceServer(s *grpc.Server, srv RecommendationServiceServer)
Types ¶
type Empty ¶
type Empty struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
=============== Common messages ===============
func (*Empty) Descriptor ¶
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) XXX_DiscardUnknown ¶
func (m *Empty) XXX_DiscardUnknown()
func (*Empty) XXX_Marshal ¶
func (*Empty) XXX_Unmarshal ¶
type GetProductRequest ¶
type GetProductRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetProductRequest) Descriptor ¶
func (*GetProductRequest) Descriptor() ([]byte, []int)
func (*GetProductRequest) GetId ¶
func (m *GetProductRequest) GetId() string
func (*GetProductRequest) ProtoMessage ¶
func (*GetProductRequest) ProtoMessage()
func (*GetProductRequest) Reset ¶
func (m *GetProductRequest) Reset()
func (*GetProductRequest) String ¶
func (m *GetProductRequest) String() string
func (*GetProductRequest) XXX_DiscardUnknown ¶
func (m *GetProductRequest) XXX_DiscardUnknown()
func (*GetProductRequest) XXX_Marshal ¶
func (m *GetProductRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetProductRequest) XXX_Merge ¶
func (m *GetProductRequest) XXX_Merge(src proto.Message)
func (*GetProductRequest) XXX_Size ¶
func (m *GetProductRequest) XXX_Size() int
func (*GetProductRequest) XXX_Unmarshal ¶
func (m *GetProductRequest) XXX_Unmarshal(b []byte) error
type ListProductsResponse ¶
type ListProductsResponse 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 (*ListProductsResponse) Descriptor ¶
func (*ListProductsResponse) Descriptor() ([]byte, []int)
func (*ListProductsResponse) GetProducts ¶
func (m *ListProductsResponse) GetProducts() []*Product
func (*ListProductsResponse) ProtoMessage ¶
func (*ListProductsResponse) ProtoMessage()
func (*ListProductsResponse) Reset ¶
func (m *ListProductsResponse) Reset()
func (*ListProductsResponse) String ¶
func (m *ListProductsResponse) String() string
func (*ListProductsResponse) XXX_DiscardUnknown ¶
func (m *ListProductsResponse) XXX_DiscardUnknown()
func (*ListProductsResponse) XXX_Marshal ¶
func (m *ListProductsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListProductsResponse) XXX_Merge ¶
func (m *ListProductsResponse) XXX_Merge(src proto.Message)
func (*ListProductsResponse) XXX_Size ¶
func (m *ListProductsResponse) XXX_Size() int
func (*ListProductsResponse) XXX_Unmarshal ¶
func (m *ListProductsResponse) XXX_Unmarshal(b []byte) error
type ListRecommendationsRequest ¶
type ListRecommendationsRequest struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` ProductIds []string `protobuf:"bytes,2,rep,name=product_ids,json=productIds,proto3" json:"product_ids,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ListRecommendationsRequest) Descriptor ¶
func (*ListRecommendationsRequest) Descriptor() ([]byte, []int)
func (*ListRecommendationsRequest) GetProductIds ¶
func (m *ListRecommendationsRequest) GetProductIds() []string
func (*ListRecommendationsRequest) GetUserId ¶
func (m *ListRecommendationsRequest) GetUserId() string
func (*ListRecommendationsRequest) ProtoMessage ¶
func (*ListRecommendationsRequest) ProtoMessage()
func (*ListRecommendationsRequest) Reset ¶
func (m *ListRecommendationsRequest) Reset()
func (*ListRecommendationsRequest) String ¶
func (m *ListRecommendationsRequest) String() string
func (*ListRecommendationsRequest) XXX_DiscardUnknown ¶
func (m *ListRecommendationsRequest) XXX_DiscardUnknown()
func (*ListRecommendationsRequest) XXX_Marshal ¶
func (m *ListRecommendationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListRecommendationsRequest) XXX_Merge ¶
func (m *ListRecommendationsRequest) XXX_Merge(src proto.Message)
func (*ListRecommendationsRequest) XXX_Size ¶
func (m *ListRecommendationsRequest) XXX_Size() int
func (*ListRecommendationsRequest) XXX_Unmarshal ¶
func (m *ListRecommendationsRequest) XXX_Unmarshal(b []byte) error
type ListRecommendationsResponse ¶
type ListRecommendationsResponse struct { ProductIds []string `protobuf:"bytes,1,rep,name=product_ids,json=productIds,proto3" json:"product_ids,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ListRecommendationsResponse) Descriptor ¶
func (*ListRecommendationsResponse) Descriptor() ([]byte, []int)
func (*ListRecommendationsResponse) GetProductIds ¶
func (m *ListRecommendationsResponse) GetProductIds() []string
func (*ListRecommendationsResponse) ProtoMessage ¶
func (*ListRecommendationsResponse) ProtoMessage()
func (*ListRecommendationsResponse) Reset ¶
func (m *ListRecommendationsResponse) Reset()
func (*ListRecommendationsResponse) String ¶
func (m *ListRecommendationsResponse) String() string
func (*ListRecommendationsResponse) XXX_DiscardUnknown ¶
func (m *ListRecommendationsResponse) XXX_DiscardUnknown()
func (*ListRecommendationsResponse) XXX_Marshal ¶
func (m *ListRecommendationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListRecommendationsResponse) XXX_Merge ¶
func (m *ListRecommendationsResponse) XXX_Merge(src proto.Message)
func (*ListRecommendationsResponse) XXX_Size ¶
func (m *ListRecommendationsResponse) XXX_Size() int
func (*ListRecommendationsResponse) XXX_Unmarshal ¶
func (m *ListRecommendationsResponse) XXX_Unmarshal(b []byte) error
type Money ¶
type Money struct { // 3-letter currency code defined in ISO 4217 CurrencyCode string `protobuf:"bytes,1,opt,name=currency_code,json=currencyCode,proto3" json:"currency_code,omitempty"` // The whole units of the amount. Units int64 `protobuf:"varint,2,opt,name=units,proto3" json:"units,omitempty"` // Between -999,999,999 and +999,999,999. Nanos int32 `protobuf:"varint,3,opt,name=nanos,proto3" json:"nanos,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Represents an amount of money with its currency type. ie: $1.75 USD: current_code = USD, units = -1, nanos = -750,000,000
func (*Money) Descriptor ¶
func (*Money) GetCurrencyCode ¶
func (*Money) ProtoMessage ¶
func (*Money) ProtoMessage()
func (*Money) XXX_DiscardUnknown ¶
func (m *Money) XXX_DiscardUnknown()
func (*Money) XXX_Marshal ¶
func (*Money) XXX_Unmarshal ¶
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"` Picture string `protobuf:"bytes,4,opt,name=picture,proto3" json:"picture,omitempty"` PriceUsd *Money `protobuf:"bytes,5,opt,name=price_usd,json=priceUsd,proto3" json:"price_usd,omitempty"` Categories []string `protobuf:"bytes,6,rep,name=categories,proto3" json:"categories,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Product) Descriptor ¶
func (*Product) GetCategories ¶
func (*Product) GetDescription ¶
func (*Product) GetPicture ¶
func (*Product) GetPriceUsd ¶
func (*Product) ProtoMessage ¶
func (*Product) ProtoMessage()
func (*Product) XXX_DiscardUnknown ¶
func (m *Product) XXX_DiscardUnknown()
func (*Product) XXX_Marshal ¶
func (*Product) XXX_Unmarshal ¶
type ProductCatalogServiceClient ¶
type ProductCatalogServiceClient interface { ListProducts(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ListProductsResponse, error) GetProduct(ctx context.Context, in *GetProductRequest, opts ...grpc.CallOption) (*Product, error) SearchProducts(ctx context.Context, in *SearchProductsRequest, opts ...grpc.CallOption) (*SearchProductsResponse, error) }
ProductCatalogServiceClient is the client API for ProductCatalogService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewProductCatalogServiceClient ¶
func NewProductCatalogServiceClient(cc *grpc.ClientConn) ProductCatalogServiceClient
type ProductCatalogServiceServer ¶
type ProductCatalogServiceServer interface { ListProducts(context.Context, *Empty) (*ListProductsResponse, error) GetProduct(context.Context, *GetProductRequest) (*Product, error) SearchProducts(context.Context, *SearchProductsRequest) (*SearchProductsResponse, error) }
ProductCatalogServiceServer is the server API for ProductCatalogService service.
type RecommendationServiceClient ¶
type RecommendationServiceClient interface {
ListRecommendations(ctx context.Context, in *ListRecommendationsRequest, opts ...grpc.CallOption) (*ListRecommendationsResponse, error)
}
RecommendationServiceClient is the client API for RecommendationService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewRecommendationServiceClient ¶
func NewRecommendationServiceClient(cc *grpc.ClientConn) RecommendationServiceClient
type RecommendationServiceServer ¶
type RecommendationServiceServer interface {
ListRecommendations(context.Context, *ListRecommendationsRequest) (*ListRecommendationsResponse, error)
}
RecommendationServiceServer is the server API for RecommendationService service.
type SearchProductsRequest ¶
type SearchProductsRequest struct { Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SearchProductsRequest) Descriptor ¶
func (*SearchProductsRequest) Descriptor() ([]byte, []int)
func (*SearchProductsRequest) GetQuery ¶
func (m *SearchProductsRequest) GetQuery() string
func (*SearchProductsRequest) ProtoMessage ¶
func (*SearchProductsRequest) ProtoMessage()
func (*SearchProductsRequest) Reset ¶
func (m *SearchProductsRequest) Reset()
func (*SearchProductsRequest) String ¶
func (m *SearchProductsRequest) String() string
func (*SearchProductsRequest) XXX_DiscardUnknown ¶
func (m *SearchProductsRequest) XXX_DiscardUnknown()
func (*SearchProductsRequest) XXX_Marshal ¶
func (m *SearchProductsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SearchProductsRequest) XXX_Merge ¶
func (m *SearchProductsRequest) XXX_Merge(src proto.Message)
func (*SearchProductsRequest) XXX_Size ¶
func (m *SearchProductsRequest) XXX_Size() int
func (*SearchProductsRequest) XXX_Unmarshal ¶
func (m *SearchProductsRequest) XXX_Unmarshal(b []byte) error
type SearchProductsResponse ¶
type SearchProductsResponse struct { Results []*Product `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SearchProductsResponse) Descriptor ¶
func (*SearchProductsResponse) Descriptor() ([]byte, []int)
func (*SearchProductsResponse) GetResults ¶
func (m *SearchProductsResponse) GetResults() []*Product
func (*SearchProductsResponse) ProtoMessage ¶
func (*SearchProductsResponse) ProtoMessage()
func (*SearchProductsResponse) Reset ¶
func (m *SearchProductsResponse) Reset()
func (*SearchProductsResponse) String ¶
func (m *SearchProductsResponse) String() string
func (*SearchProductsResponse) XXX_DiscardUnknown ¶
func (m *SearchProductsResponse) XXX_DiscardUnknown()
func (*SearchProductsResponse) XXX_Marshal ¶
func (m *SearchProductsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SearchProductsResponse) XXX_Merge ¶
func (m *SearchProductsResponse) XXX_Merge(src proto.Message)
func (*SearchProductsResponse) XXX_Size ¶
func (m *SearchProductsResponse) XXX_Size() int
func (*SearchProductsResponse) XXX_Unmarshal ¶
func (m *SearchProductsResponse) XXX_Unmarshal(b []byte) error
type UnimplementedProductCatalogServiceServer ¶
type UnimplementedProductCatalogServiceServer struct { }
UnimplementedProductCatalogServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedProductCatalogServiceServer) GetProduct ¶
func (*UnimplementedProductCatalogServiceServer) GetProduct(ctx context.Context, req *GetProductRequest) (*Product, error)
func (*UnimplementedProductCatalogServiceServer) ListProducts ¶
func (*UnimplementedProductCatalogServiceServer) ListProducts(ctx context.Context, req *Empty) (*ListProductsResponse, error)
func (*UnimplementedProductCatalogServiceServer) SearchProducts ¶
func (*UnimplementedProductCatalogServiceServer) SearchProducts(ctx context.Context, req *SearchProductsRequest) (*SearchProductsResponse, error)
type UnimplementedRecommendationServiceServer ¶
type UnimplementedRecommendationServiceServer struct { }
UnimplementedRecommendationServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedRecommendationServiceServer) ListRecommendations ¶
func (*UnimplementedRecommendationServiceServer) ListRecommendations(ctx context.Context, req *ListRecommendationsRequest) (*ListRecommendationsResponse, error)