Documentation
¶
Index ¶
- Constants
- func CheckPassword(password string, hashedpassword string) error
- func HashPassword(password string) (string, error)
- func IsSupportedCurrency(currency string) bool
- func RadnomMoney() int64
- func RadnomString(n int) string
- func RandomCurrency() string
- func RandomEmail() string
- func RandomInt(min, max int64) int64
- func RandomOwner() string
- type Config
Constants ¶
View Source
const ( USD = "USD" EUR = "EUR" CAD = "CAD" HRK = "HRK" )
Constants for all supported currencies
View Source
const ( DepositorRole = "depositor" BankRole = "bank" )
Variables ¶
This section is empty.
Functions ¶
func CheckPassword ¶
func HashPassword ¶
func IsSupportedCurrency ¶
func RadnomMoney ¶
func RadnomMoney() int64
func RadnomString ¶
func RandomCurrency ¶
func RandomCurrency() string
func RandomOwner ¶
func RandomOwner() string
Types ¶
type Config ¶
type Config struct { Environment string `mapstructure:"ENVIROMENT"` DBSource string `mapstructure:"DB_SOURCE"` MigrationURL string `mapstructure:"MIGRATION_URL"` RedisAddress string `mapstructure:"REDIS_ADDRESS"` HTTPServerAdress string `mapstructure:"HTTP_SERVER_ADRESS"` GRPCServerAdress string `mapstructure:"GRPC_SERVER_ADRESS"` TokenSymetricKey string `mapstructure:"TOKEN_SYMETRIC_KEY"` AccessTokenDuration time.Duration `mapstructure:"ACCESS_TOKEN_DURATION"` RefreshTokenDuration time.Duration `mapstructure:"REFRESH_TOKEN_DURATION"` EmailSenderName string `mapstructure:"EMAIL_SENDER_NAME"` EmailSenderAddress string `mapstructure:"EMAIL_SENDER_ADDRESS"` EmailSenderPassword string `mapstructure:"EMAIL_SENDER_PASSWORD"` }
Config sotres all config of the aplicaton the values are read by viper from a config file
func LoadConfig ¶
Reads config file or env var
Click to show internal directories.
Click to hide internal directories.