Documentation ¶
Index ¶
- func CheckPassword(password, hashedPassword string) error
- func GetRandomCurrency() string
- func GetRandomEmail() string
- func GetRandomInt() int64
- func GetRandomIntWithRange(min, max int64) int64
- func GetRandomMoneyAmount() int64
- func GetRandomOwnerName() string
- func GetRandomStringWithLength(length int) string
- func HashPassword(password string) (string, error)
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPassword ¶
CheckPassword check if a password is correct
func GetRandomCurrency ¶
func GetRandomCurrency() string
GetRandomCurrency generate a random currency code
func GetRandomIntWithRange ¶
GetRandomIntWithRange generate a random integer number with range [min, max)
func GetRandomMoneyAmount ¶
func GetRandomMoneyAmount() int64
GetRandomMoneyAmount generate a random money amount with range [1, 1000)
func GetRandomOwnerName ¶
func GetRandomOwnerName() string
GetRandomOwnerName generate a random owner name
func GetRandomStringWithLength ¶
GetRandomStringWithLength generate a random string from alphabet with given length
Types ¶
type Config ¶
type Config struct { DBDriver string `mapstructure:"DB_DRIVER"` DBSource string `mapstructure:"DB_SOURCE"` ServerAddress string `mapstructure:"SERVER_ADDRESS"` TokenSymmetricKey string `mapstructure:"TOKEN_SYMMETRIC_KEY"` AccessToken time.Duration `mapstructure:"ACCESS_TOKEN_DURATION"` }
Config defines the configuration structure for the application
func LoadConfig ¶
LoadConfig loads the configuration from file and environment variables
Click to show internal directories.
Click to hide internal directories.