Documentation ¶
Index ¶
- Constants
- func GetBaseTemplate(name string) (*template.Template, error)
- func GetRouter(c config.Configuration, auditPath string, port int, basePath string, ...) (*mux.Router, error)
- func JSONHandler(w http.ResponseWriter, r *http.Request, auditData *validator.AuditData)
- func MainHandler(w http.ResponseWriter, r *http.Request, c config.Configuration, ...)
Constants ¶
View Source
const ( // MainTemplateName is the main template MainTemplateName = "main.gohtml" // HeadTemplateName contains styles and meta info HeadTemplateName = "head.gohtml" NavbarTemplateName = "navbar.gohtml" // PreambleTemplateName contains an empty preamble that can be overridden PreambleTemplateName = "preamble.gohtml" // DashboardTemplateName contains the content of the dashboard DashboardTemplateName = "dashboard.gohtml" FooterTemplateName = "footer.gohtml" )
Variables ¶
This section is empty.
Functions ¶
func GetBaseTemplate ¶
GetBaseTemplate puts together the dashboard template. Individual pieces can be overridden before rendering.
func GetRouter ¶
func GetRouter(c config.Configuration, auditPath string, port int, basePath string, auditData *validator.AuditData) (*mux.Router, error)
GetRouter returns a mux router serving all routes necessary for the dashboard
func JSONHandler ¶
JSONHandler gets template data and renders json with it.
func MainHandler ¶
func MainHandler(w http.ResponseWriter, r *http.Request, c config.Configuration, auditData validator.AuditData, basePath string)
MainHandler gets template data and renders the dashboard with it.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.