Documentation
¶
Index ¶
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func RouteDebugMiddleware ¶
func RouteDebugMiddleware(next echo.HandlerFunc) echo.HandlerFunc
RouteDebugMiddleware prints the route name of a matched path. From: https://github.com/labstack/echo/discussions/2081#discussioncomment-2040098
func TaskIDWork ¶
TaskIDWork sets a task ID via the Before option for a dowork task
func TemplateHandler ¶
func TemplateHandler(tmpl string) echo.HandlerFunc
TemplateHandler is a straight to template helper function
Types ¶
type Clock ¶
Clock is used to pass time around, helps with test mocking
type MailChecker ¶
MailChecker is an interface that the email module uses to verify if a an email address is allowed to be sent email or not. Useful to track bounces, spam complaints, etc.
type User ¶
type User interface {
GetID() uint
GetEmail() string
IsVerified() bool
SetPassword(password string) error
ComparePassword(password string) (bool, error)
IsSuperUser() bool
SetSuperUser(flag bool)
IsStaff() bool
SetStaff(flag bool)
IsAuthenticated() bool
SetAuthenticated(flag bool)
SetVerified(flag bool)
}
User is a simple interface for base user object
type UserFetch ¶
type UserFetch interface {
GetUser() User
FromDB(ctx context.Context, uid any, markAuth bool) (User, error)
FromContext(c echo.Context) User
WritePassword(ctx context.Context, user User) error
// Helpers to customize the behavior of accounts handlers
LoginType() int
// Run any user checks before actually logging the user in.
// Ie, checking if the user has `is_verified` set to true
// Any error returned will raise an error in the LoginForm
// validation in accounts
ProcessLogin(c echo.Context, user User) error
ProcessSuccessfulLogin(c echo.Context, user User) error
ProcessSuccessfulLogout(c echo.Context) error
ProcessSuccessfulPasswordChange(c echo.Context) error
ProcessSuccessfulPasswordReset(c echo.Context) error
ProcessSuccessfulEmailUpdate(c echo.Context) error
ProcessSuccessfulEmailConfirmation(c echo.Context) error
RedirectAfterLogin(c echo.Context, next string) string
RedirectAfterPasswordChange(c echo.Context) string
RedirectAfterPasswordReset(c echo.Context) string
RedirectAfterEmailUpdate(c echo.Context) string
RedirectAfterEmailConfirmation(c echo.Context) string
LoginAuthTemplateVars(c echo.Context) Map
LoginEmailTemplateVars(c echo.Context) Map
ForgotPasswordTemplateVars(c echo.Context) Map
ForgotPasswordConfTemplateVars(c echo.Context) Map
ChangePasswordTemplateVars(c echo.Context) Map
UpdateEmailTemplateVars(c echo.Context) Map
}
UserFetch is an interface to fetch User objects Main purpose is to allow external projects use custom User objects Generally used by accounts and middlewares
Source Files
¶
- gobwebs.go
- handlers.go
- interfaces.go
- middleware.go
- tasks.go
Directories
¶
| Path | Synopsis |
|---|---|
|
It is a very simple implementation.
|
It is a very simple implementation. |
|
internal
|
|
|
Package timezone is just a few simple utilities for dealing with timezones
|
Package timezone is just a few simple utilities for dealing with timezones |