Documentation ¶
Index ¶
- func HashedPassword(password string) (string, error)
- func RandomEmail() string
- func RandomNumber(min, max int64) int64
- func RandomPasswordHash(passwordLength int) string
- func RandomString(length int) string
- func RandomWebsiteURL() string
- func VerifyPassword(hashedPassword, password string) error
- type Configs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HashedPassword ¶
HashedPassword returns a stringify hash of the password.
func RandomNumber ¶
RandomNumber returns a random number between min and max integers.
func RandomPasswordHash ¶
RandomPasswordHash generates a random hash of a string.
func RandomWebsiteURL ¶
func RandomWebsiteURL() string
RandomWebsiteURL returns a random website url.
func VerifyPassword ¶
VerifyPassword checks the hashed password against the cleartext password.
Types ¶
type Configs ¶
type Configs struct { DBDriver string `mapstructure:"DB_DRIVER"` DBSource string `mapstructure:"DB_SOURCE"` ServerAddress string `mapstructure:"SERVER_ADDRESS"` SymmetricKey string `mapstructure:"TOKEN_SYMMETRIC_KEY"` SessionTokenDuration time.Duration `mapstructure:"SESSION_TOKEN_DURATION"` }
A Configs defines the expected config values.
func ParseConfigs ¶
ParseConfigs parses the configuration files.
Click to show internal directories.
Click to hide internal directories.