Documentation
¶
Overview ¶
goa
Index ¶
- type Context
- func (c *Context) Get(key string) (value interface{}, exists bool)
- func (c *Context) GetQuery(key string) (string, bool)
- func (c *Context) GetQueryArray(key string) ([]string, bool)
- func (c *Context) JSON(json interface{})
- func (c *Context) Param(key string) string
- func (c *Context) PostForm(key string) string
- func (c *Context) Query(key string) string
- func (c *Context) Redirect(code int, location string)
- func (c *Context) Render(data []byte)
- func (c *Context) Set(key string, value interface{})
- func (c *Context) Status(code int) *Context
- func (c *Context) String(str string)
- func (c *Context) XML(xml interface{})
- type Goa
- type HandleRequest
- type M
- type Middleware
- type Middlewares
- type Param
- type Params
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
Request *http.Request
ResponseWriter http.ResponseWriter
Method string
URL *url.URL
Path string
Params Params
Keys map[string]interface{}
// contains filtered or unexported fields
}
func (*Context) GetQuery ¶
GetQuery returns the keyed url query value and isExit if it exists, return (value, true) otherwise it returns ("", false)
func (*Context) GetQueryArray ¶
GetQueryArray returns a slice of value for a given query key. And returns whether at least one value exists for the given key.
type Goa ¶
type Goa struct {
Context *Context
// contains filtered or unexported fields
}
func (*Goa) Use ¶
func (app *Goa) Use(m Middleware)
type HandleRequest ¶
type HandleRequest func(*Context)
type M ¶
type M map[string]interface{}
M is a convenient alias for a map[string]interface{} map. Use is as c.JSON(&goa.M{...})
type Middleware ¶
type Middleware func(*Context, func())
type Middlewares ¶
type Middlewares []Middleware
Click to show internal directories.
Click to hide internal directories.