Documentation ¶
Index ¶
- func HandlerWrapper(fn SpringWeb.Handler, filters ...SpringWeb.Filter) func(iris.Context)
- func HandlerWrapper1(fn SpringWeb.Handler) func(iris.Context)
- func HandlerWrapper2(handler IrisPkgContext.Handler) func(SpringWeb.WebContext)
- type Container
- func (c *Container) DELETE(path string, fn SpringWeb.Handler, filters ...SpringWeb.Filter)
- func (c *Container) GET(path string, fn SpringWeb.Handler, filters ...SpringWeb.Filter)
- func (c *Container) GET_MIDDLEWARE_CORS(config Middleware.SpringWebCorsConfig) SpringWeb.Handler
- func (c *Container) GROUP(path string, fns ...SpringWeb.Handler) SpringWeb.WebGroup
- func (c *Container) HEAD(path string, fn SpringWeb.Handler, filters ...SpringWeb.Filter)
- func (c *Container) OPTIONS(path string, fn SpringWeb.Handler, filters ...SpringWeb.Filter)
- func (c *Container) PATCH(path string, fn SpringWeb.Handler, filters ...SpringWeb.Filter)
- func (c *Container) POST(path string, fn SpringWeb.Handler, filters ...SpringWeb.Filter)
- func (c *Container) PUT(path string, fn SpringWeb.Handler, filters ...SpringWeb.Filter)
- func (c *Container) Start(address string) error
- func (c *Container) StartTLS(address string, certFile, keyFile string) error
- func (c *Container) Stop()
- func (c *Container) USE(path string, fns ...SpringWeb.Handler)
- type Context
- func (ctx *Context) Attachment(file string, name string)
- func (ctx *Context) Bind(i interface{}) error
- func (ctx *Context) Blob(code int, contentType string, b []byte)
- func (ctx *Context) ClientIP() string
- func (ctx *Context) ContentType() string
- func (ctx *Context) Cookie(name string) (*http.Cookie, error)
- func (ctx *Context) Cookies() []*http.Cookie
- func (ctx *Context) Error(err error)
- func (ctx *Context) File(file string)
- func (ctx *Context) FormFile(name string) (*multipart.FileHeader, error)
- func (ctx *Context) FormParams() (url.Values, error)
- func (ctx *Context) FormValue(name string) string
- func (ctx *Context) Get(key string) interface{}
- func (ctx *Context) GetHeader(key string) string
- func (ctx *Context) GetRawData() ([]byte, error)
- func (ctx *Context) HTML(code int, html string)
- func (ctx *Context) HTMLBlob(code int, b []byte)
- func (ctx *Context) Handler() SpringWeb.Handler
- func (ctx *Context) Header(key, value string)
- func (ctx *Context) Inline(file string, name string)
- func (ctx *Context) IsTLS() bool
- func (ctx *Context) IsWebSocket() bool
- func (ctx *Context) JSON(code int, i interface{})
- func (ctx *Context) JSONBlob(code int, b []byte)
- func (ctx *Context) JSONP(code int, callback string, i interface{})
- func (ctx *Context) JSONPBlob(code int, callback string, b []byte)
- func (ctx *Context) JSONPretty(code int, i interface{}, indent string)
- func (ctx *Context) MultipartForm() (*multipart.Form, error)
- func (ctx *Context) NativeContext() interface{}
- func (ctx *Context) NoContent(code int)
- func (ctx *Context) Path() string
- func (ctx *Context) PathParam(name string) string
- func (ctx *Context) PathParamNames() []string
- func (ctx *Context) PathParamValues() []string
- func (ctx *Context) QueryParam(name string) string
- func (ctx *Context) QueryParams() url.Values
- func (ctx *Context) QueryString() string
- func (ctx *Context) Redirect(code int, url string)
- func (ctx *Context) Request() *http.Request
- func (ctx *Context) SSEvent(name string, message interface{})
- func (ctx *Context) SaveUploadedFile(file *multipart.FileHeader, dst string) error
- func (ctx *Context) Scheme() string
- func (ctx *Context) Set(key string, val interface{})
- func (ctx *Context) SetCookie(cookie *http.Cookie)
- func (ctx *Context) Status(code int)
- func (ctx *Context) Stream(code int, contentType string, r io.Reader)
- func (ctx *Context) String(code int, format string, values ...interface{})
- func (ctx *Context) XML(code int, i interface{})
- func (ctx *Context) XMLBlob(code int, b []byte)
- func (ctx *Context) XMLPretty(code int, i interface{}, indent string)
- type IrisGroup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandlerWrapper ¶
func HandlerWrapper1 ¶ added in v0.0.4
func HandlerWrapper2 ¶
func HandlerWrapper2(handler IrisPkgContext.Handler) func(SpringWeb.WebContext)
Web 处理函数包装器
Types ¶
type Container ¶
type Container struct {
IrisApp *iris.Application
}
适配 echo 的 Web 容器
func (*Container) GET_MIDDLEWARE_CORS ¶
func (c *Container) GET_MIDDLEWARE_CORS(config Middleware.SpringWebCorsConfig) SpringWeb.Handler
type Context ¶
type Context struct { *SpringTrace.DefaultTraceContext // iris 上下文对象 IrisContext iris.Context // Web 处理函数 HandlerFunc SpringWeb.Handler }
适配 echo 的 Web 上下文
func (*Context) Attachment ¶
func (*Context) ContentType ¶
func (*Context) GetRawData ¶
func (*Context) IsWebSocket ¶
func (*Context) JSONPretty ¶
func (*Context) NativeContext ¶
func (ctx *Context) NativeContext() interface{}
func (*Context) PathParamNames ¶
func (*Context) PathParamValues ¶
func (*Context) QueryParam ¶
func (*Context) QueryParams ¶
func (*Context) QueryString ¶
func (*Context) SaveUploadedFile ¶
func (ctx *Context) SaveUploadedFile(file *multipart.FileHeader, dst string) error
Click to show internal directories.
Click to hide internal directories.