Versions in this module Expand all Collapse all v0 v0.0.15 May 1, 2024retracted v0.0.14 Apr 29, 2024retracted Changes in this version + const EQUAL_ONE + const EQUAL_ZERO + const GREATER_THAN_FIFTY + const GREATER_THAN_FOUR + const GREATER_THAN_HUNDRED + const GREATER_THAN_ONE + const GREATER_THAN_TEN + const GREATER_THAN_THREE + const GREATER_THAN_TWENTY + const GREATER_THAN_TWO + const GREATER_THAN_ZERO + const LESS_THAN_ZERO + const TEN_TO_TWENTY + const TWENTY_TO_FIFTY + const ZERO_TO_FIFTY + const ZERO_TO_HUNDRED + const ZERO_TO_TEN + const ZERO_TO_TWENTY + func AppendFile(data []byte, filePath string, mode int) error + func ArrayInt64ToString(a []int64, delim string) string + func ArrayIntToString(a []int, delim string) string + func ArrayJsonNumberToString(a []json.Number, delim string) string + func ArrayStringToString(a []string, delim string) string + func BitwiseToString(bitwise int64) string + func ClearCurrentFolder(dirPath string) error + func ClearFile(files ...string) error + func CopyFile(srcPath, dstPath string) error + func CreateFilePath(filePath string) error + func DecodeModel(input map[string]interface{}, result interface{}) error + func DistinctStr(str string, delim string) string + func Distinct[T string | int32 | int64 | float32 | float64](list []T) []T + func DoubleSlice(s interface{}) []interface + func Find[T any](list []T, f func(T) bool) T + func FormatUnixToString(d int64, format DateTime) string + func GetFromInterface(src map[string]interface{}, key string, defaultValue interface{}) interface + func GetFromInterfaceV2[T any](src map[string]interface{}, key string, defaultValue T) T + func GetFromInterfaceV3[T any](src map[string]interface{}, key string, defaultValue T, checkZeroValue ...bool) T + func GetGormQuery(query *gorm.DB, params map[string]interface{}) + func GetHasMore(currentPage int, totalCount int, pageSize int) bool + func GetScopePagination(value interface{}, pagination *Pagination, query *gorm.DB) func(db *gorm.DB) *gorm.DB + func GetTotalPages(totalCount int, pageSize int) int + func HttpClient() *http.Client + func IndexOf[T any](list []T, f func(T) bool) int + func IsZero(p interface{}) bool + func MapQuantityFromTo(condition int64, res map[string]interface{}, key string) map[string]interface + func Parse[T parsable](in interface{}) (out T, err error) + func Pop[T any](list []T) (T, []T) + func PrettyPrint(v interface{}) string + func RemoveAt[T any](list []T, i int) []T + func SendRequest(client *http.Client, headers map[string]string, endpoint, method string, ...) ([]byte, error) + func Shift[T any](list []T) (T, []T) + func Slug(s string) string + func StringToArrayInt(str, delim string) []int + func StringToArrayInt64(str string, delim string) []int64 + func StringToArrayString(str, delim string, trim bool) []string + func StringToBitwiseInt64(str string) int64 + func TimeToString(t time.Time) string + func ToPointer[T any](i T) *T + func UnixTime(d int64) time.Time + func Unshift[T any](list []T, x T) []T + func ValidateEmail(email string) bool + func ValidateStruct(s interface{}) error + func ValidateStructCtx(ctx context.Context, s interface{}) error + func Where[T any](list []T, f func(T) bool) []T + func WriteFile(data []byte, filePath string) error + func ZZip(folder string, files ...string) error + func ZipMultipleFile(outputFile string, sourceFiles ...string) error + func ZipSingleFile(sourceFile, outputFile string) error + type DateTime string + const DD_MM_YYYY + const DD_MM_YYYY_HH_MM_SS + const Kitchen + const RFC822 + const UNIX + const UNIX_MILLI + const UnixDate + const YYYY_MM_DD + const YYYY_MM_DD_HH_MM_SS + type Pagination struct + Count int64 + Limit int64 + Page int64 + Pages int64 + Records interface{} + SortBy string + SortDesc int64 + func NewPagination(limit interface{}, page interface{}, sort_by interface{}, ...) *Pagination + func (p *Pagination) GetLimit() int + func (p *Pagination) GetOffset() int + func (p *Pagination) GetPage() int + func (p *Pagination) GetSort() string + type PaginationQuery struct + OrderBy string + Page int + Size int + func GetPaginationFromCtx(c gin.Context) (*PaginationQuery, error) + func (q *PaginationQuery) GetLimit() int + func (q *PaginationQuery) GetOffset() int + func (q *PaginationQuery) GetOrderBy() string + func (q *PaginationQuery) GetPage() int + func (q *PaginationQuery) GetQueryString() string + func (q *PaginationQuery) GetSize() int + func (q *PaginationQuery) SetOrderBy(orderByQuery string) + func (q *PaginationQuery) SetPage(pageQuery string) error + func (q *PaginationQuery) SetSize(sizeQuery string) error