Documentation
¶
Index ¶
- func CreateWebApp(rules []RouteRule) webApp
- func CreateWebAppWithFuncmap(rules []RouteRule, funcMap template.FuncMap) webApp
- func Seq(begin int, total int, step int) (res []int)
- type Consumes
- type Ctx
- func (c *Ctx) AddHeader(key string, value string)
- func (c *Ctx) BadRequest(reason string, bodies ...interface{}) badRequest
- func (c *Ctx) ClientGone() clientGone
- func (c *Ctx) Cookie(name string) (value string)
- func (c *Ctx) Forbidden(bodies ...interface{}) forbidden
- func (c *Ctx) Found(uri string) found
- func (c *Ctx) HasParam(key string) bool
- func (c *Ctx) Header(key string) string
- func (c *Ctx) InternalError(e error) internalError
- func (c *Ctx) MethodNotAllowed(allowed []string) methodNotAllowed
- func (c *Ctx) MovedPermanently(uri string) movedPermanently
- func (c *Ctx) NoContent() noContent
- func (c *Ctx) NotAcceptable(provided MediaTypes) notAcceptable
- func (c *Ctx) NotFound(bodies ...interface{}) notFound
- func (c *Ctx) NotImplemented(bodies ...interface{}) notImplemented
- func (c *Ctx) Param(key string) string
- func (c *Ctx) ParamArray(key string) []string
- func (c *Ctx) PathParam(key string) string
- func (c *Ctx) SeeOther(uri string) seeOther
- func (c *Ctx) ServiceUnavailable(seconds int, bodies ...interface{}) serviceUnavailable
- func (c *Ctx) SetCookie(cookie *http.Cookie)
- func (c *Ctx) TempRedirect(uri string) tempRedirect
- func (c *Ctx) Unauthorized(wwwAuthHeader string, bodies ...interface{}) unauthorized
- func (c *Ctx) UnsupportedMediaType(bodies ...interface{}) unsupportedMediaType
- type EmptyLangProvider
- type EmptyUserProvider
- type LangProvider
- type MediaType
- type MediaTypes
- type Method
- type PatternMapping
- type Perm
- type Provides
- type Roles
- type RouteRule
- type UserProvider
- type Views
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateWebApp ¶
func CreateWebApp(rules []RouteRule) webApp
func CreateWebAppWithFuncmap ¶
Types ¶
type Ctx ¶
type Ctx struct { Username string Roles Roles Request *http.Request ResponseWriter http.ResponseWriter ChosenType MediaType ChosenLang string ContentType MediaType // contains filtered or unexported fields }
func (*Ctx) BadRequest ¶
func (*Ctx) ClientGone ¶
func (c *Ctx) ClientGone() clientGone
func (*Ctx) InternalError ¶
func (*Ctx) MethodNotAllowed ¶
func (*Ctx) MovedPermanently ¶
func (*Ctx) NotAcceptable ¶
func (c *Ctx) NotAcceptable(provided MediaTypes) notAcceptable
func (*Ctx) NotImplemented ¶
func (c *Ctx) NotImplemented(bodies ...interface{}) notImplemented
func (*Ctx) ParamArray ¶
func (*Ctx) ServiceUnavailable ¶
func (*Ctx) TempRedirect ¶
func (*Ctx) Unauthorized ¶
func (*Ctx) UnsupportedMediaType ¶
func (c *Ctx) UnsupportedMediaType(bodies ...interface{}) unsupportedMediaType
type EmptyLangProvider ¶
type EmptyLangProvider struct { }
func (*EmptyLangProvider) Select ¶
func (c *EmptyLangProvider) Select(ctx *Ctx) string
type EmptyUserProvider ¶
type EmptyUserProvider struct { }
func (EmptyUserProvider) AuthHeader ¶
func (c EmptyUserProvider) AuthHeader(r *http.Request) string
func (EmptyUserProvider) GetUserAndRoles ¶
func (c EmptyUserProvider) GetUserAndRoles(r *http.Request) (string, []string)
type LangProvider ¶
type MediaTypes ¶
type MediaTypes []MediaType
type PatternMapping ¶
type UserProvider ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.