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