Documentation
¶
Index ¶
- func GetBody(r *http.Request) []byte
- type Params
- type Req
- func (r *Req) GetCookies(name string) value.Value
- func (r *Req) GetFiles(name string) value.Value
- func (r *Req) GetForm(name string) value.Value
- func (r *Req) GetHeader(name string) value.Value
- func (r *Req) GetJson(path string) value.Value
- func (r *Req) GetQuery(name string) value.Value
- func (r *Req) LoadJsonBody() *Req
- type Res
- func (r *Res) Code(code int) *Res
- func (r *Res) Error(err error, message string, ErrorCode ...int) bool
- func (r *Res) Header(key string, value string) *Res
- func (r *Res) ValidationError(v *Valid) bool
- func (r *Res) Write(body []byte)
- func (r *Res) WriteDebug(body interface{})
- func (r *Res) WriteJson(body interface{}, indent bool)
- func (r *Res) WriteTemplate(name string, context ...interface{})
- type Rvr
- type Valid
- func (v *Valid) AddError(message ...string) *Valid
- func (v *Valid) And(c bool) *Valid
- func (v *Valid) AndNot(c bool) *Valid
- func (v *Valid) GetErrors() [][]string
- func (v *Valid) If(c bool) *Valid
- func (v *Valid) Not(c bool) *Valid
- func (v *Valid) Or(c bool) *Valid
- func (v *Valid) OrNot(c bool) *Valid
- func (v *Valid) Pass() bool
- func (v *Valid) Valid() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Req ¶
type Res ¶
type Res struct {
// contains filtered or unexported fields
}
type Rvr ¶
type Rvr struct { Debug bool ResponseTemplates func(string, ...interface{}) []byte // contains filtered or unexported fields }
func (*Rvr) Init ¶
func (*Rvr) Response ¶
func (rvr *Rvr) Response(w http.ResponseWriter) *Res
type Valid ¶
type Valid struct { V defaultValidators // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.