Documentation ¶
Index ¶
- type DemoCacheController
- type EmployeeController
- type IndexController
- type IrisTestController
- func (r *IrisTestController) Controller() string
- func (r *IrisTestController) TestBody(account model.Account, m map[string]interface{}) interface{}
- func (r *IrisTestController) TestContext(c context.Context) string
- func (r *IrisTestController) TestError()
- func (r *IrisTestController) TestForm(i int, f float64, bl bool, s string, m map[string][]string) interface{}
- func (r *IrisTestController) TestHeader(token string) string
- func (r *IrisTestController) TestIris(iris *iris.Application)
- func (r *IrisTestController) TestMultipart(file multipart.File, header *multipart.FileHeader, value string) interface{}
- func (r *IrisTestController) TestPath(i int, f float64, bl bool, s string) interface{}
- func (r *IrisTestController) TestQuery(i int, f float64, bl bool, s string, account model.Account) interface{}
- func (r *IrisTestController) TestReqNResp(req *http.Request, w http.ResponseWriter)
- func (r *IrisTestController) TestStream(s []byte) interface{}
- type TestIrisResponseController
- func (t *TestIrisResponseController) Controller() string
- func (t *TestIrisResponseController) Error() resp.Response
- func (t *TestIrisResponseController) Html() resp.Response
- func (t *TestIrisResponseController) InternalError() resp.Response
- func (t *TestIrisResponseController) Json() resp.Response
- func (t *TestIrisResponseController) Redirect() resp.Response
- func (t *TestIrisResponseController) Text() resp.Response
- func (t *TestIrisResponseController) Xml() resp.Response
- func (t *TestIrisResponseController) Yaml() resp.Response
- type TestResponseController
- func (t *TestResponseController) Controller() string
- func (t *TestResponseController) Error(w http.ResponseWriter)
- func (t *TestResponseController) Html(w http.ResponseWriter)
- func (t *TestResponseController) InternalError(w http.ResponseWriter)
- func (t *TestResponseController) Json(w http.ResponseWriter)
- func (t *TestResponseController) Redirect(w http.ResponseWriter)
- func (t *TestResponseController) Text(w http.ResponseWriter)
- func (t *TestResponseController) Xml(w http.ResponseWriter)
- func (t *TestResponseController) Yaml(w http.ResponseWriter)
- type WsHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DemoCacheController ¶ added in v1.1.4
type DemoCacheController struct { bean.Component CacheService *DemoCacheService // contains filtered or unexported fields }
func (*DemoCacheController) Controller ¶ added in v1.1.8
func (r *DemoCacheController) Controller() string
func (*DemoCacheController) GetCache ¶ added in v1.1.4
func (r *DemoCacheController) GetCache(key string) interface{}
func (*DemoCacheController) SaveCache ¶ added in v1.1.4
func (r *DemoCacheController) SaveCache(key, value string) interface{}
type EmployeeController ¶ added in v1.1.4
type EmployeeController struct { bean.Component //可继承bean类,也可实现bean接口方法成为bean EmployeeService *EmployeeService //不使用bean标签则自动按 pkg.name (service.DemoRestfulService) 注入 // contains filtered or unexported fields }
func (*EmployeeController) Controller ¶ added in v1.1.8
func (r *EmployeeController) Controller() string
实现announce.Controller接口方法,声明为web控制器 返回值为url的前置mapping
func (*EmployeeController) GetAllUsers ¶ added in v1.1.8
func (r *EmployeeController) GetAllUsers() []model.Account
func (*EmployeeController) GetUserById ¶ added in v1.1.8
func (r *EmployeeController) GetUserById(username string) model.Account
restful写法注册路由 支持Accept内容协商. 如:
application/json
type IndexController ¶ added in v1.1.8
type IndexController struct { RouteService component.Service `bean:"RouteService"` //使用接口类型并指定bean name注入实现类 // contains filtered or unexported fields }
func (*IndexController) Bean ¶ added in v1.2.7
func (r *IndexController) Bean() string
func (*IndexController) Controller ¶ added in v1.1.8
func (r *IndexController) Controller() string
func (*IndexController) Index ¶ added in v1.1.8
func (r *IndexController) Index(w http.ResponseWriter) resp.Response
定义为controller,注册路由
type IrisTestController ¶ added in v1.1.4
func (*IrisTestController) Controller ¶ added in v1.1.8
func (r *IrisTestController) Controller() string
func (*IrisTestController) TestBody ¶ added in v1.3.0
func (r *IrisTestController) TestBody(account model.Account, m map[string]interface{}) interface{}
func (*IrisTestController) TestContext ¶ added in v1.1.4
func (r *IrisTestController) TestContext(c context.Context) string
func (*IrisTestController) TestError ¶ added in v1.1.5
func (r *IrisTestController) TestError()
func (*IrisTestController) TestHeader ¶ added in v1.1.4
func (r *IrisTestController) TestHeader(token string) string
func (*IrisTestController) TestIris ¶ added in v1.1.4
func (r *IrisTestController) TestIris(iris *iris.Application)
func (*IrisTestController) TestMultipart ¶ added in v1.1.4
func (r *IrisTestController) TestMultipart(file multipart.File, header *multipart.FileHeader, value string) interface{}
func (*IrisTestController) TestPath ¶ added in v1.3.0
func (r *IrisTestController) TestPath(i int, f float64, bl bool, s string) interface{}
func (*IrisTestController) TestReqNResp ¶ added in v1.2.2
func (r *IrisTestController) TestReqNResp(req *http.Request, w http.ResponseWriter)
func (*IrisTestController) TestStream ¶ added in v1.3.0
func (r *IrisTestController) TestStream(s []byte) interface{}
type TestIrisResponseController ¶ added in v1.2.5
func (*TestIrisResponseController) Controller ¶ added in v1.2.5
func (t *TestIrisResponseController) Controller() string
func (*TestIrisResponseController) Error ¶ added in v1.2.5
func (t *TestIrisResponseController) Error() resp.Response
func (*TestIrisResponseController) Html ¶ added in v1.2.5
func (t *TestIrisResponseController) Html() resp.Response
func (*TestIrisResponseController) InternalError ¶ added in v1.2.5
func (t *TestIrisResponseController) InternalError() resp.Response
func (*TestIrisResponseController) Json ¶ added in v1.2.5
func (t *TestIrisResponseController) Json() resp.Response
func (*TestIrisResponseController) Redirect ¶ added in v1.2.5
func (t *TestIrisResponseController) Redirect() resp.Response
func (*TestIrisResponseController) Text ¶ added in v1.2.5
func (t *TestIrisResponseController) Text() resp.Response
func (*TestIrisResponseController) Xml ¶ added in v1.2.5
func (t *TestIrisResponseController) Xml() resp.Response
func (*TestIrisResponseController) Yaml ¶ added in v1.2.5
func (t *TestIrisResponseController) Yaml() resp.Response
type TestResponseController ¶ added in v1.2.5
func (*TestResponseController) Controller ¶ added in v1.2.5
func (t *TestResponseController) Controller() string
func (*TestResponseController) Error ¶ added in v1.2.5
func (t *TestResponseController) Error(w http.ResponseWriter)
func (*TestResponseController) Html ¶ added in v1.2.5
func (t *TestResponseController) Html(w http.ResponseWriter)
func (*TestResponseController) InternalError ¶ added in v1.2.5
func (t *TestResponseController) InternalError(w http.ResponseWriter)
func (*TestResponseController) Json ¶ added in v1.2.5
func (t *TestResponseController) Json(w http.ResponseWriter)
func (*TestResponseController) Redirect ¶ added in v1.2.5
func (t *TestResponseController) Redirect(w http.ResponseWriter)
func (*TestResponseController) Text ¶ added in v1.2.5
func (t *TestResponseController) Text(w http.ResponseWriter)
func (*TestResponseController) Xml ¶ added in v1.2.5
func (t *TestResponseController) Xml(w http.ResponseWriter)
func (*TestResponseController) Yaml ¶ added in v1.2.5
func (t *TestResponseController) Yaml(w http.ResponseWriter)
Click to show internal directories.
Click to hide internal directories.