Documentation ¶
Overview ¶
Package for handling of HTTP content
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AcceptHTML ¶
Types ¶
type PageDisplayer ¶
type PageDisplayer interface {
DisplayPage(w http.ResponseWriter, templateName string, content interface{})
}
func NewPageDisplayer ¶
func NewPageDisplayer(templates map[string]*template.Template) PageDisplayer
type SessionEnforcer ¶
type SessionEnforcer interface { // EnforceValidSession ensures that, if authentication is required, the client has done it EnforceValidSession(ctx context.Context, w http.ResponseWriter, r *http.Request) identity.SessionInfo }
SessionEnforcer defines an interface for enforcing valid HTTP sessions
func NewSessionEnforcer ¶
func NewSessionEnforcer(authenticator identity.Authenticator, pd PageDisplayer) SessionEnforcer
type StaticHandler ¶
type StaticHandler interface { // ServeHTTP service a static page ServeHTTP(w http.ResponseWriter, r *http.Request) }
StaticHandler knows how to serve static HTTP pages
func NewGcsHandler ¶
func NewGcsHandler(client *storage.Client, bucket string, enforcer SessionEnforcer) StaticHandler
NewStaticHandler creates an implementation of the StaticHandler interface
func NewStaticHandler ¶
func NewStaticHandler(enforcer SessionEnforcer) StaticHandler
NewStaticHandler creates an implementation of the StaticHandler interface
Click to show internal directories.
Click to hide internal directories.