frontend: product page
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
This commit is contained in:
parent
8a6be04035
commit
e16172c14a
5 changed files with 116 additions and 13 deletions
|
@ -31,6 +31,12 @@ func (fe *frontendServer) getProducts(ctx context.Context) ([]*pb.Product, error
|
|||
return resp.GetProducts(), err
|
||||
}
|
||||
|
||||
func (fe *frontendServer) getProduct(ctx context.Context, id string) (*pb.Product, error) {
|
||||
resp, err := pb.NewProductCatalogServiceClient(fe.productCatalogSvcConn).
|
||||
GetProduct(ctx, &pb.GetProductRequest{Id: id})
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (fe *frontendServer) convertCurrency(ctx context.Context, money *pb.Money, currency string) (*pb.Money, error) {
|
||||
if avoidNoopCurrencyConversionRPC && money.GetCurrencyCode() == currency {
|
||||
return money, nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue