mocks

package
v1.13.5 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Route

type Route struct {
	mock.Mock
}

Route is an autogenerated mock type for the Route type

func NewRoute

func NewRoute(t interface {
	mock.TestingT
	Cleanup(func())
}) *Route

NewRoute creates a new instance of Route. 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 (*Route) Any

func (_m *Route) Any(relativePath string, handler http.HandlerFunc)

Any provides a mock function with given fields: relativePath, handler

func (*Route) Delete

func (_m *Route) Delete(relativePath string, handler http.HandlerFunc)

Delete provides a mock function with given fields: relativePath, handler

func (*Route) Fallback added in v1.13.1

func (_m *Route) Fallback(handler http.HandlerFunc)

Fallback provides a mock function with given fields: handler

func (*Route) Get

func (_m *Route) Get(relativePath string, handler http.HandlerFunc)

Get provides a mock function with given fields: relativePath, handler

func (*Route) GlobalMiddleware added in v1.13.1

func (_m *Route) GlobalMiddleware(middlewares ...http.Middleware)

GlobalMiddleware provides a mock function with given fields: middlewares

func (*Route) Group

func (_m *Route) Group(handler route.GroupFunc)

Group provides a mock function with given fields: handler

func (*Route) Middleware

func (_m *Route) Middleware(middlewares ...http.Middleware) route.Router

Middleware provides a mock function with given fields: middlewares

func (*Route) Options

func (_m *Route) Options(relativePath string, handler http.HandlerFunc)

Options provides a mock function with given fields: relativePath, handler

func (*Route) Patch

func (_m *Route) Patch(relativePath string, handler http.HandlerFunc)

Patch provides a mock function with given fields: relativePath, handler

func (*Route) Post

func (_m *Route) Post(relativePath string, handler http.HandlerFunc)

Post provides a mock function with given fields: relativePath, handler

func (*Route) Prefix

func (_m *Route) Prefix(addr string) route.Router

Prefix provides a mock function with given fields: addr

func (*Route) Put

func (_m *Route) Put(relativePath string, handler http.HandlerFunc)

Put provides a mock function with given fields: relativePath, handler

func (*Route) Resource added in v1.13.0

func (_m *Route) Resource(relativePath string, controller http.ResourceController)

Resource provides a mock function with given fields: relativePath, controller

func (*Route) Run added in v1.13.1

func (_m *Route) Run(host ...string) error

Run provides a mock function with given fields: host

func (*Route) RunTLS added in v1.13.1

func (_m *Route) RunTLS(host ...string) error

RunTLS provides a mock function with given fields: host

func (*Route) RunTLSWithCert added in v1.13.1

func (_m *Route) RunTLSWithCert(host string, certFile string, keyFile string) error

RunTLSWithCert provides a mock function with given fields: host, certFile, keyFile

func (*Route) ServeHTTP added in v1.13.1

func (_m *Route) ServeHTTP(writer nethttp.ResponseWriter, request *nethttp.Request)

ServeHTTP provides a mock function with given fields: writer, request

func (*Route) Static

func (_m *Route) Static(relativePath string, root string)

Static provides a mock function with given fields: relativePath, root

func (*Route) StaticFS

func (_m *Route) StaticFS(relativePath string, fs nethttp.FileSystem)

StaticFS provides a mock function with given fields: relativePath, fs

func (*Route) StaticFile

func (_m *Route) StaticFile(relativePath string, filepath string)

StaticFile provides a mock function with given fields: relativePath, filepath

type Router added in v1.13.1

type Router struct {
	mock.Mock
}

Router is an autogenerated mock type for the Router type

func NewRouter added in v1.13.1

func NewRouter(t interface {
	mock.TestingT
	Cleanup(func())
}) *Router

NewRouter creates a new instance of Router. 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 (*Router) Any added in v1.13.1

func (_m *Router) Any(relativePath string, handler http.HandlerFunc)

Any provides a mock function with given fields: relativePath, handler

func (*Router) Delete added in v1.13.1

func (_m *Router) Delete(relativePath string, handler http.HandlerFunc)

Delete provides a mock function with given fields: relativePath, handler

func (*Router) Get added in v1.13.1

func (_m *Router) Get(relativePath string, handler http.HandlerFunc)

Get provides a mock function with given fields: relativePath, handler

func (*Router) Group added in v1.13.1

func (_m *Router) Group(handler route.GroupFunc)

Group provides a mock function with given fields: handler

func (*Router) Middleware added in v1.13.1

func (_m *Router) Middleware(middlewares ...http.Middleware) route.Router

Middleware provides a mock function with given fields: middlewares

func (*Router) Options added in v1.13.1

func (_m *Router) Options(relativePath string, handler http.HandlerFunc)

Options provides a mock function with given fields: relativePath, handler

func (*Router) Patch added in v1.13.1

func (_m *Router) Patch(relativePath string, handler http.HandlerFunc)

Patch provides a mock function with given fields: relativePath, handler

func (*Router) Post added in v1.13.1

func (_m *Router) Post(relativePath string, handler http.HandlerFunc)

Post provides a mock function with given fields: relativePath, handler

func (*Router) Prefix added in v1.13.1

func (_m *Router) Prefix(addr string) route.Router

Prefix provides a mock function with given fields: addr

func (*Router) Put added in v1.13.1

func (_m *Router) Put(relativePath string, handler http.HandlerFunc)

Put provides a mock function with given fields: relativePath, handler

func (*Router) Resource added in v1.13.1

func (_m *Router) Resource(relativePath string, controller http.ResourceController)

Resource provides a mock function with given fields: relativePath, controller

func (*Router) Static added in v1.13.1

func (_m *Router) Static(relativePath string, root string)

Static provides a mock function with given fields: relativePath, root

func (*Router) StaticFS added in v1.13.1

func (_m *Router) StaticFS(relativePath string, fs nethttp.FileSystem)

StaticFS provides a mock function with given fields: relativePath, fs

func (*Router) StaticFile added in v1.13.1

func (_m *Router) StaticFile(relativePath string, filepath string)

StaticFile provides a mock function with given fields: relativePath, filepath

Jump to

Keyboard shortcuts

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