Documentation ¶
Index ¶
- Variables
- func ImageCheckFilename(filename string) bool
- func ImageCompare(a image.Image, b image.Image) (float32, error)
- func ImageDelete(filename string, keepThumb bool)
- func ImageGetFullPath(filename string, thumb bool) string
- func ImageRandomFilename() string
- func ImageSave(image image.Image) (string, error)
- func Init() error
- func RandStringBytes(n int) string
- func SendEmail(e, s string, b *string)
- func SendVerificationEmail(e, vc string)
- func TokenGenerate(id string) string
- func TokenValidate(t string) (string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorParseClaim error
View Source
var ErrorParseToken error
View Source
var ErrorTokenExpired error
View Source
var ErrorTokenMalformed error
View Source
var ErrorTokenRequired error
Functions ¶
func ImageCheckFilename ¶
func ImageGetFullPath ¶
need check filename if the filename comes from user
func ImageRandomFilename ¶
func ImageRandomFilename() string
func RandStringBytes ¶
func SendVerificationEmail ¶
func SendVerificationEmail(e, vc string)
SendVerificationEmail sends verification email to new user, it takes an email address and the verification code
func TokenGenerate ¶
TokenGenerate output the JWT token and it takes a user id and returns a string representing the token
func TokenValidate ¶
TokenValidate validates the token. It takes a token and returns a string representing the user Id and an error if it occurs. Possible errors are: ErrorParseClaim, ErrorParseToken, ErrorTokenExpired, ErrorTokenMalformed
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.