Documentation ¶
Index ¶
- type File
- type JSON
- type Jumper
- type Params
- type Request
- func (r *Request) Append(key string, val string)
- func (r *Request) Filled(keys ...string) (found bool)
- func (r *Request) Get(key string) interface{}
- func (r *Request) GetAll() map[string]interface{}
- func (r *Request) GetArray(key string) []interface{}
- func (r *Request) GetArrayUniquify(key string) []interface{}
- func (r *Request) GetBool(key string) bool
- func (r *Request) GetBoolPtr(key string) *bool
- func (r *Request) GetFile(key string) (*File, error)
- func (r *Request) GetFiles(key string) ([]*File, error)
- func (r *Request) GetFloat(key string) float32
- func (r *Request) GetFloat32Ptr(key string) *float32
- func (r *Request) GetFloat64(key string) float64
- func (r *Request) GetFloat64Ptr(key string) *float64
- func (r *Request) GetFragment() string
- func (r *Request) GetFullUrl() string
- func (r *Request) GetHost() string
- func (r *Request) GetInt(key string) int
- func (r *Request) GetInt32(key string) int32
- func (r *Request) GetInt32Ptr(key string) *int32
- func (r *Request) GetInt64(key string) int64
- func (r *Request) GetInt64Ptr(key string) *int64
- func (r *Request) GetIntPtr(key string) *int
- func (r *Request) GetJSON(key string) JSON
- func (r *Request) GetMap(key string) map[string]interface{}
- func (r *Request) GetOpaque() string
- func (r *Request) GetPassword() string
- func (r *Request) GetPath() string
- func (r *Request) GetPort() string
- func (r *Request) GetPtr(key string) *interface{}
- func (r *Request) GetRawPath() string
- func (r *Request) GetRawQuery() string
- func (r *Request) GetScheme() string
- func (r *Request) GetSegment(key string) string
- func (r *Request) GetSegmentInt(key string) int
- func (r *Request) GetSegmentInt32(key string) int32
- func (r *Request) GetSegmentInt64(key string) int64
- func (r *Request) GetSegmentUint(key string) uint
- func (r *Request) GetSegmentUint32(key string) uint32
- func (r *Request) GetSegmentUint64(key string) uint64
- func (r *Request) GetString(key string) string
- func (r *Request) GetStringPtr(key string) *string
- func (r *Request) GetStruct(obj interface{}) error
- func (r *Request) GetTime(key string) (*time.Time, error)
- func (r *Request) GetTimeNE(key string) *time.Time
- func (r *Request) GetUint(key string) uint
- func (r *Request) GetUint32(key string) uint32
- func (r *Request) GetUint32Ptr(key string) *uint32
- func (r *Request) GetUint64(key string) uint64
- func (r *Request) GetUint64Ptr(key string) *uint64
- func (r *Request) GetUintPtr(key string) *uint
- func (r *Request) GetUrl() string
- func (r *Request) GetUsername() string
- func (r *Request) Has(keys ...string) (found bool)
- func (r *Request) HasFile(keys ...string) (found bool)
- func (r *Request) HasHeader(keys ...string) (found bool)
- func (r *Request) HasUser() bool
- func (r *Request) Header(key string) string
- func (r *Request) HeaderFilled(keys ...string) (found bool)
- type Response
- func (r *Response) Reply(status int, number string, code string, message string, data ...interface{}) error
- func (r *Response) ReplyFailed(number string, code string, message string, data ...interface{}) error
- func (r *Response) ReplySuccess(number string, code string, message string, data ...interface{}) error
- func (r *Response) SetHttpCode(code int) *Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
func (*File) GetFileHeader ¶
func (f *File) GetFileHeader() *multipart.FileHeader
type Request ¶
type Request struct { Method string ClientIP string ClientPort string // contains filtered or unexported fields }
func PlugRequest ¶
func PlugRequest(r *http.Request, w http.ResponseWriter) *Request
func TouchRequest ¶
func TouchRequest(r *http.Request, w http.ResponseWriter) *Request
TouchRequest touch request with rewrite to reader, so handler can reuse the reader.
func (*Request) GetArrayUniquify ¶
func (*Request) GetBoolPtr ¶
func (*Request) GetFloat32Ptr ¶
func (*Request) GetFloat64 ¶
func (*Request) GetFloat64Ptr ¶
func (*Request) GetFragment ¶
func (*Request) GetFullUrl ¶
func (*Request) GetInt32Ptr ¶
func (*Request) GetInt64Ptr ¶
func (*Request) GetPassword ¶
func (*Request) GetRawPath ¶
func (*Request) GetRawQuery ¶
func (*Request) GetSegment ¶
func (*Request) GetSegmentInt ¶
func (*Request) GetSegmentInt32 ¶
func (*Request) GetSegmentInt64 ¶
func (*Request) GetSegmentUint ¶
func (*Request) GetSegmentUint32 ¶
func (*Request) GetSegmentUint64 ¶
func (*Request) GetStringPtr ¶
func (*Request) GetUint32Ptr ¶
func (*Request) GetUint64Ptr ¶
func (*Request) GetUintPtr ¶
func (*Request) GetUsername ¶
func (*Request) HeaderFilled ¶
type Response ¶
type Response struct { Status int `json:"status"` StatusNumber string `json:"status_number"` StatusCode string `json:"status_code"` StatusMessage string `json:"status_message"` Data interface{} `json:"data"` // contains filtered or unexported fields }
func PlugResponse ¶
func PlugResponse(w http.ResponseWriter) *Response
func (*Response) Reply ¶
func (r *Response) Reply(status int, number string, code string, message string, data ...interface{}) error
Reply 'data' arguments only used on index 0 */
func (*Response) ReplyFailed ¶
func (r *Response) ReplyFailed(number string, code string, message string, data ...interface{}) error
ReplyFailed 'data' arguments only used on index 0 */
func (*Response) ReplySuccess ¶
func (r *Response) ReplySuccess(number string, code string, message string, data ...interface{}) error
ReplySuccess 'data' arguments only used on index 0 */
func (*Response) SetHttpCode ¶
Click to show internal directories.
Click to hide internal directories.