Documentation
¶
Index ¶
- type Array
- type Body
- func (body *Body) Binary() ([]byte, string, error)
- func (body *Body) Files() ([]UploadFile, error)
- func (body *Body) Form(schema ...*pema.SchemaBuilder) (Dict, error)
- func (body *Body) JSON(schema ...*pema.SchemaBuilder) (Dict, error)
- func (body *Body) Kind() Kind
- func (body *Body) Text() (string, error)
- type Dict
- type Kind
- type Object
- type Request
- type RequestBag
- func (rb *RequestBag) Get(key string) (string, error)
- func (rb *RequestBag) Has(key string) bool
- func (rb *RequestBag) Parse(schema *pema.SchemaBuilder, coerce ...bool) (Dict, error)
- func (rb *RequestBag) Size() int
- func (rb *RequestBag) ToJSON() map[string]string
- func (rb *RequestBag) Try(key string) string
- type URL
- type UploadFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Body ¶
type Body struct {
// contains filtered or unexported fields
}
func NewBodyFromJS ¶
func (*Body) Files ¶
func (body *Body) Files() ([]UploadFile, error)
Files -> read filesSync() array [{field,name,type,size,bytes:Uint8Array}]
func (*Body) Form ¶
func (body *Body) Form(schema ...*pema.SchemaBuilder) (Dict, error)
returns parsed form, optionally validated with schema
type Request ¶
type Request struct {
Url URL
Body *Body
Path *RequestBag
Query *RequestBag
Headers *RequestBag
Cookies *RequestBag
}
type RequestBag ¶
type RequestBag struct {
// contains filtered or unexported fields
}
func NewRequestBag ¶
func NewRequestBag(data Dict, name string) *RequestBag
func (*RequestBag) Has ¶
func (rb *RequestBag) Has(key string) bool
func (*RequestBag) Parse ¶
func (rb *RequestBag) Parse(schema *pema.SchemaBuilder, coerce ...bool) (Dict, error)
func (*RequestBag) Size ¶
func (rb *RequestBag) Size() int
func (*RequestBag) ToJSON ¶
func (rb *RequestBag) ToJSON() map[string]string
func (*RequestBag) Try ¶
func (rb *RequestBag) Try(key string) string
Click to show internal directories.
Click to hide internal directories.