Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BundleMode ¶
type BundleMode int32
const ( DevBundleMode BundleMode = 0 ProdBundleMode BundleMode = 1 )
var CurrentDevMode BundleMode
type DefaultPage ¶
type DefaultPage interface {
Handle(*Request)
}
DefaultPage defines the standard behavior for a orbit page handler
type DocumentRenderer ¶ added in v0.7.0
type DocumentRenderer struct {
// contains filtered or unexported fields
}
type MuxHandler ¶
type MuxHandler interface { HandleFunc(string, func(http.ResponseWriter, *http.Request)) Handle(string, http.Handler) ServeHTTP(http.ResponseWriter, *http.Request) }
muxHandle is used to inject the base mux handler behavior
type PageRender ¶
type PageRender string
type Request ¶
type Request struct { RenderPage func(page PageRender, data interface{}) RenderPages func(data interface{}, pages ...PageRender) Request *http.Request Response http.ResponseWriter Slugs map[string]string }
Request is the standard request payload for the orbit page handler this is just a fancy wrapper around the http request & response that will also assist the rendering of bundled pages & incoming path slugs
type Serve ¶
type Serve struct {
// contains filtered or unexported fields
}
func (*Serve) HandleFunc ¶
HandleFunc attaches a handler to the specified pattern, this handler will be ran upon a match of the request path during an incoming http request.
func (*Serve) HandlePage ¶
func (s *Serve) HandlePage(path string, dp DefaultPage)
HandlePage attaches an orbit page to the specified pattern, this handler will be ran upon a match of the request path during an incoming http request