Documentation ¶
Index ¶
- type Context
- func (_m *Context) Context() context.Context
- func (_m *Context) Deadline() (time.Time, bool)
- func (_m *Context) Done() <-chan struct{}
- func (_m *Context) Err() error
- func (_m *Context) Request() http.Request
- func (_m *Context) Response() http.Response
- func (_m *Context) Value(key interface{}) interface{}
- func (_m *Context) WithValue(key string, value interface{})
- type RateLimiter
- type Request
- func (_m *Request) AbortWithStatus(code int)
- func (_m *Request) AbortWithStatusJson(code int, jsonObj interface{})
- func (_m *Request) Bind(obj interface{}) error
- func (_m *Request) File(name string) (filesystem.File, error)
- func (_m *Request) Form(key string, defaultValue ...string) string
- func (_m *Request) FullUrl() string
- func (_m *Request) Header(key string, defaultValue ...string) string
- func (_m *Request) Headers() nethttp.Header
- func (_m *Request) Input(key string, defaultValue ...string) string
- func (_m *Request) InputBool(key string, defaultValue ...bool) bool
- func (_m *Request) InputInt(key string, defaultValue ...int) int
- func (_m *Request) InputInt64(key string, defaultValue ...int64) int64
- func (_m *Request) Ip() string
- func (_m *Request) Json(key string, defaultValue ...string) string
- func (_m *Request) Method() string
- func (_m *Request) Next()
- func (_m *Request) Origin() *nethttp.Request
- func (_m *Request) Path() string
- func (_m *Request) Query(key string, defaultValue ...string) string
- func (_m *Request) QueryArray(key string) []string
- func (_m *Request) QueryBool(key string, defaultValue ...bool) bool
- func (_m *Request) QueryInt(key string, defaultValue ...int) int
- func (_m *Request) QueryInt64(key string, defaultValue ...int64) int64
- func (_m *Request) QueryMap(key string) map[string]string
- func (_m *Request) Route(key string) string
- func (_m *Request) RouteInt(key string) int
- func (_m *Request) RouteInt64(key string) int64
- func (_m *Request) Url() string
- func (_m *Request) Validate(rules map[string]string, options ...validation.Option) (validation.Validator, error)
- func (_m *Request) ValidateRequest(request http.FormRequest) (validation.Errors, error)
- type Response
- func (_m *Response) Data(code int, contentType string, data []byte)
- func (_m *Response) Download(filepath string, filename string)
- func (_m *Response) File(filepath string)
- func (_m *Response) Header(key string, value string) http.Response
- func (_m *Response) Json(code int, obj interface{})
- func (_m *Response) Origin() http.ResponseOrigin
- func (_m *Response) Redirect(code int, location string)
- func (_m *Response) Status(code int) http.ResponseStatus
- func (_m *Response) String(code int, format string, values ...interface{})
- func (_m *Response) Success() http.ResponseSuccess
- func (_m *Response) Writer() nethttp.ResponseWriter
- type ResponseOrigin
- type ResponseStatus
- type ResponseSuccess
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
Context is an autogenerated mock type for the Context type
func NewContext ¶
func NewContext(t mockConstructorTestingTNewContext) *Context
NewContext creates a new instance of Context. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*Context) Done ¶
func (_m *Context) Done() <-chan struct{}
Done provides a mock function with given fields:
type RateLimiter ¶ added in v1.12.0
RateLimiter is an autogenerated mock type for the RateLimiter type
func NewRateLimiter ¶ added in v1.12.0
func NewRateLimiter(t mockConstructorTestingTNewRateLimiter) *RateLimiter
NewRateLimiter creates a new instance of RateLimiter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*RateLimiter) For ¶ added in v1.12.0
For provides a mock function with given fields: name, callback
func (*RateLimiter) ForWithLimits ¶ added in v1.12.0
ForWithLimits provides a mock function with given fields: name, callback
type Request ¶
Request is an autogenerated mock type for the Request type
func NewRequest ¶
func NewRequest(t mockConstructorTestingTNewRequest) *Request
NewRequest creates a new instance of Request. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*Request) AbortWithStatus ¶
AbortWithStatus provides a mock function with given fields: code
func (*Request) AbortWithStatusJson ¶
AbortWithStatusJson provides a mock function with given fields: code, jsonObj
func (*Request) File ¶
func (_m *Request) File(name string) (filesystem.File, error)
File provides a mock function with given fields: name
func (*Request) InputBool ¶ added in v1.11.0
InputBool provides a mock function with given fields: key, defaultValue
func (*Request) InputInt ¶ added in v1.11.0
InputInt provides a mock function with given fields: key, defaultValue
func (*Request) InputInt64 ¶ added in v1.11.0
InputInt64 provides a mock function with given fields: key, defaultValue
func (*Request) Json ¶ added in v1.11.0
Json provides a mock function with given fields: key, defaultValue
func (*Request) QueryArray ¶ added in v1.8.0
QueryArray provides a mock function with given fields: key
func (*Request) QueryBool ¶ added in v1.11.0
QueryBool provides a mock function with given fields: key, defaultValue
func (*Request) QueryInt ¶ added in v1.11.0
QueryInt provides a mock function with given fields: key, defaultValue
func (*Request) QueryInt64 ¶ added in v1.11.0
QueryInt64 provides a mock function with given fields: key, defaultValue
func (*Request) RouteInt ¶ added in v1.11.0
RouteInt provides a mock function with given fields: key
func (*Request) RouteInt64 ¶ added in v1.11.0
RouteInt64 provides a mock function with given fields: key
func (*Request) Validate ¶ added in v1.7.0
func (_m *Request) Validate(rules map[string]string, options ...validation.Option) (validation.Validator, error)
Validate provides a mock function with given fields: rules, options
func (*Request) ValidateRequest ¶ added in v1.7.0
func (_m *Request) ValidateRequest(request http.FormRequest) (validation.Errors, error)
ValidateRequest provides a mock function with given fields: request
type Response ¶
Response is an autogenerated mock type for the Response type
func NewResponse ¶
NewResponse creates a new instance of Response. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*Response) Data ¶ added in v1.9.0
Data provides a mock function with given fields: code, contentType, data
func (*Response) Origin ¶ added in v1.8.0
func (_m *Response) Origin() http.ResponseOrigin
Origin provides a mock function with given fields:
func (*Response) Redirect ¶ added in v1.9.0
Redirect provides a mock function with given fields: code, location
func (*Response) Status ¶ added in v1.12.5
func (_m *Response) Status(code int) http.ResponseStatus
Status provides a mock function with given fields: code
func (*Response) Success ¶
func (_m *Response) Success() http.ResponseSuccess
Success provides a mock function with given fields:
func (*Response) Writer ¶ added in v1.9.0
func (_m *Response) Writer() nethttp.ResponseWriter
Writer provides a mock function with given fields:
type ResponseOrigin ¶ added in v1.8.0
ResponseOrigin is an autogenerated mock type for the ResponseOrigin type
func NewResponseOrigin ¶ added in v1.8.0
func NewResponseOrigin(t interface { mock.TestingT Cleanup(func()) }) *ResponseOrigin
NewResponseOrigin creates a new instance of ResponseOrigin. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*ResponseOrigin) Body ¶ added in v1.8.0
func (_m *ResponseOrigin) Body() *bytes.Buffer
Body provides a mock function with given fields:
func (*ResponseOrigin) Header ¶ added in v1.8.0
func (_m *ResponseOrigin) Header() nethttp.Header
Header provides a mock function with given fields:
func (*ResponseOrigin) Size ¶ added in v1.8.0
func (_m *ResponseOrigin) Size() int
Size provides a mock function with given fields:
func (*ResponseOrigin) Status ¶ added in v1.8.0
func (_m *ResponseOrigin) Status() int
Status provides a mock function with given fields:
type ResponseStatus ¶ added in v1.12.5
ResponseStatus is an autogenerated mock type for the ResponseStatus type
func NewResponseStatus ¶ added in v1.12.5
func NewResponseStatus(t interface { mock.TestingT Cleanup(func()) }) *ResponseStatus
NewResponseStatus creates a new instance of ResponseStatus. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*ResponseStatus) Data ¶ added in v1.12.5
func (_m *ResponseStatus) Data(contentType string, data []byte)
Data provides a mock function with given fields: contentType, data
func (*ResponseStatus) Json ¶ added in v1.12.5
func (_m *ResponseStatus) Json(obj interface{})
Json provides a mock function with given fields: obj
func (*ResponseStatus) String ¶ added in v1.12.5
func (_m *ResponseStatus) String(format string, values ...interface{})
String provides a mock function with given fields: format, values
type ResponseSuccess ¶
ResponseSuccess is an autogenerated mock type for the ResponseSuccess type
func NewResponseSuccess ¶
func NewResponseSuccess(t interface { mock.TestingT Cleanup(func()) }) *ResponseSuccess
NewResponseSuccess creates a new instance of ResponseSuccess. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*ResponseSuccess) Data ¶ added in v1.9.0
func (_m *ResponseSuccess) Data(contentType string, data []byte)
Data provides a mock function with given fields: contentType, data
func (*ResponseSuccess) Json ¶
func (_m *ResponseSuccess) Json(obj interface{})
Json provides a mock function with given fields: obj
func (*ResponseSuccess) String ¶
func (_m *ResponseSuccess) String(format string, values ...interface{})
String provides a mock function with given fields: format, values