Documentation ¶
Index ¶
- func AtoUint64(s string) uint64
- func CheckNewPassword(password string) error
- func CheckPasswordHash(password, hash string) bool
- func CreatePasswordHash(password string) string
- func CreateSecureToken() string
- func FileBasename(s string) string
- func GetUniqueFilename(dir string, fname string) (string, error)
- func NormalizeEmail(email string) string
- func NotFoundOrOwned(entity string) string
- func NotFoundOrOwnedError(entity string) error
- func Substr(s string, pos, length int) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckNewPassword ¶
CheckNewPassword checks if password is safe
func CheckPasswordHash ¶
CheckPasswordHash checks if password has a specified hash
func CreatePasswordHash ¶
CreatePasswordHash creates crypto hash of the password
func CreateSecureToken ¶
func CreateSecureToken() string
CreateSecureToken creates new token for user activation / password recovery
func FileBasename ¶
FileBasename returns base file name (without extension)
func GetUniqueFilename ¶
GetUniqueFilename checks if file exists and attempts to find a unique name by appendind _num to original name
func NormalizeEmail ¶
NormalizeEmail strips spaces and converts to lower case
func NotFoundOrOwned ¶
NotFoundOrOwned returns error description when record of type %entity% is not found or not owned by the current user
func NotFoundOrOwnedError ¶
NotFoundOrOwnedError returns NotFoundOrOwned message wrapped in error
Types ¶
This section is empty.