Documentation ¶
Index ¶
Constants ¶
View Source
const START_FAILED = 1
Variables ¶
This section is empty.
Functions ¶
func CheckError ¶
CheckError prints the msg with the prefix and exits with error code 1. If the msg is nil, it does nothing.
func HashPassword ¶
HashPassword returns the bcrypt hash of the password.
func RandInternalString ¶
func RandString ¶
func VerifyPassword ¶
VerifyPassword checks the password is correct or not
Types ¶
type Setting ¶
type Setting struct { LogFile string `mapstructure:"log_file"` LogLevel string `mapstructure:"log_level"` DriverName string `mapstructure:"driver_name"` DatabaseDriverString string `mapstructure:"database_driver_string"` MigrationDirectory string `mapstructure:"migration_directory"` GinServerAddress string `mapstructure:"gin_server_address"` GRPCServerAddress string `mapstructure:"grpc_server_address"` GRPCGatewayAddress string `mapstructure:"grpc_gateway_address"` TokenType string `mapstructure:"token_type"` TokenDuration time.Duration `mapstructure:"token_duration"` RefreshTokenDuration time.Duration `mapstructure:"refresh_token_duration"` }
func GetSetting ¶
func GetSetting() *Setting
Click to show internal directories.
Click to hide internal directories.