Documentation
¶
Index ¶
- func ClientInit(conf config.AppConfig, parentDriver *driver.DB, rep *handlers.DBRepo)
- func ClientRoutes(mux *pat.PatternServeMux, standardMiddleWare, dynamicMiddleware alice.Chain) (*pat.PatternServeMux, error)
- func CustomShowHome(w http.ResponseWriter, r *http.Request)
- func NewClientMiddleware(app config.AppConfig)
- func SomeHandler(w http.ResponseWriter, r *http.Request)
- func SomeRole(next http.Handler) http.Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientInit ¶
ClientInit gives client code access to goBlender configuration
func ClientRoutes ¶
func ClientRoutes(mux *pat.PatternServeMux, standardMiddleWare, dynamicMiddleware alice.Chain) (*pat.PatternServeMux, error)
ClientRoutes is used to handle custom routes for specific clients. Prepend some unique (and site wide) value to the start of each route in order to avoid clashes with pages, etc. Middleware can be applied by importing and using the middleware.* functions.
func CustomShowHome ¶ added in v1.1.0
func CustomShowHome(w http.ResponseWriter, r *http.Request)
CustomShowHome is a sample handler which returns the home page using our local page template for the client, and is called from client-routes.go using a route that overrides the one in goBlender. This allows us to build custom functionality without having to use non-standard routes.
func NewClientMiddleware ¶ added in v1.0.3
NewClientMiddleware sets app config for middleware
func SomeHandler ¶
func SomeHandler(w http.ResponseWriter, r *http.Request)
SomeHandler is an example handler
Types ¶
This section is empty.