mocks

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2022 License: MIT Imports: 6 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 NewContextT) *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 NewContextT

type NewContextT interface {
	mock.TestingT
	Cleanup(func())
}

type NewRequestT

type NewRequestT interface {
	mock.TestingT
	Cleanup(func())
}

type NewResponseSuccessT

type NewResponseSuccessT interface {
	mock.TestingT
	Cleanup(func())
}

type NewResponseT

type NewResponseT interface {
	mock.TestingT
	Cleanup(func())
}

type Request

type Request struct {
	mock.Mock
}

Request is an autogenerated mock type for the Request type

func NewRequest

func NewRequest(t NewRequestT) *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) string

Input provides a mock function with given fields: key

func (*Request) Ip

func (_m *Request) Ip() string

Ip provides a mock function with given fields:

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

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

Response provides a mock function with given fields:

func (*Request) Url

func (_m *Request) Url() string

Url provides a mock function with given fields:

type Response

type Response struct {
	mock.Mock
}

Response is an autogenerated mock type for the Response type

func NewResponse

func NewResponse(t NewResponseT) *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) 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) 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:

type ResponseSuccess

type ResponseSuccess struct {
	mock.Mock
}

ResponseSuccess is an autogenerated mock type for the ResponseSuccess type

func NewResponseSuccess

func NewResponseSuccess(t NewResponseSuccessT) *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 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