Documentation ¶
Index ¶
- Constants
- func FormValue(r *http.Request, key string) (string, error)
- func FormValueBool(r *http.Request, key string) (bool, error)
- func FormValueFloat32(r *http.Request, key string) (float32, error)
- func FormValueInt16(r *http.Request, key string, base int) (int16, error)
- func FormValueInt32(r *http.Request, key string, base int) (int32, error)
- type Deleter
- type Environment
- type Getter
- type Handler
- type Poster
- type Putter
- type Resource
- func (o *Resource) Allowed(r *http.Request, method string) bool
- func (_ *Resource) BadRequest(w http.ResponseWriter, s string, args ...interface{})
- func (_ Resource) BestMime(r *http.Request, supported ...string) (string, error)
- func (_ *Resource) EnvValue(r *http.Request, key string) string
- func (_ *Resource) EnvValueInt(r *http.Request, key string) (int, error)
- func (_ *Resource) Environment(r *http.Request) (map[string]string, *http.Request)
- func (o *Resource) FormValue(r *http.Request, key string) (string, error)
- func (o *Resource) FormValueBool(r *http.Request, key string) (bool, error)
- func (o *Resource) FormValueFloat32(r *http.Request, key string) (float32, error)
- func (o *Resource) FormValueInt32(r *http.Request, key string, base int) (int32, error)
- func (o *Resource) Handle(path string, h http.Handler)
- func (o *Resource) HandleFunc(path string, f http.HandlerFunc)
- func (o *Resource) NotAllowed(w http.ResponseWriter, r *http.Request, allow string)
- func (o *Resource) NotFound(w http.ResponseWriter, r *http.Request)
- func (_ *Resource) ParseForm(r *http.Request) error
- func (o *Resource) RaiseNotFound(w http.ResponseWriter, _ *http.Request)
- func (o *Resource) ServeHTTP(p Handler, w http.ResponseWriter, r *http.Request)
- func (o *Resource) SetFallback(h http.HandlerFunc)
- func (o *Resource) WriteJSON(w http.ResponseWriter, prefix string, indent string, d interface{}) error
Constants ¶
View Source
const DispatcherEnv = "X-Dispatcher-Env"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Deleter ¶
type Deleter interface {
Delete(w http.ResponseWriter, r *http.Request)
}
DELETE {resource}
type Environment ¶
environment table
func GetEnvironment ¶
func GetEnvironment(r *http.Request) (Environment, *http.Request)
func (Environment) Get ¶
func (env Environment) Get(key string) string
func (Environment) Set ¶
func (env Environment) Set(key, value string)
func (Environment) SetInt ¶
func (env Environment) SetInt(key string, value int)
type Poster ¶
type Poster interface {
Post(w http.ResponseWriter, r *http.Request)
}
POST {resource}
type Resource ¶
type Resource struct {
// contains filtered or unexported fields
}
func (*Resource) BadRequest ¶
func (_ *Resource) BadRequest(w http.ResponseWriter, s string, args ...interface{})
func (*Resource) EnvValueInt ¶
func (*Resource) Environment ¶
static convenience methods
func (*Resource) FormValueBool ¶
func (*Resource) FormValueFloat32 ¶
func (*Resource) FormValueInt32 ¶
func (*Resource) HandleFunc ¶
func (o *Resource) HandleFunc(path string, f http.HandlerFunc)
func (*Resource) NotAllowed ¶
func (*Resource) RaiseNotFound ¶
func (o *Resource) RaiseNotFound(w http.ResponseWriter, _ *http.Request)
Errors
func (*Resource) SetFallback ¶
func (o *Resource) SetFallback(h http.HandlerFunc)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.