Documentation ¶
Index ¶
- type FileServer
- type HTMLer
- type InputScanner
- type InputSource
- type InputValue
- func (i InputValue) Each(h JsonHandler) error
- func (i InputValue) GetBool() (bool, error)
- func (i InputValue) GetFloat() (float64, error)
- func (i InputValue) GetInt() (int64, error)
- func (i InputValue) GetString() string
- func (i InputValue) GetUInt() (uint64, error)
- func (i InputValue) GetValue(key string) (InputValue, jsonparser.ValueType, error)
- func (i InputValue) Unmarshal(v interface{}) error
- type JsonHandler
- type RequestContract
- type ResponseContract
- type TemplateResponseContract
- type UploadFile
- type WithContainer
- type WithContentType
- type WithHeaders
- type WithPathInfo
- type WithRequestCookies
- type WithResponseCode
- type WithResponseCookies
- type WithRouteName
- type WithStatusCode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileServer ¶
type InputScanner ¶ added in v1.0.0
type InputSource ¶
type InputSource interface { Get(key string) []byte File(key string) (UploadFile, error) GetValue(key ...string) InputValue }
InputSource is general input source
type InputValue ¶
type InputValue []byte
func (InputValue) Each ¶
func (i InputValue) Each(h JsonHandler) error
func (InputValue) GetBool ¶
func (i InputValue) GetBool() (bool, error)
func (InputValue) GetFloat ¶
func (i InputValue) GetFloat() (float64, error)
func (InputValue) GetInt ¶
func (i InputValue) GetInt() (int64, error)
func (InputValue) GetString ¶
func (i InputValue) GetString() string
func (InputValue) GetUInt ¶
func (i InputValue) GetUInt() (uint64, error)
func (InputValue) GetValue ¶
func (i InputValue) GetValue(key string) (InputValue, jsonparser.ValueType, error)
func (InputValue) Unmarshal ¶
func (i InputValue) Unmarshal(v interface{}) error
type JsonHandler ¶
type JsonHandler func(value InputValue, dataType jsonparser.ValueType)
type RequestContract ¶
type RequestContract interface { InputSource WithContainer WithRouteName WithPathInfo Context() context.Context Params() map[string][]byte Param(key string) string ParamBytes(key string) []byte ParamInt64(key string) (int64, error) ParamUint64(key string) (uint64, error) ParamInt(key string) (int, error) SetParams(params map[string][]byte) SetParamsSlice(paramsSlice [][]byte) ParamsSlice() [][]byte Accepts() []byte ExceptsJson() bool RequestWithJson() bool IsXmlHttpRequest() bool GetMethod() string GetInt64(key string) (int64, error) GetUint64(key string) (uint64, error) GetString(key string) string GetInt(key string) (int, error) GetClientIp() string RemoteAddr() string GetContent() []byte Unmarshal(to interface{}) error GetSignature() []byte Header(key string) []byte HeaderString(key string) string SetHeader(key string, value []byte) RequestContract SetHeaderString(key, value string) RequestContract Authorization() []byte BearerToken() ([]byte, error) ToString() string }
RequestContract is interface of http request
type ResponseContract ¶
type ResponseContract interface { Content() []byte Headers() map[string]string SetHeader(key string, value string) ResponseContract SetHeaders(headers map[string]string) ResponseContract Header(header string) string StatusCode() int SetStatusCode(code int) ResponseContract Handled() bool }
type UploadFile ¶
type WithContainer ¶ added in v0.0.10
type WithContentType ¶ added in v0.0.8
type WithContentType interface {
ContentType() string
}
type WithHeaders ¶
type WithPathInfo ¶ added in v1.1.2
type WithRequestCookies ¶ added in v1.1.3
type WithResponseCode ¶ added in v0.0.17
type WithResponseCode interface {
ResponseCode() int
}
type WithResponseCookies ¶ added in v1.1.3
type WithRouteName ¶ added in v1.0.0
type WithStatusCode ¶
type WithStatusCode interface {
StatusCode() int
}
Click to show internal directories.
Click to hide internal directories.