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.ContextRequest
- func (_m *Context) Response() http.ContextResponse
- func (_m *Context) Value(key interface{}) interface{}
- func (_m *Context) WithValue(key string, value interface{})
- type ContextRequest
- func (_m *ContextRequest) AbortWithStatus(code int)
- func (_m *ContextRequest) AbortWithStatusJson(code int, jsonObj interface{})
- func (_m *ContextRequest) All() map[string]interface{}
- func (_m *ContextRequest) Bind(obj interface{}) error
- func (_m *ContextRequest) File(name string) (filesystem.File, error)
- func (_m *ContextRequest) FullUrl() string
- func (_m *ContextRequest) Header(key string, defaultValue ...string) string
- func (_m *ContextRequest) Headers() nethttp.Header
- func (_m *ContextRequest) Host() string
- func (_m *ContextRequest) Input(key string, defaultValue ...string) string
- func (_m *ContextRequest) InputArray(key string, defaultValue ...[]string) []string
- func (_m *ContextRequest) InputBool(key string, defaultValue ...bool) bool
- func (_m *ContextRequest) InputInt(key string, defaultValue ...int) int
- func (_m *ContextRequest) InputInt64(key string, defaultValue ...int64) int64
- func (_m *ContextRequest) InputMap(key string, defaultValue ...map[string]string) map[string]string
- func (_m *ContextRequest) Ip() string
- func (_m *ContextRequest) Method() string
- func (_m *ContextRequest) Next()
- func (_m *ContextRequest) Origin() *nethttp.Request
- func (_m *ContextRequest) Path() string
- func (_m *ContextRequest) Queries() map[string]string
- func (_m *ContextRequest) Query(key string, defaultValue ...string) string
- func (_m *ContextRequest) QueryArray(key string) []string
- func (_m *ContextRequest) QueryBool(key string, defaultValue ...bool) bool
- func (_m *ContextRequest) QueryInt(key string, defaultValue ...int) int
- func (_m *ContextRequest) QueryInt64(key string, defaultValue ...int64) int64
- func (_m *ContextRequest) QueryMap(key string) map[string]string
- func (_m *ContextRequest) Route(key string) string
- func (_m *ContextRequest) RouteInt(key string) int
- func (_m *ContextRequest) RouteInt64(key string) int64
- func (_m *ContextRequest) Url() string
- func (_m *ContextRequest) Validate(rules map[string]string, options ...validation.Option) (validation.Validator, error)
- func (_m *ContextRequest) ValidateRequest(request http.FormRequest) (validation.Errors, error)
- type ContextResponse
- func (_m *ContextResponse) Data(code int, contentType string, data []byte) http.Response
- func (_m *ContextResponse) Download(filepath string, filename string) http.Response
- func (_m *ContextResponse) File(filepath string) http.Response
- func (_m *ContextResponse) Flush()
- func (_m *ContextResponse) Header(key string, value string) http.ContextResponse
- func (_m *ContextResponse) Json(code int, obj interface{}) http.Response
- func (_m *ContextResponse) Origin() http.ResponseOrigin
- func (_m *ContextResponse) Redirect(code int, location string) http.Response
- func (_m *ContextResponse) Status(code int) http.ResponseStatus
- func (_m *ContextResponse) String(code int, format string, values ...interface{}) http.Response
- func (_m *ContextResponse) Success() http.ResponseSuccess
- func (_m *ContextResponse) View() http.ResponseView
- func (_m *ContextResponse) Writer() nethttp.ResponseWriter
- type RateLimiter
- type Response
- type ResponseOrigin
- type ResponseStatus
- type ResponseSuccess
- type View
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:
func (*Context) Request ¶
func (_m *Context) Request() http.ContextRequest
Request provides a mock function with given fields:
func (*Context) Response ¶
func (_m *Context) Response() http.ContextResponse
Response provides a mock function with given fields:
type ContextRequest ¶ added in v1.13.1
ContextRequest is an autogenerated mock type for the ContextRequest type
func NewContextRequest ¶ added in v1.13.1
func NewContextRequest(t interface { mock.TestingT Cleanup(func()) }) *ContextRequest
NewContextRequest creates a new instance of ContextRequest. 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 (*ContextRequest) AbortWithStatus ¶ added in v1.13.1
func (_m *ContextRequest) AbortWithStatus(code int)
AbortWithStatus provides a mock function with given fields: code
func (*ContextRequest) AbortWithStatusJson ¶ added in v1.13.1
func (_m *ContextRequest) AbortWithStatusJson(code int, jsonObj interface{})
AbortWithStatusJson provides a mock function with given fields: code, jsonObj
func (*ContextRequest) All ¶ added in v1.13.1
func (_m *ContextRequest) All() map[string]interface{}
All provides a mock function with given fields:
func (*ContextRequest) Bind ¶ added in v1.13.1
func (_m *ContextRequest) Bind(obj interface{}) error
Bind provides a mock function with given fields: obj
func (*ContextRequest) File ¶ added in v1.13.1
func (_m *ContextRequest) File(name string) (filesystem.File, error)
File provides a mock function with given fields: name
func (*ContextRequest) FullUrl ¶ added in v1.13.1
func (_m *ContextRequest) FullUrl() string
FullUrl provides a mock function with given fields:
func (*ContextRequest) Header ¶ added in v1.13.1
func (_m *ContextRequest) Header(key string, defaultValue ...string) string
Header provides a mock function with given fields: key, defaultValue
func (*ContextRequest) Headers ¶ added in v1.13.1
func (_m *ContextRequest) Headers() nethttp.Header
Headers provides a mock function with given fields:
func (*ContextRequest) Host ¶ added in v1.13.1
func (_m *ContextRequest) Host() string
Host provides a mock function with given fields:
func (*ContextRequest) Input ¶ added in v1.13.1
func (_m *ContextRequest) Input(key string, defaultValue ...string) string
Input provides a mock function with given fields: key, defaultValue
func (*ContextRequest) InputArray ¶ added in v1.13.1
func (_m *ContextRequest) InputArray(key string, defaultValue ...[]string) []string
InputArray provides a mock function with given fields: key, defaultValue
func (*ContextRequest) InputBool ¶ added in v1.13.1
func (_m *ContextRequest) InputBool(key string, defaultValue ...bool) bool
InputBool provides a mock function with given fields: key, defaultValue
func (*ContextRequest) InputInt ¶ added in v1.13.1
func (_m *ContextRequest) InputInt(key string, defaultValue ...int) int
InputInt provides a mock function with given fields: key, defaultValue
func (*ContextRequest) InputInt64 ¶ added in v1.13.1
func (_m *ContextRequest) InputInt64(key string, defaultValue ...int64) int64
InputInt64 provides a mock function with given fields: key, defaultValue
func (*ContextRequest) InputMap ¶ added in v1.13.1
InputMap provides a mock function with given fields: key, defaultValue
func (*ContextRequest) Ip ¶ added in v1.13.1
func (_m *ContextRequest) Ip() string
Ip provides a mock function with given fields:
func (*ContextRequest) Method ¶ added in v1.13.1
func (_m *ContextRequest) Method() string
Method provides a mock function with given fields:
func (*ContextRequest) Next ¶ added in v1.13.1
func (_m *ContextRequest) Next()
Next provides a mock function with given fields:
func (*ContextRequest) Origin ¶ added in v1.13.1
func (_m *ContextRequest) Origin() *nethttp.Request
Origin provides a mock function with given fields:
func (*ContextRequest) Path ¶ added in v1.13.1
func (_m *ContextRequest) Path() string
Path provides a mock function with given fields:
func (*ContextRequest) Queries ¶ added in v1.13.1
func (_m *ContextRequest) Queries() map[string]string
Queries provides a mock function with given fields:
func (*ContextRequest) Query ¶ added in v1.13.1
func (_m *ContextRequest) Query(key string, defaultValue ...string) string
Query provides a mock function with given fields: key, defaultValue
func (*ContextRequest) QueryArray ¶ added in v1.13.1
func (_m *ContextRequest) QueryArray(key string) []string
QueryArray provides a mock function with given fields: key
func (*ContextRequest) QueryBool ¶ added in v1.13.1
func (_m *ContextRequest) QueryBool(key string, defaultValue ...bool) bool
QueryBool provides a mock function with given fields: key, defaultValue
func (*ContextRequest) QueryInt ¶ added in v1.13.1
func (_m *ContextRequest) QueryInt(key string, defaultValue ...int) int
QueryInt provides a mock function with given fields: key, defaultValue
func (*ContextRequest) QueryInt64 ¶ added in v1.13.1
func (_m *ContextRequest) QueryInt64(key string, defaultValue ...int64) int64
QueryInt64 provides a mock function with given fields: key, defaultValue
func (*ContextRequest) QueryMap ¶ added in v1.13.1
func (_m *ContextRequest) QueryMap(key string) map[string]string
QueryMap provides a mock function with given fields: key
func (*ContextRequest) Route ¶ added in v1.13.1
func (_m *ContextRequest) Route(key string) string
Route provides a mock function with given fields: key
func (*ContextRequest) RouteInt ¶ added in v1.13.1
func (_m *ContextRequest) RouteInt(key string) int
RouteInt provides a mock function with given fields: key
func (*ContextRequest) RouteInt64 ¶ added in v1.13.1
func (_m *ContextRequest) RouteInt64(key string) int64
RouteInt64 provides a mock function with given fields: key
func (*ContextRequest) Url ¶ added in v1.13.1
func (_m *ContextRequest) Url() string
Url provides a mock function with given fields:
func (*ContextRequest) Validate ¶ added in v1.13.1
func (_m *ContextRequest) Validate(rules map[string]string, options ...validation.Option) (validation.Validator, error)
Validate provides a mock function with given fields: rules, options
func (*ContextRequest) ValidateRequest ¶ added in v1.13.1
func (_m *ContextRequest) ValidateRequest(request http.FormRequest) (validation.Errors, error)
ValidateRequest provides a mock function with given fields: request
type ContextResponse ¶ added in v1.13.1
ContextResponse is an autogenerated mock type for the ContextResponse type
func NewContextResponse ¶ added in v1.13.1
func NewContextResponse(t interface { mock.TestingT Cleanup(func()) }) *ContextResponse
NewContextResponse creates a new instance of ContextResponse. 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 (*ContextResponse) Data ¶ added in v1.13.1
Data provides a mock function with given fields: code, contentType, data
func (*ContextResponse) Download ¶ added in v1.13.1
func (_m *ContextResponse) Download(filepath string, filename string) http.Response
Download provides a mock function with given fields: filepath, filename
func (*ContextResponse) File ¶ added in v1.13.1
func (_m *ContextResponse) File(filepath string) http.Response
File provides a mock function with given fields: filepath
func (*ContextResponse) Flush ¶ added in v1.13.1
func (_m *ContextResponse) Flush()
Flush provides a mock function with given fields:
func (*ContextResponse) Header ¶ added in v1.13.1
func (_m *ContextResponse) Header(key string, value string) http.ContextResponse
Header provides a mock function with given fields: key, value
func (*ContextResponse) Json ¶ added in v1.13.1
func (_m *ContextResponse) Json(code int, obj interface{}) http.Response
Json provides a mock function with given fields: code, obj
func (*ContextResponse) Origin ¶ added in v1.13.1
func (_m *ContextResponse) Origin() http.ResponseOrigin
Origin provides a mock function with given fields:
func (*ContextResponse) Redirect ¶ added in v1.13.1
func (_m *ContextResponse) Redirect(code int, location string) http.Response
Redirect provides a mock function with given fields: code, location
func (*ContextResponse) Status ¶ added in v1.13.1
func (_m *ContextResponse) Status(code int) http.ResponseStatus
Status provides a mock function with given fields: code
func (*ContextResponse) String ¶ added in v1.13.1
func (_m *ContextResponse) String(code int, format string, values ...interface{}) http.Response
String provides a mock function with given fields: code, format, values
func (*ContextResponse) Success ¶ added in v1.13.1
func (_m *ContextResponse) Success() http.ResponseSuccess
Success provides a mock function with given fields:
func (*ContextResponse) View ¶ added in v1.13.1
func (_m *ContextResponse) View() http.ResponseView
View provides a mock function with given fields:
func (*ContextResponse) Writer ¶ added in v1.13.1
func (_m *ContextResponse) Writer() nethttp.ResponseWriter
Writer 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 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.
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) http.Response
Data provides a mock function with given fields: contentType, data
func (*ResponseStatus) Json ¶ added in v1.12.5
func (_m *ResponseStatus) Json(obj interface{}) http.Response
Json provides a mock function with given fields: obj
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) http.Response
Data provides a mock function with given fields: contentType, data
func (*ResponseSuccess) Json ¶
func (_m *ResponseSuccess) Json(obj interface{}) http.Response
Json provides a mock function with given fields: obj
type View ¶ added in v1.13.1
View is an autogenerated mock type for the View type
func NewView ¶ added in v1.13.1
NewView creates a new instance of View. 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.