Documentation ¶
Index ¶
- Variables
- func EmailCheck(email string) (err error)
- func GetEnv(k string) string
- func HashPassword(passw string) (string, error)
- func MustGet(k string) string
- func MustGetBool(k string) bool
- func MustGetInt32(k string) int
- func MustGetInt64(k string) int64
- func PasswordCheck(hashedPasswd string, passw string) (err error)
- func StrToPtrStr(str string) *string
- type ContextKey
- type ContextKeys
Constants ¶
This section is empty.
Variables ¶
View Source
var ProjectContextKeys = ContextKeys{
GothicProviderCtxKey: "provider",
ProviderCtxKey: "gg-provider",
UserCtxKey: "gg-auth-user",
}
ProjectContextKeys the project's context keys
Functions ¶
func EmailCheck ¶
EmailCheck checks the correct formatting of an email
func HashPassword ¶
HashPassword hash the password with bcrypt
func MustGetBool ¶
MustGetBool will return the env as boolean or panic if it is not present
func MustGetInt32 ¶
MustGetInt32 will return the env as int32 or panic if it is not present
func MustGetInt64 ¶
MustGetInt64 will return the env as int64 or panic if it is not present
func PasswordCheck ¶
PasswordCheck compares a password hash with what we have stored
func StrToPtrStr ¶
StrToPtrStr return a pointer to the input string
Types ¶
type ContextKey ¶
type ContextKey string
ContextKey defines a type for context keys shared in the app
type ContextKeys ¶
type ContextKeys struct { GothicProviderCtxKey ContextKey // Provider for Gothic library ProviderCtxKey ContextKey // Provider in Auth UserCtxKey ContextKey // User db object in Auth }
ContextKeys holds the context keys throughout the project
Click to show internal directories.
Click to hide internal directories.