mocks

package
v0.0.0-...-4ca5139 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	mock.Mock
}

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) Context

func (_m *Context) Context() context.Context

Context provides a mock function with given fields:

func (*Context) Deadline

func (_m *Context) Deadline() (time.Time, bool)

Deadline provides a mock function with given fields:

func (*Context) Done

func (_m *Context) Done() <-chan struct{}

Done provides a mock function with given fields:

func (*Context) Err

func (_m *Context) Err() error

Err provides a mock function with given fields:

func (*Context) Request

func (_m *Context) Request() http.Request

Request provides a mock function with given fields:

func (*Context) Response

func (_m *Context) Response() http.Response

Response provides a mock function with given fields:

func (*Context) Value

func (_m *Context) Value(key interface{}) interface{}

Value provides a mock function with given fields: key

func (*Context) WithValue

func (_m *Context) WithValue(key string, value interface{})

WithValue provides a mock function with given fields: key, value

type Request

type Request struct {
	mock.Mock
}

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

func (_m *Request) AbortWithStatus(code int)

AbortWithStatus provides a mock function with given fields: code

func (*Request) AbortWithStatusJson

func (_m *Request) AbortWithStatusJson(code int, jsonObj interface{})

AbortWithStatusJson provides a mock function with given fields: code, jsonObj

func (*Request) Bind

func (_m *Request) Bind(obj interface{}) error

Bind provides a mock function with given fields: obj

func (*Request) File

func (_m *Request) File(name string) (filesystem.File, error)

File provides a mock function with given fields: name

func (*Request) Form

func (_m *Request) Form(key string, defaultValue ...string) string

Form provides a mock function with given fields: key, defaultValue

func (*Request) FullUrl

func (_m *Request) FullUrl() string

FullUrl provides a mock function with given fields:

func (*Request) Header

func (_m *Request) Header(key string, defaultValue ...string) string

Header provides a mock function with given fields: key, defaultValue

func (*Request) Headers

func (_m *Request) Headers() nethttp.Header

Headers provides a mock function with given fields:

func (*Request) Input

func (_m *Request) Input(key string, defaultValue ...string) string

Input provides a mock function with given fields: key, defaultValue

func (*Request) InputBool

func (_m *Request) InputBool(key string, defaultValue ...bool) bool

InputBool provides a mock function with given fields: key, defaultValue

func (*Request) InputInt

func (_m *Request) InputInt(key string, defaultValue ...int) int

InputInt provides a mock function with given fields: key, defaultValue

func (*Request) InputInt64

func (_m *Request) InputInt64(key string, defaultValue ...int64) int64

InputInt64 provides a mock function with given fields: key, defaultValue

func (*Request) Ip

func (_m *Request) Ip() string

Ip provides a mock function with given fields:

func (*Request) Json

func (_m *Request) Json(key string, defaultValue ...string) string

Json provides a mock function with given fields: key, defaultValue

func (*Request) Method

func (_m *Request) Method() string

Method provides a mock function with given fields:

func (*Request) Next

func (_m *Request) Next()

Next provides a mock function with given fields:

func (*Request) Origin

func (_m *Request) Origin() *nethttp.Request

Origin provides a mock function with given fields:

func (*Request) Path

func (_m *Request) Path() string

Path provides a mock function with given fields:

func (*Request) Query

func (_m *Request) Query(key string, defaultValue ...string) string

Query provides a mock function with given fields: key, defaultValue

func (*Request) QueryArray

func (_m *Request) QueryArray(key string) []string

QueryArray provides a mock function with given fields: key

func (*Request) QueryBool

func (_m *Request) QueryBool(key string, defaultValue ...bool) bool

QueryBool provides a mock function with given fields: key, defaultValue

func (*Request) QueryInt

func (_m *Request) QueryInt(key string, defaultValue ...int) int

QueryInt provides a mock function with given fields: key, defaultValue

func (*Request) QueryInt64

func (_m *Request) QueryInt64(key string, defaultValue ...int64) int64

QueryInt64 provides a mock function with given fields: key, defaultValue

func (*Request) QueryMap

func (_m *Request) QueryMap(key string) map[string]string

QueryMap provides a mock function with given fields: key

func (*Request) Route

func (_m *Request) Route(key string) string

Route provides a mock function with given fields: key

func (*Request) RouteInt

func (_m *Request) RouteInt(key string) int

RouteInt provides a mock function with given fields: key

func (*Request) RouteInt64

func (_m *Request) RouteInt64(key string) int64

RouteInt64 provides a mock function with given fields: key

func (*Request) Url

func (_m *Request) Url() string

Url provides a mock function with given fields:

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

type Response struct {
	mock.Mock
}

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) Data

func (_m *Response) Data(code int, contentType string, data []byte)

Data provides a mock function with given fields: code, contentType, data

func (*Response) Download

func (_m *Response) Download(filepath string, filename string)

Download provides a mock function with given fields: filepath, filename

func (*Response) File

func (_m *Response) File(filepath string)

File provides a mock function with given fields: filepath

func (*Response) Header

func (_m *Response) Header(key string, value string) http.Response

Header provides a mock function with given fields: key, value

func (*Response) Json

func (_m *Response) Json(code int, obj interface{})

Json provides a mock function with given fields: code, obj

func (*Response) Origin

func (_m *Response) Origin() http.ResponseOrigin

Origin provides a mock function with given fields:

func (*Response) Redirect

func (_m *Response) Redirect(code int, location string)

Redirect provides a mock function with given fields: code, location

func (*Response) String

func (_m *Response) String(code int, format string, values ...interface{})

String provides a mock function with given fields: code, format, values

func (*Response) Success

func (_m *Response) Success() http.ResponseSuccess

Success provides a mock function with given fields:

func (*Response) Writer

func (_m *Response) Writer() nethttp.ResponseWriter

Writer provides a mock function with given fields:

type ResponseOrigin

type ResponseOrigin struct {
	mock.Mock
}

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

type ResponseSuccess struct {
	mock.Mock
}

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) Data

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL