Documentation ¶
Index ¶
- func BuildQueryReduceStocks(data []*dto.ReduceStocksReq) (query string, args []any)
- func BuildQueryRollbackStocks(data []*dto.RollbackStoksReq) (query string, args []any)
- func CheckExistDir(path string) error
- func CheckStockProducts(orders []*dto.ReduceStocksReq, products []*entity.Product) error
- func CreateLimitAndOffset(page int) (limit, offset int)
- func CreateUnixFileName(filename string) string
- func DeleteFile(path string)
- func FormatPagedData[T any](data T, totalData int, page int, limit int) *dto.DataWithPaging[T]
- func GetMetadata(ctx context.Context) *entity.Metadata
- func GetProductIds(products any) (ids []uint, err error)
- func LogJSON(value any)
- func MapProductQueryToEntities(data []*entity.ProductQueryRes) (products []*entity.Product, totalProducts int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildQueryReduceStocks ¶
func BuildQueryReduceStocks(data []*dto.ReduceStocksReq) (query string, args []any)
func BuildQueryRollbackStocks ¶
func BuildQueryRollbackStocks(data []*dto.RollbackStoksReq) (query string, args []any)
func CheckExistDir ¶
func CheckStockProducts ¶
func CheckStockProducts(orders []*dto.ReduceStocksReq, products []*entity.Product) error
func CreateLimitAndOffset ¶
func CreateUnixFileName ¶
func DeleteFile ¶
func DeleteFile(path string)
func FormatPagedData ¶
func GetProductIds ¶
func MapProductQueryToEntities ¶
func MapProductQueryToEntities(data []*entity.ProductQueryRes) (products []*entity.Product, totalProducts int)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.