Params

func ParamsFilter

func ParamsFilter(c *Controller, fc []Filter)

func ParseParams

func ParseParams(params *Params, req *Request)

type Params

type Params struct {
    url.Values // A unified view of all the individual param maps below.

    // Set by the router
    Fixed url.Values // Fixed parameters from the route, e.g. App.Action("fixed param")
    Route url.Values // Parameters extracted from the route,  e.g. /customers/{id}

    // Set by the ParamsFilter
    Query url.Values // Parameters from the query string, e.g. /index?limit=10
    Form  url.Values // Parameters from the request body.

    Files map[string][]*multipart.FileHeader // Files uploaded in a multipart form
    // contains filtered or unexported fields
}

Params provides a unified view of the request params. Includes: - URL query string - Form values - File uploads

Warning: param maps other than Values may be nil if there were none.

func (*Params) Bind

func (p *Params) Bind(dest interface{}, name string)

Bind looks for the named parameter, converts it to the requested type, and writes it into "dest", which must be settable. If the value can not be parsed, "dest" is set to the zero value.