Documentation
¶
Index ¶
- func MapFormToStruct(r *http.Request, dest interface{}) error
- type MappingError
- type RequestContext
- type URI
- func (u *URI) ExtractPathVariables(pattern string)
- func (u *URI) GetAllPathVariables() map[string]string
- func (u *URI) GetPath() string
- func (u *URI) GetPathVariable(key string) string
- func (u *URI) GetQuery(key string) string
- func (u *URI) HasQuery(key string) bool
- func (u *URI) SetPathVariable(key, value string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MapFormToStruct ¶
Types ¶
type MappingError ¶
type MappingError struct {
// contains filtered or unexported fields
}
func (*MappingError) Error ¶
func (e *MappingError) Error() string
type RequestContext ¶ added in v0.1.8
type RequestContext interface {
GetRequest() *http.Request
GetWriter() http.ResponseWriter
GetDI() serverdi.Context
GetURI() *URI
BindJSON(dest interface{}) error
BindForm(dest interface{}) error
JSON(status int, data interface{})
String(status int, text string)
Status(status int)
Set(key string, value interface{})
Get(key string) (interface{}, bool)
}
func NewContext ¶ added in v0.1.8
func NewContext(w http.ResponseWriter, r *http.Request, di serverdi.Context) RequestContext
type URI ¶ added in v0.1.8
func (*URI) ExtractPathVariables ¶ added in v0.1.8
func (*URI) GetAllPathVariables ¶ added in v0.1.8
func (*URI) GetPathVariable ¶ added in v0.1.8
func (*URI) SetPathVariable ¶ added in v0.1.8
Click to show internal directories.
Click to hide internal directories.