Documentation ¶
Index ¶
- func ReturningAdvertItem(returningAdvertList *protobuf.ReturningAdvertList) []*models.ReturningAdvert
- type CartHandler
- type CartManager
- func (manager *CartManager) AppendAdvByIDs(ctx context.Context, in *protobuf.UserIdAdvertIdRequest) (*protobuf.AppendAdvResponse, error)
- func (manager *CartManager) DeleteAdvByIDs(ctx context.Context, in *protobuf.UserIdAdvertIdRequest) (*protobuf.DeleteAdvResponse, error)
- func (manager *CartManager) GetCartByUserID(ctx context.Context, in *protobuf.UserIdRequest) (*protobuf.ReturningAdvertList, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReturningAdvertItem ¶
func ReturningAdvertItem(returningAdvertList *protobuf.ReturningAdvertList) []*models.ReturningAdvert
Types ¶
type CartHandler ¶
type CartHandler struct {
// contains filtered or unexported fields
}
func NewCartHandler ¶
func NewCartHandler(cartClient cartproto.CartClient, authClient authproto.AuthClient) *CartHandler
func (*CartHandler) ChangeCart ¶
func (cartHandler *CartHandler) ChangeCart(writer http.ResponseWriter, request *http.Request)
func (*CartHandler) DeleteFromCart ¶
func (cartHandler *CartHandler) DeleteFromCart(writer http.ResponseWriter, request *http.Request)
func (*CartHandler) GetCartList ¶
func (cartHandler *CartHandler) GetCartList(writer http.ResponseWriter, request *http.Request)
GetAdsList godoc @Summary Retrieve a list of adverts @Description Get a paginated list of adverts @Tags adverts @Accept json @Produce json @Success 200 {object} responses.AdvertsOkResponse @Failure 400 {object} responses.AdvertsErrResponse "Too many adverts specified" @Failure 405 {object} responses.AdvertsErrResponse "Method not allowed" @Failure 500 {object} responses.AdvertsErrResponse "Internal server error" @Router /api/adverts/list [get]
type CartManager ¶
type CartManager struct { protobuf.UnimplementedCartServer // contains filtered or unexported fields }
func NewCartManager ¶
func NewCartManager(storage cartusecases.CartStorageInterface) *CartManager
func (*CartManager) AppendAdvByIDs ¶
func (manager *CartManager) AppendAdvByIDs(ctx context.Context, in *protobuf.UserIdAdvertIdRequest) (*protobuf.AppendAdvResponse, error)
func (*CartManager) DeleteAdvByIDs ¶
func (manager *CartManager) DeleteAdvByIDs(ctx context.Context, in *protobuf.UserIdAdvertIdRequest) (*protobuf.DeleteAdvResponse, error)
func (*CartManager) GetCartByUserID ¶
func (manager *CartManager) GetCartByUserID(ctx context.Context, in *protobuf.UserIdRequest) (*protobuf.ReturningAdvertList, error)
Click to show internal directories.
Click to hide internal directories.