helper

package
v0.0.0-...-9bcb3a8 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateLimitAndOffset

func CreateLimitAndOffset(page int) (limit, offset int)

func FormatPagedData

func FormatPagedData[T any](data T, totalData int, page int, limit int) *dto.DataWithPaging[T]

func GetProductIdsInCart

func GetProductIdsInCart(cart []*entity.Cart) []uint32

func LogJSON

func LogJSON(value any)

func MapCartQueryToEntities

func MapCartQueryToEntities(data []*entity.CartQueryRes) (carts []*entity.Cart, totalCart int)

func MapCartToProductCartRes

func MapCartToProductCartRes(cart []*entity.Cart, products []*pb.ProductCart) []*dto.ProductCartRes

Types

This section is empty.

Jump to

Keyboard shortcuts

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