Documentation ¶
Index ¶
- type Route
- func (_m *Route) Any(relativePath string, handler http.HandlerFunc)
- func (_m *Route) Delete(relativePath string, handler http.HandlerFunc)
- func (_m *Route) Fallback(handler http.HandlerFunc)
- func (_m *Route) Get(relativePath string, handler http.HandlerFunc)
- func (_m *Route) GlobalMiddleware(middlewares ...http.Middleware)
- func (_m *Route) Group(handler route.GroupFunc)
- func (_m *Route) Middleware(middlewares ...http.Middleware) route.Router
- func (_m *Route) Options(relativePath string, handler http.HandlerFunc)
- func (_m *Route) Patch(relativePath string, handler http.HandlerFunc)
- func (_m *Route) Post(relativePath string, handler http.HandlerFunc)
- func (_m *Route) Prefix(addr string) route.Router
- func (_m *Route) Put(relativePath string, handler http.HandlerFunc)
- func (_m *Route) Resource(relativePath string, controller http.ResourceController)
- func (_m *Route) Run(host ...string) error
- func (_m *Route) RunTLS(host ...string) error
- func (_m *Route) RunTLSWithCert(host string, certFile string, keyFile string) error
- func (_m *Route) ServeHTTP(writer nethttp.ResponseWriter, request *nethttp.Request)
- func (_m *Route) Static(relativePath string, root string)
- func (_m *Route) StaticFS(relativePath string, fs nethttp.FileSystem)
- func (_m *Route) StaticFile(relativePath string, filepath string)
- type Router
- func (_m *Router) Any(relativePath string, handler http.HandlerFunc)
- func (_m *Router) Delete(relativePath string, handler http.HandlerFunc)
- func (_m *Router) Get(relativePath string, handler http.HandlerFunc)
- func (_m *Router) Group(handler route.GroupFunc)
- func (_m *Router) Middleware(middlewares ...http.Middleware) route.Router
- func (_m *Router) Options(relativePath string, handler http.HandlerFunc)
- func (_m *Router) Patch(relativePath string, handler http.HandlerFunc)
- func (_m *Router) Post(relativePath string, handler http.HandlerFunc)
- func (_m *Router) Prefix(addr string) route.Router
- func (_m *Router) Put(relativePath string, handler http.HandlerFunc)
- func (_m *Router) Resource(relativePath string, controller http.ResourceController)
- func (_m *Router) Static(relativePath string, root string)
- func (_m *Router) StaticFS(relativePath string, fs nethttp.FileSystem)
- func (_m *Router) StaticFile(relativePath string, filepath string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Route ¶
Route is an autogenerated mock type for the Route type
func NewRoute ¶
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) 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) 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) RunTLSWithCert ¶ added in v1.13.1
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) StaticFS ¶
func (_m *Route) StaticFS(relativePath string, fs nethttp.FileSystem)
StaticFS provides a mock function with given fields: relativePath, fs
func (*Route) StaticFile ¶
StaticFile provides a mock function with given fields: relativePath, filepath
type Router ¶ added in v1.13.1
Router is an autogenerated mock type for the Router type
func NewRouter ¶ added in v1.13.1
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) 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) 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
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
StaticFile provides a mock function with given fields: relativePath, filepath