Documentation
¶
Index ¶
- func CheckPassword(password string, hashedPassowrd string) error
- func HashPassword(password string) (string, error)
- func RandomEmail(n int) string
- func RandomInt(min, max int64) int64
- func RandomMoney() int64
- func RandomStr(n int) string
- func RandomUser() string
- func ValidQuery(query string) bool
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPassword ¶
CheckPassword checks if password and hashedpassword are the same.
func HashPassword ¶
HashPassword returns the bcrypt hash of the password and an error.
func ValidQuery ¶
ValidQuery checks if parsed SQL Query is a valid query a valid query in this case is a correct SQL which is also a SELECT statement. It adds extra security to ensure only SELECT queries are validated.
Types ¶
type Config ¶
type Config struct {
Port string
DBDriver string
DBUrl string
DBName string
Environment string
TokenSymmetricKey string
TokenSecretKey string
AccessTokenDuration time.Duration
ApiKey string
OrgId string
ProjectId string
Model string
Temp string
CronSchedule string
CronBatchSize string
LogPath string
}
func LoadConfig ¶
Click to show internal directories.
Click to hide internal directories.