Documentation
¶
Index ¶
- func NewChiContext(request *http.Request, response http.ResponseWriter, config ChiConfig, ...) contracthttp.Context
- type Application
- type ChiConfig
- type ChiContext
- func (c *ChiContext) AbortWithStatus(code int)
- func (c *ChiContext) Append(field string, values ...string)
- func (c *ChiContext) Bind(obj interface{}) error
- func (c *ChiContext) Cookie(co *contracthttp.Cookie)
- func (c *ChiContext) Cookies(key string, defaultValue ...string) string
- func (c *ChiContext) Deadline() (deadline time.Time, ok bool)
- func (c *ChiContext) Done() <-chan struct{}
- func (c *ChiContext) Download(filepath, filename string) error
- func (c *ChiContext) EngineContext() any
- func (c *ChiContext) Err() error
- func (c *ChiContext) File(name string) (*multipart.FileHeader, error)
- func (c *ChiContext) Form(key, defaultValue string) string
- func (c *ChiContext) FullUrl() string
- func (c *ChiContext) Header(key, defaultValue string) string
- func (c *ChiContext) Headers() http.Header
- func (c *ChiContext) Ip() string
- func (c *ChiContext) Json(code int, obj interface{}) error
- func (c *ChiContext) Method() string
- func (c *ChiContext) Next() error
- func (c *ChiContext) Origin() *http.Request
- func (c *ChiContext) Params(key string) string
- func (c *ChiContext) Path() string
- func (c *ChiContext) Query(key, defaultValue string) string
- func (c *ChiContext) Render(name string, bind any, layouts ...string) error
- func (c *ChiContext) SaveFile(name string, dst string) error
- func (c *ChiContext) Secure() bool
- func (c *ChiContext) SendFile(filepath string, compress ...bool) error
- func (c *ChiContext) SetHeader(key, value string) contracthttp.Context
- func (c *ChiContext) StatusCode() int
- func (c *ChiContext) String(code int, format string, values ...interface{}) error
- func (c *ChiContext) Url() string
- func (c *ChiContext) Value(key interface{}) interface{}
- func (c *ChiContext) Vary(key string, value ...string)
- func (c *ChiContext) WithValue(key string, value interface{})
- type ServiceProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewChiContext ¶ added in v1.0.5
func NewChiContext(request *http.Request, response http.ResponseWriter, config ChiConfig, n ...http.Handler) contracthttp.Context
Types ¶
type Application ¶
type Application struct {
}
func (*Application) Init ¶
func (app *Application) Init()
type ChiConfig ¶ added in v1.0.8
type ChiConfig struct {
NotFoundHandler http.HandlerFunc
MethodNotAllowedHandler http.HandlerFunc
View *view.Engine
}
type ChiContext ¶ added in v1.0.5
type ChiContext struct {
Req *http.Request
Res http.ResponseWriter
// contains filtered or unexported fields
}
func (*ChiContext) AbortWithStatus ¶ added in v1.0.5
func (c *ChiContext) AbortWithStatus(code int)
func (*ChiContext) Append ¶ added in v1.0.8
func (c *ChiContext) Append(field string, values ...string)
func (*ChiContext) Bind ¶ added in v1.0.5
func (c *ChiContext) Bind(obj interface{}) error
func (*ChiContext) Cookie ¶ added in v1.0.5
func (c *ChiContext) Cookie(co *contracthttp.Cookie)
func (*ChiContext) Cookies ¶ added in v1.0.5
func (c *ChiContext) Cookies(key string, defaultValue ...string) string
func (*ChiContext) Deadline ¶ added in v1.0.5
func (c *ChiContext) Deadline() (deadline time.Time, ok bool)
func (*ChiContext) Done ¶ added in v1.0.5
func (c *ChiContext) Done() <-chan struct{}
func (*ChiContext) Download ¶ added in v1.0.8
func (c *ChiContext) Download(filepath, filename string) error
func (*ChiContext) EngineContext ¶ added in v1.0.6
func (c *ChiContext) EngineContext() any
func (*ChiContext) Err ¶ added in v1.0.5
func (c *ChiContext) Err() error
func (*ChiContext) File ¶ added in v1.0.5
func (c *ChiContext) File(name string) (*multipart.FileHeader, error)
func (*ChiContext) Form ¶ added in v1.0.5
func (c *ChiContext) Form(key, defaultValue string) string
func (*ChiContext) FullUrl ¶ added in v1.0.5
func (c *ChiContext) FullUrl() string
func (*ChiContext) Header ¶ added in v1.0.5
func (c *ChiContext) Header(key, defaultValue string) string
func (*ChiContext) Headers ¶ added in v1.0.5
func (c *ChiContext) Headers() http.Header
func (*ChiContext) Ip ¶ added in v1.0.5
func (c *ChiContext) Ip() string
func (*ChiContext) Json ¶ added in v1.0.8
func (c *ChiContext) Json(code int, obj interface{}) error
func (*ChiContext) Method ¶ added in v1.0.5
func (c *ChiContext) Method() string
func (*ChiContext) Next ¶ added in v1.0.5
func (c *ChiContext) Next() error
func (*ChiContext) Origin ¶ added in v1.0.8
func (c *ChiContext) Origin() *http.Request
func (*ChiContext) Params ¶ added in v1.0.5
func (c *ChiContext) Params(key string) string
func (*ChiContext) Path ¶ added in v1.0.5
func (c *ChiContext) Path() string
func (*ChiContext) Query ¶ added in v1.0.5
func (c *ChiContext) Query(key, defaultValue string) string
func (*ChiContext) Render ¶ added in v1.0.8
func (c *ChiContext) Render(name string, bind any, layouts ...string) error
func (*ChiContext) SaveFile ¶ added in v1.0.8
func (c *ChiContext) SaveFile(name string, dst string) error
func (*ChiContext) Secure ¶ added in v1.0.5
func (c *ChiContext) Secure() bool
func (*ChiContext) SendFile ¶ added in v1.0.8
func (c *ChiContext) SendFile(filepath string, compress ...bool) error
func (*ChiContext) SetHeader ¶ added in v1.0.8
func (c *ChiContext) SetHeader(key, value string) contracthttp.Context
func (*ChiContext) StatusCode ¶ added in v1.0.8
func (c *ChiContext) StatusCode() int
func (*ChiContext) String ¶ added in v1.0.8
func (c *ChiContext) String(code int, format string, values ...interface{}) error
func (*ChiContext) Url ¶ added in v1.0.5
func (c *ChiContext) Url() string
func (*ChiContext) Value ¶ added in v1.0.5
func (c *ChiContext) Value(key interface{}) interface{}
func (*ChiContext) Vary ¶ added in v1.0.8
func (c *ChiContext) Vary(key string, value ...string)
func (*ChiContext) WithValue ¶ added in v1.0.5
func (c *ChiContext) WithValue(key string, value interface{})
type ServiceProvider ¶
type ServiceProvider struct {
}
func (*ServiceProvider) Boot ¶
func (database *ServiceProvider) Boot()
func (*ServiceProvider) Register ¶
func (database *ServiceProvider) Register()
Click to show internal directories.
Click to hide internal directories.