Documentation ¶
Index ¶
- Variables
- func BuildGravatar(email string) string
- func ContextWithUser(ctx context.Context, user model.User) context.Context
- func GenerateOTP(length int) (string, error)
- func GetUserFromContextOrPanic(ctx context.Context) model.User
- func IsHtmxRequest(r *http.Request) bool
- func Redirect(w http.ResponseWriter, r *http.Request, location string)
- func RedirectWithReturnURL(w http.ResponseWriter, r *http.Request, location, returnUrl string)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( UserContextKey = contextKey("user") BrokerContextKey = contextKey("sseBroker") )
View Source
var ( ErrSessionNotFound = errors.New("session not found") ErrUserNotFound = errors.New("user not found") ErrUserDeactivated = errors.New("user is deactivated") ErrEmailIsTaken = errors.New("email is taken") ErrPasswordIncorrect = errors.New("password is incorrect") ErrChannelNotFound = errors.New("channel not found") ErrMemberNotFound = errors.New("member not found") ErrFieldVerificationNotFound = errors.New("field verification not found") ErrFieldVerificationCodeInvalid = errors.New("field verification code invalid") ErrUnsupportedValidationField = errors.New("unsupported verification field") ErrUserHasNoPassword = errors.New("user has no password") )
Functions ¶
func BuildGravatar ¶
func GenerateOTP ¶
func IsHtmxRequest ¶
func RedirectWithReturnURL ¶
func RedirectWithReturnURL(w http.ResponseWriter, r *http.Request, location, returnUrl string)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.