mocks

package
v1.13.9 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 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.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:

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 ContextRequest added in v1.13.1

type ContextRequest struct {
	mock.Mock
}

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

func (_m *ContextRequest) InputMap(key string, defaultValue ...map[string]string) map[string]string

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

type ContextResponse struct {
	mock.Mock
}

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

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

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

type RateLimiter struct {
	mock.Mock
}

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

func (_m *RateLimiter) For(name string, callback func(http.Context) http.Limit)

For provides a mock function with given fields: name, callback

func (*RateLimiter) ForWithLimits added in v1.12.0

func (_m *RateLimiter) ForWithLimits(name string, callback func(http.Context) []http.Limit)

ForWithLimits provides a mock function with given fields: name, callback

func (*RateLimiter) Limiter added in v1.12.0

func (_m *RateLimiter) Limiter(name string) func(http.Context) []http.Limit

Limiter provides a mock function with given fields: name

type Response

type Response struct {
	mock.Mock
}

Response is an autogenerated mock type for the Response type

func NewResponse

func NewResponse(t interface {
	mock.TestingT
	Cleanup(func())
}) *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. The first argument is typically a *testing.T value.

func (*Response) Render added in v1.13.1

func (_m *Response) Render() error

Render provides a mock function with given fields:

type ResponseOrigin added in v1.8.0

type ResponseOrigin struct {
	mock.Mock
}

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

type ResponseStatus struct {
	mock.Mock
}

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

func (*ResponseStatus) String added in v1.12.5

func (_m *ResponseStatus) String(format string, values ...interface{}) http.Response

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

type ResponseSuccess

type ResponseSuccess struct {
	mock.Mock
}

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

func (*ResponseSuccess) String

func (_m *ResponseSuccess) String(format string, values ...interface{}) http.Response

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

type View added in v1.13.1

type View struct {
	mock.Mock
}

View is an autogenerated mock type for the View type

func NewView added in v1.13.1

func NewView(t interface {
	mock.TestingT
	Cleanup(func())
}) *View

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.

func (*View) Exists added in v1.13.1

func (_m *View) Exists(view string) bool

Exists provides a mock function with given fields: view

func (*View) GetShared added in v1.13.1

func (_m *View) GetShared() map[string]interface{}

GetShared provides a mock function with given fields:

func (*View) Share added in v1.13.1

func (_m *View) Share(key string, value interface{})

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

func (*View) Shared added in v1.13.1

func (_m *View) Shared(key string, def ...interface{}) interface{}

Shared provides a mock function with given fields: key, def

Jump to

Keyboard shortcuts

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