Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterProductCatalogServiceServer(s grpc.ServiceRegistrar, srv ProductCatalogServiceServer)
- type DeleteProductRequest
- func (*DeleteProductRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteProductRequest) GetUuid() string
- func (*DeleteProductRequest) ProtoMessage()
- func (x *DeleteProductRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteProductRequest) Reset()
- func (x *DeleteProductRequest) String() string
- type DeleteProductResponse
- func (*DeleteProductResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteProductResponse) GetResult() string
- func (*DeleteProductResponse) ProtoMessage()
- func (x *DeleteProductResponse) ProtoReflect() protoreflect.Message
- func (x *DeleteProductResponse) Reset()
- func (x *DeleteProductResponse) String() string
- type GetProductRequest
- type ListProductsRequest
- type ListProductsResponse
- func (*ListProductsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListProductsResponse) GetProducts() []*Product
- func (*ListProductsResponse) ProtoMessage()
- func (x *ListProductsResponse) ProtoReflect() protoreflect.Message
- func (x *ListProductsResponse) Reset()
- func (x *ListProductsResponse) String() string
- type Product
- func (*Product) Descriptor() ([]byte, []int)deprecated
- func (x *Product) GetAttributes() map[string]*structpb.Value
- func (x *Product) GetDescription() string
- func (x *Product) GetName() string
- func (x *Product) GetPrice() float32
- func (x *Product) GetUuid() string
- func (*Product) ProtoMessage()
- func (x *Product) ProtoReflect() protoreflect.Message
- func (x *Product) Reset()
- func (x *Product) String() string
- type ProductCatalogServiceClient
- type ProductCatalogServiceServer
- type UnimplementedProductCatalogServiceServer
- func (UnimplementedProductCatalogServiceServer) CreateProduct(context.Context, *Product) (*Product, error)
- func (UnimplementedProductCatalogServiceServer) DeleteProduct(context.Context, *DeleteProductRequest) (*DeleteProductResponse, error)
- func (UnimplementedProductCatalogServiceServer) GetProduct(context.Context, *GetProductRequest) (*Product, error)
- func (UnimplementedProductCatalogServiceServer) ListProducts(context.Context, *ListProductsRequest) (*ListProductsResponse, error)
- func (UnimplementedProductCatalogServiceServer) UpdateProduct(context.Context, *Product) (*Product, error)
- type UnsafeProductCatalogServiceServer
Constants ¶
const ( ProductCatalogService_CreateProduct_FullMethodName = "/productcatalog.ProductCatalogService/CreateProduct" ProductCatalogService_GetProduct_FullMethodName = "/productcatalog.ProductCatalogService/GetProduct" ProductCatalogService_UpdateProduct_FullMethodName = "/productcatalog.ProductCatalogService/UpdateProduct" ProductCatalogService_DeleteProduct_FullMethodName = "/productcatalog.ProductCatalogService/DeleteProduct" ProductCatalogService_ListProducts_FullMethodName = "/productcatalog.ProductCatalogService/ListProducts" )
Variables ¶
var File_productcatalog_proto protoreflect.FileDescriptor
var ProductCatalogService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "productcatalog.ProductCatalogService", HandlerType: (*ProductCatalogServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateProduct", Handler: _ProductCatalogService_CreateProduct_Handler, }, { MethodName: "GetProduct", Handler: _ProductCatalogService_GetProduct_Handler, }, { MethodName: "UpdateProduct", Handler: _ProductCatalogService_UpdateProduct_Handler, }, { MethodName: "DeleteProduct", Handler: _ProductCatalogService_DeleteProduct_Handler, }, { MethodName: "ListProducts", Handler: _ProductCatalogService_ListProducts_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "productcatalog.proto", }
ProductCatalogService_ServiceDesc is the grpc.ServiceDesc for ProductCatalogService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterProductCatalogServiceServer ¶
func RegisterProductCatalogServiceServer(s grpc.ServiceRegistrar, srv ProductCatalogServiceServer)
Types ¶
type DeleteProductRequest ¶
type DeleteProductRequest struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // Unique identifier of the product to delete. // contains filtered or unexported fields }
DeleteProductRequest is the request structure for deleting a specific product.
func (*DeleteProductRequest) Descriptor
deprecated
func (*DeleteProductRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteProductRequest.ProtoReflect.Descriptor instead.
func (*DeleteProductRequest) GetUuid ¶
func (x *DeleteProductRequest) GetUuid() string
func (*DeleteProductRequest) ProtoMessage ¶
func (*DeleteProductRequest) ProtoMessage()
func (*DeleteProductRequest) ProtoReflect ¶
func (x *DeleteProductRequest) ProtoReflect() protoreflect.Message
func (*DeleteProductRequest) Reset ¶
func (x *DeleteProductRequest) Reset()
func (*DeleteProductRequest) String ¶
func (x *DeleteProductRequest) String() string
type DeleteProductResponse ¶
type DeleteProductResponse struct { Result string `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` // Result of the deletion operation. // contains filtered or unexported fields }
DeleteProductResponse is the response structure for the delete product operation.
func (*DeleteProductResponse) Descriptor
deprecated
func (*DeleteProductResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteProductResponse.ProtoReflect.Descriptor instead.
func (*DeleteProductResponse) GetResult ¶
func (x *DeleteProductResponse) GetResult() string
func (*DeleteProductResponse) ProtoMessage ¶
func (*DeleteProductResponse) ProtoMessage()
func (*DeleteProductResponse) ProtoReflect ¶
func (x *DeleteProductResponse) ProtoReflect() protoreflect.Message
func (*DeleteProductResponse) Reset ¶
func (x *DeleteProductResponse) Reset()
func (*DeleteProductResponse) String ¶
func (x *DeleteProductResponse) String() string
type GetProductRequest ¶
type GetProductRequest struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // Unique identifier of the product to retrieve. // contains filtered or unexported fields }
GetProductRequest is the request structure for retrieving a specific product.
func (*GetProductRequest) Descriptor
deprecated
func (*GetProductRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetProductRequest.ProtoReflect.Descriptor instead.
func (*GetProductRequest) GetUuid ¶
func (x *GetProductRequest) GetUuid() 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 {
// contains filtered or unexported fields
}
ListProductsRequest is the request structure for listing all products.
func (*ListProductsRequest) Descriptor
deprecated
func (*ListProductsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListProductsRequest.ProtoReflect.Descriptor instead.
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 []*Product `protobuf:"bytes,1,rep,name=products,proto3" json:"products,omitempty"` // A list of products. // contains filtered or unexported fields }
ListProductsResponse is the response structure for the list products operation.
func (*ListProductsResponse) Descriptor
deprecated
func (*ListProductsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListProductsResponse.ProtoReflect.Descriptor instead.
func (*ListProductsResponse) GetProducts ¶
func (x *ListProductsResponse) GetProducts() []*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 Product ¶
type Product struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // Unique identifier for the product. Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // The name of the product. Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` // A detailed description of the product. Price float32 `protobuf:"fixed32,4,opt,name=price,proto3" json:"price,omitempty"` // The price of the product. Attributes map[string]*structpb.Value `` /* 161-byte string literal not displayed */ // contains filtered or unexported fields }
Product is a data structure that represents an item for sale.
func (*Product) Descriptor
deprecated
func (*Product) GetDescription ¶
func (*Product) ProtoMessage ¶
func (*Product) ProtoMessage()
func (*Product) ProtoReflect ¶
func (x *Product) ProtoReflect() protoreflect.Message
type ProductCatalogServiceClient ¶
type ProductCatalogServiceClient interface { CreateProduct(ctx context.Context, in *Product, opts ...grpc.CallOption) (*Product, error) GetProduct(ctx context.Context, in *GetProductRequest, opts ...grpc.CallOption) (*Product, error) UpdateProduct(ctx context.Context, in *Product, opts ...grpc.CallOption) (*Product, error) DeleteProduct(ctx context.Context, in *DeleteProductRequest, opts ...grpc.CallOption) (*DeleteProductResponse, error) ListProducts(ctx context.Context, in *ListProductsRequest, opts ...grpc.CallOption) (*ListProductsResponse, error) }
ProductCatalogServiceClient is the client API for ProductCatalogService 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 NewProductCatalogServiceClient ¶
func NewProductCatalogServiceClient(cc grpc.ClientConnInterface) ProductCatalogServiceClient
type ProductCatalogServiceServer ¶
type ProductCatalogServiceServer interface { CreateProduct(context.Context, *Product) (*Product, error) GetProduct(context.Context, *GetProductRequest) (*Product, error) UpdateProduct(context.Context, *Product) (*Product, error) DeleteProduct(context.Context, *DeleteProductRequest) (*DeleteProductResponse, error) ListProducts(context.Context, *ListProductsRequest) (*ListProductsResponse, error) // contains filtered or unexported methods }
ProductCatalogServiceServer is the server API for ProductCatalogService service. All implementations must embed UnimplementedProductCatalogServiceServer for forward compatibility
type UnimplementedProductCatalogServiceServer ¶
type UnimplementedProductCatalogServiceServer struct { }
UnimplementedProductCatalogServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedProductCatalogServiceServer) CreateProduct ¶
func (UnimplementedProductCatalogServiceServer) DeleteProduct ¶
func (UnimplementedProductCatalogServiceServer) DeleteProduct(context.Context, *DeleteProductRequest) (*DeleteProductResponse, error)
func (UnimplementedProductCatalogServiceServer) GetProduct ¶
func (UnimplementedProductCatalogServiceServer) GetProduct(context.Context, *GetProductRequest) (*Product, error)
func (UnimplementedProductCatalogServiceServer) ListProducts ¶
func (UnimplementedProductCatalogServiceServer) ListProducts(context.Context, *ListProductsRequest) (*ListProductsResponse, error)
func (UnimplementedProductCatalogServiceServer) UpdateProduct ¶
type UnsafeProductCatalogServiceServer ¶
type UnsafeProductCatalogServiceServer interface {
// contains filtered or unexported methods
}
UnsafeProductCatalogServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ProductCatalogServiceServer will result in compilation errors.