api

package
v1.3.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

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

func (*EmployeeController) SaveUser added in v1.1.8

func (r *EmployeeController) SaveUser(username string, employee model.Account) model.Account

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

定义为controller,注册路由

type IrisTestController added in v1.1.4

type IrisTestController struct {
	bean.Component
	// contains filtered or unexported fields
}

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) TestForm added in v1.3.0

func (r *IrisTestController) TestForm(i int, f float64, bl bool, s string, m map[string][]string) interface{}

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) TestQuery added in v1.3.0

func (r *IrisTestController) TestQuery(i int, f float64, bl bool, s string, account model.Account) 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

type TestIrisResponseController struct {
	bean.Component
	// contains filtered or unexported fields
}

func (*TestIrisResponseController) Controller added in v1.2.5

func (t *TestIrisResponseController) Controller() string

func (*TestIrisResponseController) Error added in v1.2.5

func (*TestIrisResponseController) Html added in v1.2.5

func (*TestIrisResponseController) InternalError added in v1.2.5

func (t *TestIrisResponseController) InternalError() resp.Response

func (*TestIrisResponseController) Json added in v1.2.5

func (*TestIrisResponseController) Redirect added in v1.2.5

func (*TestIrisResponseController) Text added in v1.2.5

func (*TestIrisResponseController) Xml added in v1.2.5

func (*TestIrisResponseController) Yaml added in v1.2.5

type TestResponseController added in v1.2.5

type TestResponseController struct {
	bean.Component
	// contains filtered or unexported fields
}

func (*TestResponseController) Controller added in v1.2.5

func (t *TestResponseController) Controller() string

func (*TestResponseController) Error added in v1.2.5

func (*TestResponseController) Html added in v1.2.5

func (*TestResponseController) InternalError added in v1.2.5

func (t *TestResponseController) InternalError(w http.ResponseWriter)

func (*TestResponseController) Json added in v1.2.5

func (*TestResponseController) Redirect added in v1.2.5

func (*TestResponseController) Text added in v1.2.5

func (*TestResponseController) Xml added in v1.2.5

func (*TestResponseController) Yaml added in v1.2.5

type WsHandler added in v1.3.5

type WsHandler struct {
	bean.Component
	Log logging.Logger
}

func (*WsHandler) Endpoint added in v1.3.5

func (w *WsHandler) Endpoint() string

func (*WsHandler) OnClose added in v1.3.5

func (w *WsHandler) OnClose(conn *websocket.Conn)

func (*WsHandler) OnError added in v1.3.5

func (w *WsHandler) OnError(conn *websocket.Conn, err error)

func (*WsHandler) OnMessage added in v1.3.5

func (w *WsHandler) OnMessage(conn *websocket.Conn, message []byte) error

func (*WsHandler) OnOpen added in v1.3.5

func (w *WsHandler) OnOpen(conn *websocket.Conn)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL