Documentation
¶
Index ¶
- type Context
- func (c *Context) Body() []byte
- func (c *Context) Cookie(name string) (router.Cookie, bool)
- func (c *Context) GetHeader(key string) string
- func (c *Context) Method() string
- func (c *Context) Path() string
- func (c *Context) ResponseBody() []byte
- func (c *Context) SetCookie(cookie router.Cookie)
- func (c *Context) SetHeader(key, value string)
- func (c *Context) SetUserID(id string)
- func (c *Context) SetValue(key string, v any)
- func (c *Context) UserID() string
- func (c *Context) Value(key string) any
- func (c *Context) Write(b []byte) (int, error)
- func (c *Context) WriteStatus(code int)
- type Route
- type Router
- func (r *Router) Delete(path string, h router.HandlerFunc) router.Route
- func (r *Router) Get(path string, h router.HandlerFunc) router.Route
- func (r *Router) Handle(method, path string, h router.HandlerFunc) router.Route
- func (r *Router) Invoke(method, path string, ctx router.Context)
- func (r *Router) Options(path string, h router.HandlerFunc) router.Route
- func (r *Router) Post(path string, h router.HandlerFunc) router.Route
- func (r *Router) Put(path string, h router.HandlerFunc) router.Route
- func (r *Router) Routes() []router.RouteInfo
- func (r *Router) Socket(path string, h router.SocketFunc) router.Route
- func (r *Router) Stream(path string, h router.StreamFunc) router.Route
- func (r *Router) Use(m ...router.Middleware)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
InMethod string
InPath string
InBody []byte
Status int
// contains filtered or unexported fields
}
Context bufferiza la respuesta y deja fijar la petición desde el test.
func (*Context) ResponseBody ¶
ResponseBody devuelve el cuerpo de respuesta bufferizado.
func (*Context) WriteStatus ¶
type Route ¶
type Route struct {
// contains filtered or unexported fields
}
Route implementa router.Route para el mock, grabando las anotaciones de permiso.
Click to show internal directories.
Click to hide internal directories.