Documentation ¶
Index ¶
- Constants
- func AttachRoutes(request *AttachRoutesRequest)
- type AttachRoutesRequest
- type Handler
- func (h *Handler) AuthLogin(w http.ResponseWriter, r *http.Request)
- func (h *Handler) AuthResetPassword(w http.ResponseWriter, r *http.Request)
- func (h *Handler) AuthSignup(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ComingSoon(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Cookie(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Dash(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DashAlerts(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DashBlank(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DashButtons(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DashCalendar(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DashCharts(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DashFormElements(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DashFormLayout(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DashProfile(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DashSettings(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DashTables(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Home(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Privacy(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Terms(w http.ResponseWriter, r *http.Request)
- type NewWebAppHandlerRequest
Constants ¶
View Source
const ( // WebAppBase the start of the web apps URI WebAppBase = "/" // WebAppDashRoute the root URI for the web app dashboard WebAppDashRoute = WebAppBase + "dash" // WebAppDashCalendarRoute the URI for the web app's dash calendar page WebAppDashCalendarRoute = WebAppDashRoute + "/" + "calendar" // WebAppDashProfileRoute the URI for the web app's dash profile page WebAppDashProfileRoute = WebAppDashRoute + "/" + "profile" // WebAppDashBlankRoute the URI for the web app's dash blank page WebAppDashBlankRoute = WebAppDashRoute + "/" + "blank" // WebAppDashFormElementsRoute the URI for the web app's form elements page WebAppDashFormElementsRoute = WebAppDashRoute + "/" + "form-elements" // WebAppDashFormLayoutRoute the URI for the web app's form layout page WebAppDashFormLayoutRoute = WebAppDashRoute + "/" + "form-layout" // WebAppDashTablesRoute the URI for the web app's tables page WebAppDashTablesRoute = WebAppDashRoute + "/" + "tables" // WebAppDashSettingsRoute the URI for the web app's settings page WebAppDashSettingsRoute = WebAppDashRoute + "/" + "settings" // WebAppDashChartsRoute the URI for the web app's charts page WebAppDashChartsRoute = WebAppDashRoute + "/" + "charts" // WebAppDashAlertsRoute the URI for the web app's alerts page WebAppDashAlertsRoute = WebAppDashRoute + "/" + "alerts" // WebAppDashButtonsRoute the URI for the web app's buttons page WebAppDashButtonsRoute = WebAppDashRoute + "/" + "buttons" // WebAppPolicyTermsRoute the URI for the web app terms policy page WebAppPolicyTermsRoute = WebAppBase + "terms" // WebAppPolicyPrivacyRoute the URI for the web app privacy policy page WebAppPolicyPrivacyRoute = WebAppBase + "privacy-policy" // WebAppPolicyCookieRoute the URI for the web app cookie policy page WebAppPolicyCookieRoute = WebAppBase + "cookie-policy" // WebAppComingSoonRoute the URI for the web app coming soon page WebAppComingSoonRoute = WebAppBase + "coming-soon" // WebAppAuthRoute base URI prefix for the web app auth route for user authentication WebAppAuthRoute = WebAppBase + "auth/" // WebAppAuthLoginRoute the URI for the web app login page WebAppAuthLoginRoute = WebAppAuthRoute + "login" // WebAppAuthSignupRoute the URI for the web app signup page WebAppAuthSignupRoute = WebAppAuthRoute + "signup" // WebAppAuthResetPasswordRoute the URI for the web app reset password page WebAppAuthResetPasswordRoute = WebAppAuthRoute + "reset-password" // WebAppStaticRoute base URI prefix for the web app static route for assets WebAppStaticRoute = WebAppBase + "static/" )
Variables ¶
This section is empty.
Functions ¶
func AttachRoutes ¶
func AttachRoutes(request *AttachRoutesRequest)
AttachRoutes attaches webApp handler to corresponding routes on router
Types ¶
type AttachRoutesRequest ¶
type AttachRoutesRequest struct { // Router main router being served by server Router *router.Router // Handler valid web app handler Handler webAppHandler // WebAppFileSystem the file system that holds files utilised // by the web app WebAppFileSystem fs.FS // EmbeddedContentFilePathPrefix the prefix used to access the embedded files EmbeddedContentFilePathPrefix string }
AttachRoutesRequest holds everything needed to attach web app routes to router
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler manages request for webapp
func NewWebAppHandler ¶
func NewWebAppHandler(r *NewWebAppHandlerRequest) *Handler
NewWebAppHandler creates a new instance of a web app handler
func (*Handler) AuthResetPassword ¶
func (h *Handler) AuthResetPassword(w http.ResponseWriter, r *http.Request)
func (*Handler) AuthSignup ¶
func (h *Handler) AuthSignup(w http.ResponseWriter, r *http.Request)
func (*Handler) ComingSoon ¶
func (h *Handler) ComingSoon(w http.ResponseWriter, r *http.Request)
func (*Handler) DashAlerts ¶
func (h *Handler) DashAlerts(w http.ResponseWriter, r *http.Request)
func (*Handler) DashButtons ¶
func (h *Handler) DashButtons(w http.ResponseWriter, r *http.Request)
func (*Handler) DashCalendar ¶
func (h *Handler) DashCalendar(w http.ResponseWriter, r *http.Request)
func (*Handler) DashCharts ¶
func (h *Handler) DashCharts(w http.ResponseWriter, r *http.Request)
func (*Handler) DashFormElements ¶
func (h *Handler) DashFormElements(w http.ResponseWriter, r *http.Request)
func (*Handler) DashFormLayout ¶
func (h *Handler) DashFormLayout(w http.ResponseWriter, r *http.Request)
func (*Handler) DashProfile ¶
func (h *Handler) DashProfile(w http.ResponseWriter, r *http.Request)
func (*Handler) DashSettings ¶
func (h *Handler) DashSettings(w http.ResponseWriter, r *http.Request)
func (*Handler) DashTables ¶
func (h *Handler) DashTables(w http.ResponseWriter, r *http.Request)
type NewWebAppHandlerRequest ¶
type NewWebAppHandlerRequest struct { EmbeddedContent fs.FS // EmbeddedContentFilePathPrefix the prefix used to access the embedded files EmbeddedContentFilePathPrefix string TermsOfServicePolicy *policy.WebAppPolicy PrivacyPolicy *policy.WebAppPolicy CookiePolicy *policy.WebAppPolicy }
NewWebAppHandlerRequest is the request needed to create a web app handler
Click to show internal directories.
Click to hide internal directories.