Documentation ¶
Index ¶
- func NewHTTPServer(i *inventory.Service, tel telemetry.Provider) http.Handler
- type HTTPServer
- type InventoryGRPC
- func (i *InventoryGRPC) CreateProduct(ctx context.Context, req *apipb.CreateProductRequest) (*apipb.CreateProductResponse, error)
- func (i *InventoryGRPC) CreateProductReview(ctx context.Context, req *apipb.CreateProductReviewRequest) (*apipb.CreateProductReviewResponse, error)
- func (i *InventoryGRPC) DeleteProduct(ctx context.Context, req *apipb.DeleteProductRequest) (*apipb.DeleteProductResponse, error)
- func (i *InventoryGRPC) DeleteProductReview(ctx context.Context, req *apipb.DeleteProductReviewRequest) (*apipb.DeleteProductReviewResponse, error)
- func (i *InventoryGRPC) GetProduct(ctx context.Context, req *apipb.GetProductRequest) (*apipb.GetProductResponse, error)
- func (i *InventoryGRPC) GetProductReview(ctx context.Context, req *apipb.GetProductReviewRequest) (*apipb.GetProductReviewResponse, error)
- func (i *InventoryGRPC) SearchProducts(ctx context.Context, req *apipb.SearchProductsRequest) (*apipb.SearchProductsResponse, error)
- func (i *InventoryGRPC) UpdateProduct(ctx context.Context, req *apipb.UpdateProductRequest) (*apipb.UpdateProductResponse, error)
- func (i *InventoryGRPC) UpdateProductReview(ctx context.Context, req *apipb.UpdateProductReviewRequest) (*apipb.UpdateProductReviewResponse, error)
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HTTPServer ¶
type HTTPServer struct {
// contains filtered or unexported fields
}
HTTPServer exposes inventory.Service via HTTP.
type InventoryGRPC ¶
type InventoryGRPC struct { apipb.UnimplementedInventoryServer Inventory *inventory.Service }
InventoryGRPC services.
func (*InventoryGRPC) CreateProduct ¶
func (i *InventoryGRPC) CreateProduct(ctx context.Context, req *apipb.CreateProductRequest) (*apipb.CreateProductResponse, error)
CreateProduct on the inventory.
func (*InventoryGRPC) CreateProductReview ¶
func (i *InventoryGRPC) CreateProductReview(ctx context.Context, req *apipb.CreateProductReviewRequest) (*apipb.CreateProductReviewResponse, error)
CreateProductReview on the inventory.
func (*InventoryGRPC) DeleteProduct ¶
func (i *InventoryGRPC) DeleteProduct(ctx context.Context, req *apipb.DeleteProductRequest) (*apipb.DeleteProductResponse, error)
DeleteProduct on the inventory.
func (*InventoryGRPC) DeleteProductReview ¶
func (i *InventoryGRPC) DeleteProductReview(ctx context.Context, req *apipb.DeleteProductReviewRequest) (*apipb.DeleteProductReviewResponse, error)
func (*InventoryGRPC) GetProduct ¶
func (i *InventoryGRPC) GetProduct(ctx context.Context, req *apipb.GetProductRequest) (*apipb.GetProductResponse, error)
GetProduct on the inventory.
func (*InventoryGRPC) GetProductReview ¶
func (i *InventoryGRPC) GetProductReview(ctx context.Context, req *apipb.GetProductReviewRequest) (*apipb.GetProductReviewResponse, error)
func (*InventoryGRPC) SearchProducts ¶
func (i *InventoryGRPC) SearchProducts(ctx context.Context, req *apipb.SearchProductsRequest) (*apipb.SearchProductsResponse, error)
func (*InventoryGRPC) UpdateProduct ¶
func (i *InventoryGRPC) UpdateProduct(ctx context.Context, req *apipb.UpdateProductRequest) (*apipb.UpdateProductResponse, error)
UpdateProduct on the inventory.
func (*InventoryGRPC) UpdateProductReview ¶
func (i *InventoryGRPC) UpdateProductReview(ctx context.Context, req *apipb.UpdateProductReviewRequest) (*apipb.UpdateProductReviewResponse, error)
type Server ¶
type Server struct { HTTPAddress string GRPCAddress string ProbeAddress string Log *slog.Logger Tracer trace.TracerProvider Meter metric.MeterProvider Propagator propagation.TextMapPropagator Inventory *inventory.Service // contains filtered or unexported fields }
Server for the API.
Click to show internal directories.
Click to hide internal directories.