Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderTemplate ¶
func RenderTemplate(w http.ResponseWriter, req *http.Request, templateName string, data interface{})
RenderTemplate renders a template with the given data and CSRF token, status 200.
func RenderTemplateWithStatus ¶ added in v0.2.0
func RenderTemplateWithStatus(w http.ResponseWriter, req *http.Request, status int, templateName string, data interface{})
RenderTemplateWithStatus renders into a buffer first so a render failure can still surface as a 500 response with no partial body written.
Types ¶
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func NewRouter ¶
func NewRouter(messagesService *services.MessagesService, sessionsService *services.SessionsService, queuesService *services.QueuesService, throttlingService *services.ThrottlingService, authSecret string, env string, trustProxyHeaders bool) *Router
Click to show internal directories.
Click to hide internal directories.