Versions in this module Expand all Collapse all v1 v1.0.2 Jul 4, 2026 v1.0.1 Jul 4, 2026 v1.0.0 Jul 4, 2026 Changes in this version + func AskConfirmation(prompt string) bool + func AskInput(prompt string) string + func CamelCase(s string) string + func Capitalize(s string) string + func CheckPasswordArgon2(password, hash string) bool + func CheckPasswordHash(password, hash string) bool + func CopyFile(src, dst string) error + func DecodeBase64(data string) (string, error) + func DecodeBase64URL(data string) (string, error) + func DecodeBase64URLSafe(data string) (string, error) + func DecryptAES256GCM(ciphertext, key string) (string, error) + func EncodeBase64(data string) string + func EncodeBase64URL(data string) string + func EncodeBase64URLSafe(data string) string + func EncryptAES256GCM(plaintext, key string) (string, error) + func EndOfDay(t time.Time) time.Time + func EndOfMonth(t time.Time) time.Time + func EndOfWeek(t time.Time) time.Time + func EnsureDir(dirPath string) error + func FileExists(filePath string) bool + func FormatFileSize(bytes int64) string + func FormatTime(t time.Time, format string) string + func GenerateShortUUID() string + func GenerateUUID() string + func GetFileExtension(filename string) string + func GetFileSize(filePath string) (int64, error) + func GetMIMEType(filePath string) string + func GetTimezoneOffset(tz string) (int, error) + func HMACSHA256(data, key string) string + func HMACSHA512(data, key string) string + func HashPassword(password string) (string, error) + func HashPasswordArgon2(password string) (string, error) + func IsValidPhone(phone string) bool + func IsValidSlug(slug string) bool + func IsValidUsername(username string) bool + func MD5File(filePath string) (string, error) + func ParseDuration(s string) (time.Duration, error) + func ParsePaginationParams(c *fiber.Ctx) (page, perPage int) + func PascalCase(s string) string + func PrintError(message string) + func PrintInfo(message string) + func PrintSuccess(message string) + func PrintWarning(message string) + func SHA1File(filePath string) (string, error) + func SHA256File(filePath string) (string, error) + func ShowProgress(current, total int, message string) + func Slugify(s string) string + func SnakeCase(s string) string + func StartOfDay(t time.Time) time.Time + func StartOfMonth(t time.Time) time.Time + func StartOfWeek(t time.Time) time.Time + func TitleCase(s string) string + type PaginationLinks struct + First string + Last string + Next string + Prev string + func GeneratePaginationLinks(baseURL string, meta PaginationMeta) PaginationLinks type PaginationMeta + CurrentPage int + From int + HasMore bool + LastPage int + PerPage int + To int + func NewPagination(page, perPage int, total int64) PaginationMeta type PaginationResponse + Links PaginationLinks + Pagination PaginationMeta type SortField + Order string + func ParseSortParams(sortStr string) []SortField v0 v0.1.0 Oct 25, 2025 Changes in this version + func Base64Decode(encoded string) (string, error) + func Base64Encode(data string) string + func Base64URLDecode(encoded string) (string, error) + func Base64URLEncode(data string) string + func CalculateOffset(page, pageSize int) int + func Chunk(slice interface{}, chunkSize int) interface + func Clamp(value, min, max int) int + func Contains(s, substr string) bool + func ContainsAny(s string, substrings []string) bool + func Filter(slice interface{}, predicate func(interface{}) bool) interface + func FormatBytes(bytes int64) string + func FormatDuration(d time.Duration) string + func GenerateKey() (string, error) + func GenerateRandomBytes(length int) ([]byte, error) + func GenerateRandomString(length int) (string, error) + func GenerateSecret() (string, error) + func GetPaginationLinks(meta PaginationMeta, baseURL string) map[string]interface + func GetSortString(sortFields []SortField) string + func IsEmpty(s string) bool + func IsNotEmpty(s string) bool + func IsStrongPassword(password string) bool + func IsValidEmail(email string) bool + func IsValidPhoneNumber(phone string) bool + func IsValidURL(url string) bool + func IsValidUUID(uuid string) bool + func Map(slice interface{}, mapper func(interface{}) interface{}) interface + func Max(a, b int) int + func Min(a, b int) int + func ParseBool(s string, defaultValue bool) bool + func ParseFloat(s string, defaultValue float64) float64 + func ParseInt(s string, defaultValue int) int + func Reduce(slice interface{}, initial interface{}, ...) interface + func RemoveDuplicates(slice []string) []string + func Round(value float64, places int) float64 + func Sign(data, secret string) string + func SliceContains(slice interface{}, value interface{}) bool + func SortSlice(slice interface{}, sortFields []SortField) error + func SortStructs(slice interface{}, sortFields []SortField) error + func TimeAgo(t time.Time) string + func Truncate(s string, length int) string + func TruncateWords(s string, wordCount int) string + func ValidatePaginationRequest(req *PaginationRequest, config *PaginationConfig) error + func ValidateSortFields(sortFields []SortField, config *SortConfig) error + func Verify(password, hash string, config *HashConfig) (bool, error) + func VerifySignature(data, signature, secret string) bool + type DecryptResult struct + Data string + Error string + Valid bool + func Decrypt(encryptedData, signature, nonce string, config *EncryptionConfig) (*DecryptResult, error) + func DecryptWithPassword(encryptedData, signature, nonce, password string) (*DecryptResult, error) + type EncryptResult struct + Data string + Nonce string + Signature string + func Encrypt(data string, config *EncryptionConfig) (*EncryptResult, error) + func EncryptWithPassword(data, password string) (*EncryptResult, error) + type EncryptionConfig struct + Key string + Secret string + func NewEncryptionConfig() (*EncryptionConfig, error) + func NewEncryptionConfigWithKey(key, secret string) *EncryptionConfig + type HashAlgorithm string + const Argon2 + const Bcrypt + const HMAC + const SHA256 + const SHA512 + type HashConfig struct + Algorithm HashAlgorithm + Cost int + KeyLength uint32 + Memory uint32 + Secret string + Threads uint8 + Time uint32 + func DefaultHashConfig() *HashConfig + type HashResult struct + Algorithm HashAlgorithm + Config *HashConfig + Hash string + Salt string + func Hash(password string, config *HashConfig) (*HashResult, error) + type PaginationConfig struct + DefaultPageSize int + DefaultSortBy string + DefaultSortDir string + MaxPageSize int + MinPageSize int + func DefaultPaginationConfig() *PaginationConfig + type PaginationMeta struct + HasNext bool + HasPrev bool + NextPage *int + Page int + PageSize int + PrevPage *int + Total int64 + TotalPages int + func CalculatePaginationMeta(page, pageSize int, total int64) PaginationMeta + type PaginationRequest struct + Page int + PageSize int + SortBy string + SortDir string + func ParsePaginationRequest(pageStr, pageSizeStr, sortBy, sortDir string, config *PaginationConfig) *PaginationRequest + type PaginationResponse struct + Data interface{} + Meta PaginationMeta + func CreatePaginationResponse(data interface{}, page, pageSize int, total int64) *PaginationResponse + type PaginationResponseWithLinks struct + Data interface{} + Links map[string]interface{} + Meta PaginationMeta + func CreatePaginationResponseWithLinks(data interface{}, page, pageSize int, total int64, baseURL string) *PaginationResponseWithLinks + type SortConfig struct + AllowedFields []string + DefaultDir string + DefaultField string + func CreateSortConfig(allowedFields []string, defaultField, defaultDir string) *SortConfig + func DefaultSortConfig() *SortConfig + type SortField struct + Direction string + Field string + func ParseSortRequest(sortStr string, config *SortConfig) ([]SortField, error)