util

package
v0.0.0-...-e274468 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	USD = "USD"
	BRL = "BRL"
	KWZ = "KWZ"
)

Variables

This section is empty.

Functions

func CompareHashPassword

func CompareHashPassword(password, hash string) error

func HashPassword

func HashPassword(password string) (string, error)

func IsSupportedCurrency

func IsSupportedCurrency(currency string) bool

func RandomCurrency

func RandomCurrency() string

func RandomEmail

func RandomEmail(name string) string

func RandomInt

func RandomInt(min, max int64) int64

func RandomMoney

func RandomMoney() int64

func RandomName

func RandomName() string

func RandomString

func RandomString(leng int) string

Types

type Config

type Config struct {
	DBdriver           string        `mapstructure:"DB_DRIVER"`
	DBsource           string        `mapstructure:"DB_SOURCE"`
	ServerAddress      string        `mapstructure:"SERVER_ADDRESS"`
	TokenSimetricKey   string        `mapstructure:"TOKEN_SIMETRIC_KEY"`
	AcessTokenDuration 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