Documentation ¶
Index ¶
- Variables
- func DecodeRequestBody(w http.ResponseWriter, r *http.Request, t interface{})
- func GenerateAdminToken(user *db.Admin, expiresAt int64) (token string, err error)
- func GeneratePatientToken(user *db.Patient, expiresAt int64) (token string, err error)
- func GenerateToken(user *db.Psychologist, expiresAt int64) (token string, err error)
- func GetTokenFromHeader(h http.Header) string
- func HashPassword(pass string, w http.ResponseWriter) string
- func ParseTokenWithClaims(tokenString string) (*db.CustomClaims, error)
- func SendEmail(dbase *gorm.DB, email string, subject string, HTMLtemp string, ...) error
- func UploadFile(w http.ResponseWriter, r *http.Request)
- type ErrorResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrTokenInvalid = errors.New("token invalid") ErrTokenIsExpired = errors.New("token is expired") )
Functions ¶
func DecodeRequestBody ¶
func DecodeRequestBody(w http.ResponseWriter, r *http.Request, t interface{})
func GenerateAdminToken ¶
func GeneratePatientToken ¶
func GenerateToken ¶
func GenerateToken(user *db.Psychologist, expiresAt int64) (token string, err error)
func GetTokenFromHeader ¶
func HashPassword ¶
func HashPassword(pass string, w http.ResponseWriter) string
func ParseTokenWithClaims ¶
func ParseTokenWithClaims(tokenString string) (*db.CustomClaims, error)
func UploadFile ¶
func UploadFile(w http.ResponseWriter, r *http.Request)
Types ¶
type ErrorResponse ¶
Click to show internal directories.
Click to hide internal directories.