utils

package
v0.0.0-...-6636a95 Latest Latest
Warning

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

Go to latest
Published: May 8, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	USD = "USD"
	EUR = "EUR"
	CAD = "CAD"
	SGD = "SGD"
)

Variables

This section is empty.

Functions

func CheckPassword

func CheckPassword(password string, hashedPassword string) error

func GenerateRandomCurrency

func GenerateRandomCurrency() string

func GenerateRandomEmail

func GenerateRandomEmail() string

func GenerateRandomInt

func GenerateRandomInt(min, max int64) int64

func GenerateRandomMoney

func GenerateRandomMoney() int64

func GenerateRandomOwner

func GenerateRandomOwner() string

func GenerateRandomString

func GenerateRandomString(n int) string

func HashPassword

func HashPassword(password string) (string, error)

func IsSupportedCurrency

func IsSupportedCurrency(currency string) bool

Types

type Config

type Config struct {
	DBDriver            string        `mapstructure:"DB_DRIVER"`
	DBSource            string        `mapstructure:"DB_SOURCE"`
	ServerAddress       string        `mapstructure:"SERVER_ADDRESS"`
	TokenSymetricKey    string        `mapstructure:"TOKEN_SYMETRIC_KEY"`
	AccessTokenDuration time.Duration `mapstructure:"ACCESS_TOKEN_DURATION"`
}

func LoadConfig

func LoadConfig(path string) (config Config, err error)

Jump to

Keyboard shortcuts

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