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 any) any
- func (_m *Context) WithValue(key string, value any)
- type Request
- func (_m *Request) AbortWithStatus(code int)
- func (_m *Request) AbortWithStatusJson(code int, jsonObj any)
- func (_m *Request) Bind(obj any) 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) string
- func (_m *Request) Ip() 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) QueryMap(key string) map[string]string
- 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) 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 any)
- func (_m *Response) Origin() http.ResponseOrigin
- func (_m *Response) String(code int, format string, values ...any)
- func (_m *Response) Success() http.ResponseSuccess
- type ResponseOrigin
- 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 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) QueryArray ¶
QueryArray provides a mock function with given fields: key
func (*Request) Validate ¶
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 ¶
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 ¶
func NewResponse(t mockConstructorTestingTNewResponse) *Response
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.
func (*Response) Origin ¶
func (_m *Response) Origin() http.ResponseOrigin
Origin provides a mock function with given fields:
func (*Response) Success ¶
func (_m *Response) Success() http.ResponseSuccess
Success provides a mock function with given fields:
type ResponseOrigin ¶
ResponseOrigin is an autogenerated mock type for the ResponseOrigin type
func NewResponseOrigin ¶
func NewResponseOrigin(t mockConstructorTestingTNewResponseOrigin) *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.
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 ResponseSuccess ¶
ResponseSuccess is an autogenerated mock type for the ResponseSuccess type
func NewResponseSuccess ¶
func NewResponseSuccess(t mockConstructorTestingTNewResponseSuccess) *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.
func (*ResponseSuccess) Json ¶
func (_m *ResponseSuccess) Json(obj any)
Json provides a mock function with given fields: obj
func (*ResponseSuccess) String ¶
func (_m *ResponseSuccess) String(format string, values ...any)
String provides a mock function with given fields: format, values