Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthRequired ¶
func AuthRequired(path string) gin.HandlerFunc
AuthRequired returns the middleware that requires logged in and redirects to login page if the request is unauthorized.
func OrgRequired ¶
func OrgRequired(path string) gin.HandlerFunc
OrgRequired returns the middleware that requires organization and redirects to org register page if the user is without org.
Types ¶
type LoginData ¶
type LoginData struct { webbase.Data FormInputEmail string FormInputPassword string FormInputCallback string FormInputAction string FormLoginBtnAction string FormRegisterBtnAction string Callback string }
LoginData defines the data for login.html template.
type PageData ¶
type PageData struct { webbase.Data FormInputEmail string FormBtnAction string FormInputName string Users []User Admin bool }
PageData defines the data for links.html template.
type Web ¶
Web defines the web handler module.
func (*Web) HandleLoginForm ¶
HandleLoginForm handle request to create org user.
func (*Web) HandleOrgRegisterForm ¶
HandleOrgRegisterForm handle request to create org.
func (*Web) HandleSetOrgUserForm ¶
HandleSetOrgUserForm handle request to create org user.
func (*Web) Login ¶
func (w *Web) Login() gin.HandlerFunc
Login returns the login and register page.
Click to show internal directories.
Click to hide internal directories.