Documentation ¶
Index ¶
- Constants
- func CheckPassword(password string, hashedPassword string) error
- func HashPassword(password string) (string, error)
- func RandomEmail() string
- func RandomInt(min, max int64) int64
- func RandomString(n int) string
- func RandomURL() string
- func RandomUsername() string
- func ValidateEmail(value string) error
- func ValidateID(value int64) error
- func ValidatePassword(value string) error
- func ValidateString(value string, min, max int) error
- func ValidateURL(value string) error
- func ValidateUsername(value string) error
- type Config
Constants ¶
View Source
const ( EnvProduction = "production" EnvDevelopment = "development" )
Variables ¶
This section is empty.
Functions ¶
func CheckPassword ¶
func HashPassword ¶
func RandomEmail ¶
func RandomEmail() string
func RandomString ¶
func RandomUsername ¶
func RandomUsername() string
func ValidateEmail ¶
func ValidateID ¶
func ValidatePassword ¶
func ValidateString ¶
func ValidateURL ¶
func ValidateUsername ¶
Types ¶
type Config ¶
type Config struct { Environment string `mapstructure:"ENVIRONMENT"` PostgresSource string `mapstructure:"POSTGRES_SOURCE"` MongoSource string `mapstructure:"MONGO_SOURCE"` ServerType string `mapstructure:"SERVER_TYPE"` ServerPort int `mapstructure:"SERVER_PORT"` LogType string `mapstructure:"LOG_TYPE"` DBType string `mapstructure:"DB_TYPE"` TokenSymmetricKey string `mapstructure:"TOKEN_SYMMETRIC_KEY"` TestRepo string `mapstructure:"TEST_REPO"` }
func LoadConfig ¶
func (Config) IsProduction ¶
func (Config) IsTestAllRepo ¶
Click to show internal directories.
Click to hide internal directories.