Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IfAuth ¶
func IfAuth(db *gorm.DB, handler func(ctx context.Context, w http.ResponseWriter, r *http.Request, p httpr.Params)) func(w http.ResponseWriter, r *http.Request, p httpr.Params)
simple helper to check if the user is auth in the application, if logged process the handler, or return directly
func MaybeAuth ¶
func MaybeAuth(db *gorm.DB, handler func(ctx context.Context, w http.ResponseWriter, r *http.Request, p httpr.Params)) func(w http.ResponseWriter, r *http.Request, p httpr.Params)
simple helper to check if the user is auth in the application, if logged process the handler, or return directly
Types ¶
type UserAccess ¶
Click to show internal directories.
Click to hide internal directories.