Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterCatalogHTTPServer(s *http.Server, srv CatalogHTTPServer)
- func RegisterCatalogServer(s grpc.ServiceRegistrar, srv CatalogServer)
- type CatalogClient
- type CatalogHTTPClient
- type CatalogHTTPClientImpl
- func (c *CatalogHTTPClientImpl) GetProduct(ctx context.Context, in *GetProductRequest, opts ...http.CallOption) (*shared.Product, error)
- func (c *CatalogHTTPClientImpl) ListProducts(ctx context.Context, in *ListProductsRequest, opts ...http.CallOption) (*ListProductsResponse, error)
- func (c *CatalogHTTPClientImpl) SearchProducts(ctx context.Context, in *SearchProductsRequest, opts ...http.CallOption) (*SearchProductsResponse, error)
- type CatalogHTTPServer
- type CatalogServer
- type GetProductRequest
- type ListProductsRequest
- func (*ListProductsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListProductsRequest) GetPageSize() int32
- func (x *ListProductsRequest) GetPageToken() string
- func (*ListProductsRequest) ProtoMessage()
- func (x *ListProductsRequest) ProtoReflect() protoreflect.Message
- func (x *ListProductsRequest) Reset()
- func (x *ListProductsRequest) String() string
- type ListProductsResponse
- func (*ListProductsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListProductsResponse) GetPageToken() string
- func (x *ListProductsResponse) GetProducts() []*shared.Product
- func (*ListProductsResponse) ProtoMessage()
- func (x *ListProductsResponse) ProtoReflect() protoreflect.Message
- func (x *ListProductsResponse) Reset()
- func (x *ListProductsResponse) String() string
- type SearchProductsRequest
- func (*SearchProductsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SearchProductsRequest) GetPageSize() int32
- func (x *SearchProductsRequest) GetPageToken() string
- func (x *SearchProductsRequest) GetQuery() string
- func (*SearchProductsRequest) ProtoMessage()
- func (x *SearchProductsRequest) ProtoReflect() protoreflect.Message
- func (x *SearchProductsRequest) Reset()
- func (x *SearchProductsRequest) String() string
- type SearchProductsResponse
- func (*SearchProductsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SearchProductsResponse) GetResults() []*shared.Product
- func (*SearchProductsResponse) ProtoMessage()
- func (x *SearchProductsResponse) ProtoReflect() protoreflect.Message
- func (x *SearchProductsResponse) Reset()
- func (x *SearchProductsResponse) String() string
- type UnimplementedCatalogServer
- func (UnimplementedCatalogServer) GetProduct(context.Context, *GetProductRequest) (*shared.Product, error)
- func (UnimplementedCatalogServer) ListProducts(context.Context, *ListProductsRequest) (*ListProductsResponse, error)
- func (UnimplementedCatalogServer) SearchProducts(context.Context, *SearchProductsRequest) (*SearchProductsResponse, error)
- type UnsafeCatalogServer
Constants ¶
const ( Catalog_ListProducts_FullMethodName = "/boutiqueshop.Catalog/ListProducts" Catalog_GetProduct_FullMethodName = "/boutiqueshop.Catalog/GetProduct" Catalog_SearchProducts_FullMethodName = "/boutiqueshop.Catalog/SearchProducts" )
const OperationCatalogGetProduct = "/boutiqueshop.Catalog/GetProduct"
const OperationCatalogListProducts = "/boutiqueshop.Catalog/ListProducts"
const OperationCatalogSearchProducts = "/boutiqueshop.Catalog/SearchProducts"
Variables ¶
var Catalog_ServiceDesc = grpc.ServiceDesc{ ServiceName: "boutiqueshop.Catalog", HandlerType: (*CatalogServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListProducts", Handler: _Catalog_ListProducts_Handler, }, { MethodName: "GetProduct", Handler: _Catalog_GetProduct_Handler, }, { MethodName: "SearchProducts", Handler: _Catalog_SearchProducts_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "catalog/catalog.proto", }
Catalog_ServiceDesc is the grpc.ServiceDesc for Catalog service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_catalog_catalog_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCatalogHTTPServer ¶
func RegisterCatalogHTTPServer(s *http.Server, srv CatalogHTTPServer)
func RegisterCatalogServer ¶
func RegisterCatalogServer(s grpc.ServiceRegistrar, srv CatalogServer)
Types ¶
type CatalogClient ¶
type CatalogClient interface { ListProducts(ctx context.Context, in *ListProductsRequest, opts ...grpc.CallOption) (*ListProductsResponse, error) GetProduct(ctx context.Context, in *GetProductRequest, opts ...grpc.CallOption) (*shared.Product, error) SearchProducts(ctx context.Context, in *SearchProductsRequest, opts ...grpc.CallOption) (*SearchProductsResponse, error) }
CatalogClient is the client API for Catalog service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewCatalogClient ¶
func NewCatalogClient(cc grpc.ClientConnInterface) CatalogClient
type CatalogHTTPClient ¶
type CatalogHTTPClient interface { GetProduct(ctx context.Context, req *GetProductRequest, opts ...http.CallOption) (rsp *shared.Product, err error) ListProducts(ctx context.Context, req *ListProductsRequest, opts ...http.CallOption) (rsp *ListProductsResponse, err error) SearchProducts(ctx context.Context, req *SearchProductsRequest, opts ...http.CallOption) (rsp *SearchProductsResponse, err error) }
func NewCatalogHTTPClient ¶
func NewCatalogHTTPClient(client *http.Client) CatalogHTTPClient
type CatalogHTTPClientImpl ¶
type CatalogHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*CatalogHTTPClientImpl) GetProduct ¶
func (c *CatalogHTTPClientImpl) GetProduct(ctx context.Context, in *GetProductRequest, opts ...http.CallOption) (*shared.Product, error)
func (*CatalogHTTPClientImpl) ListProducts ¶
func (c *CatalogHTTPClientImpl) ListProducts(ctx context.Context, in *ListProductsRequest, opts ...http.CallOption) (*ListProductsResponse, error)
func (*CatalogHTTPClientImpl) SearchProducts ¶
func (c *CatalogHTTPClientImpl) SearchProducts(ctx context.Context, in *SearchProductsRequest, opts ...http.CallOption) (*SearchProductsResponse, error)
type CatalogHTTPServer ¶
type CatalogHTTPServer interface { GetProduct(context.Context, *GetProductRequest) (*shared.Product, error) ListProducts(context.Context, *ListProductsRequest) (*ListProductsResponse, error) SearchProducts(context.Context, *SearchProductsRequest) (*SearchProductsResponse, error) }
type CatalogServer ¶
type CatalogServer interface { ListProducts(context.Context, *ListProductsRequest) (*ListProductsResponse, error) GetProduct(context.Context, *GetProductRequest) (*shared.Product, error) SearchProducts(context.Context, *SearchProductsRequest) (*SearchProductsResponse, error) // contains filtered or unexported methods }
CatalogServer is the server API for Catalog service. All implementations must embed UnimplementedCatalogServer for forward compatibility
type GetProductRequest ¶
type GetProductRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetProductRequest) Descriptor
deprecated
func (*GetProductRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetProductRequest.ProtoReflect.Descriptor instead.
func (*GetProductRequest) GetId ¶
func (x *GetProductRequest) GetId() string
func (*GetProductRequest) ProtoMessage ¶
func (*GetProductRequest) ProtoMessage()
func (*GetProductRequest) ProtoReflect ¶
func (x *GetProductRequest) ProtoReflect() protoreflect.Message
func (*GetProductRequest) Reset ¶
func (x *GetProductRequest) Reset()
func (*GetProductRequest) String ¶
func (x *GetProductRequest) String() string
type ListProductsRequest ¶
type ListProductsRequest struct { PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` // contains filtered or unexported fields }
func (*ListProductsRequest) Descriptor
deprecated
func (*ListProductsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListProductsRequest.ProtoReflect.Descriptor instead.
func (*ListProductsRequest) GetPageSize ¶
func (x *ListProductsRequest) GetPageSize() int32
func (*ListProductsRequest) GetPageToken ¶
func (x *ListProductsRequest) GetPageToken() string
func (*ListProductsRequest) ProtoMessage ¶
func (*ListProductsRequest) ProtoMessage()
func (*ListProductsRequest) ProtoReflect ¶
func (x *ListProductsRequest) ProtoReflect() protoreflect.Message
func (*ListProductsRequest) Reset ¶
func (x *ListProductsRequest) Reset()
func (*ListProductsRequest) String ¶
func (x *ListProductsRequest) String() string
type ListProductsResponse ¶
type ListProductsResponse struct { Products []*shared.Product `protobuf:"bytes,1,rep,name=products,proto3" json:"products,omitempty"` PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` // contains filtered or unexported fields }
func (*ListProductsResponse) Descriptor
deprecated
func (*ListProductsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListProductsResponse.ProtoReflect.Descriptor instead.
func (*ListProductsResponse) GetPageToken ¶
func (x *ListProductsResponse) GetPageToken() string
func (*ListProductsResponse) GetProducts ¶
func (x *ListProductsResponse) GetProducts() []*shared.Product
func (*ListProductsResponse) ProtoMessage ¶
func (*ListProductsResponse) ProtoMessage()
func (*ListProductsResponse) ProtoReflect ¶
func (x *ListProductsResponse) ProtoReflect() protoreflect.Message
func (*ListProductsResponse) Reset ¶
func (x *ListProductsResponse) Reset()
func (*ListProductsResponse) String ¶
func (x *ListProductsResponse) String() string
type SearchProductsRequest ¶
type SearchProductsRequest struct { Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` // contains filtered or unexported fields }
func (*SearchProductsRequest) Descriptor
deprecated
func (*SearchProductsRequest) Descriptor() ([]byte, []int)
Deprecated: Use SearchProductsRequest.ProtoReflect.Descriptor instead.
func (*SearchProductsRequest) GetPageSize ¶
func (x *SearchProductsRequest) GetPageSize() int32
func (*SearchProductsRequest) GetPageToken ¶
func (x *SearchProductsRequest) GetPageToken() string
func (*SearchProductsRequest) GetQuery ¶
func (x *SearchProductsRequest) GetQuery() string
func (*SearchProductsRequest) ProtoMessage ¶
func (*SearchProductsRequest) ProtoMessage()
func (*SearchProductsRequest) ProtoReflect ¶
func (x *SearchProductsRequest) ProtoReflect() protoreflect.Message
func (*SearchProductsRequest) Reset ¶
func (x *SearchProductsRequest) Reset()
func (*SearchProductsRequest) String ¶
func (x *SearchProductsRequest) String() string
type SearchProductsResponse ¶
type SearchProductsResponse struct { Results []*shared.Product `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` // contains filtered or unexported fields }
func (*SearchProductsResponse) Descriptor
deprecated
func (*SearchProductsResponse) Descriptor() ([]byte, []int)
Deprecated: Use SearchProductsResponse.ProtoReflect.Descriptor instead.
func (*SearchProductsResponse) GetResults ¶
func (x *SearchProductsResponse) GetResults() []*shared.Product
func (*SearchProductsResponse) ProtoMessage ¶
func (*SearchProductsResponse) ProtoMessage()
func (*SearchProductsResponse) ProtoReflect ¶
func (x *SearchProductsResponse) ProtoReflect() protoreflect.Message
func (*SearchProductsResponse) Reset ¶
func (x *SearchProductsResponse) Reset()
func (*SearchProductsResponse) String ¶
func (x *SearchProductsResponse) String() string
type UnimplementedCatalogServer ¶
type UnimplementedCatalogServer struct { }
UnimplementedCatalogServer must be embedded to have forward compatible implementations.
func (UnimplementedCatalogServer) GetProduct ¶
func (UnimplementedCatalogServer) GetProduct(context.Context, *GetProductRequest) (*shared.Product, error)
func (UnimplementedCatalogServer) ListProducts ¶
func (UnimplementedCatalogServer) ListProducts(context.Context, *ListProductsRequest) (*ListProductsResponse, error)
func (UnimplementedCatalogServer) SearchProducts ¶
func (UnimplementedCatalogServer) SearchProducts(context.Context, *SearchProductsRequest) (*SearchProductsResponse, error)
type UnsafeCatalogServer ¶
type UnsafeCatalogServer interface {
// contains filtered or unexported methods
}
UnsafeCatalogServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CatalogServer will result in compilation errors.