Versions in this module Expand all Collapse all v1 v1.0.0 Mar 17, 2019 Changes in this version + func BytesToStringUnsafe(b []byte) string + func ETag(b []byte) string + func ETagString(b string) string + func IsMediaType(contentType string) bool + func StringToBytesUnsafe(s string) []byte + type Application struct + Config *Configuration + ContentSecurityPolicy *csp.ContentSecurityPolicy + Linters []Linter + Router *httprouter.Router + Security ApplicationSecurity + Sessions session.Manager + func New() *Application + func (app *Application) AddPushCondition(test func(*Context) bool) + func (app *Application) Get(path string, handle Handle) + func (app *Application) Handler() http.Handler + func (app *Application) ListenAndServe() + func (app *Application) Load() + func (app *Application) OnEnd(callback func()) + func (app *Application) OnPush(callback func(*Context)) + func (app *Application) OnStart(callback func()) + func (app *Application) Post(path string, handle Handle) + func (app *Application) Rewrite(rewrite func(*RewriteContext)) + func (app *Application) Run() + func (app *Application) Shutdown() + func (app *Application) StartTime() time.Time + func (app *Application) Test(route string, paths []string) + func (app *Application) TestManifest() + func (app *Application) TestRoute(route string, uri string) + func (app *Application) TestRoutes() + func (app *Application) Use(middlewares ...Middleware) + func (app *Application) Wait() + type ApplicationSecurity struct + Certificate string + Key string + func (security *ApplicationSecurity) Load(certificate string, key string) + type BodyReader struct + func (body BodyReader) Bytes() ([]byte, error) + func (body BodyReader) JSON() (interface{}, error) + func (body BodyReader) JSONObject() (map[string]interface{}, error) + func (body BodyReader) String() (string, error) + type Configuration struct + Domain string + Fonts []string + GZip bool + Manifest Manifest + Ports PortConfiguration + Push []string + Scripts ScriptsConfiguration + Styles []string + Title string + func LoadConfig(path string) (*Configuration, error) + func (config *Configuration) Reset() + type Context struct + App *Application + Data interface{} + ErrorMessage string + StatusCode int + func (ctx *Context) CSS(text string) string + func (ctx *Context) Error(statusCode int, errors ...interface{}) string + func (ctx *Context) EventStream(stream *EventStream) string + func (ctx *Context) File(file string) string + func (ctx *Context) Get(param string) string + func (ctx *Context) GetInt(param string) (int, error) + func (ctx *Context) HTML(html string) string + func (ctx *Context) HasSession() bool + func (ctx *Context) JSON(value interface{}) string + func (ctx *Context) JSONLinkedData(value interface{}) string + func (ctx *Context) JavaScript(code string) string + func (ctx *Context) Query(param string) string + func (ctx *Context) ReadAll(reader io.Reader) string + func (ctx *Context) ReadSeeker(reader io.ReadSeeker) string + func (ctx *Context) Reader(reader io.Reader) string + func (ctx *Context) RealIP() string + func (ctx *Context) Redirect(url string) string + func (ctx *Context) RedirectPermanently(url string) string + func (ctx *Context) Request() Request + func (ctx *Context) Response() Response + func (ctx *Context) Session() *session.Session + func (ctx *Context) SetURI(b string) + func (ctx *Context) Text(text string) string + func (ctx *Context) URI() string + func (ctx *Context) UserAgent() string + type Event struct + Data interface{} + Name string + type EventStream struct + Closed chan struct{} + Events chan *Event + func NewEventStream() *EventStream + type Handle func(*Context) string + type Linter interface + Begin func(route string, uri string) + End func(route string, uri string, response client.Response) + type Listener struct + func (listener Listener) Accept() (net.Conn, error) + type Manifest struct + BackgroundColor string + Display string + GCMSenderID string + Icons []ManifestIcon + Lang string + Name string + ShortName string + StartURL string + ThemeColor string + type ManifestIcon struct + Sizes string + Source string + Type string + type Middleware func(*Context, func()) + type PortConfiguration struct + HTTP int + HTTPS int + type Request struct + func (request Request) Body() BodyReader + func (request Request) Header() http.Header + func (request Request) Host() string + func (request Request) Method() string + func (request Request) Protocol() string + func (request Request) URL() *url.URL + type Response struct + func (response Response) Header() http.Header + type RewriteContext struct + Request *http.Request + func (ctx *RewriteContext) SetURI(b string) + func (ctx *RewriteContext) URI() string + type ScriptsConfiguration struct + Main string