servers

package
v0.0.0-...-d38871e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 4, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InternalCartItemToProto

func InternalCartItemToProto(item *cart.CartItem) *proto.CartItem

func ProtoNewCartItemToInternal

func ProtoNewCartItemToInternal(item *proto.NewCartItem) *cart.CartItem

Types

type CartServer

type CartServer struct {
	proto.UnimplementedCartServiceServer
	// contains filtered or unexported fields
}

func NewCartServer

func NewCartServer(cartService services.CartService) *CartServer

NewCartServer returns a new cart grpc service server object.

func (*CartServer) AddToCart

func (s *CartServer) AddToCart(ctx context.Context, req *proto.NewCartItem) (*proto.CartItem, error)

AddToCart is the grpc handler to add item to cart.

func (*CartServer) GetUserCart

GetUserCart is the grpc handler to get user cart.

func (*CartServer) RemoveItemsFromCart

RemoveItemsFromCart is the grpc handler to remove items from user cart.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL