Documentation ¶
Index ¶
- func CreateToken(ttl time.Duration, payload interface{}, privateKey string) (string, error)
- func Decode(s string) (string, error)
- func Encode(s string) string
- func HashPassword(password string) (string, error)
- func ParseTemplateDir(dir string) (*template.Template, error)
- func RandomEmail() string
- func RandomInt(min, max int64) int64
- func RandomOwner() string
- func RandomString(n int) string
- func SendEmail(user *models.DBUserResponse, data *EmailData, templateName string, ...) error
- func ToDoc(v interface{}) (doc *bson.D, err error)
- func ValidateToken(token string, publicKey string) (interface{}, error)
- func VerifyPassword(hashedPassword string, candidatePassword string) error
- type EmailData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateToken ¶
func HashPassword ¶
func RandomString ¶
RandomString generates a random string of length n
func SendEmail ¶
func SendEmail(user *models.DBUserResponse, data *EmailData, templateName string, config config.Config) error
TODO -> another service
func ValidateToken ¶
func VerifyPassword ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.