api

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountController added in v1.3.7

type AccountController struct {
	bean.Component  //可嵌套Component结构体,也可实现bean接口方法声明为Bean类型
	service.Factory `bean:"service_factory"`
	// contains filtered or unexported fields
}

func (*AccountController) Controller added in v1.3.7

func (r *AccountController) Controller() string

Controller 方法实现Controller接口,将EmployeeController声明为Controller类型的Bean 返回值作为前置url

func (*AccountController) GetAllUsers added in v1.3.7

func (r *AccountController) GetAllUsers(ctx context.Context) ([]*dto.AccountDTO, error)

GetAllUsers 方法将被关联到getAllUsers,规则为路由字段首字母大写

func (*AccountController) GetUserById added in v1.3.7

func (r *AccountController) GetUserById(ctx context.Context, username string) (*dto.AccountDTO, error)

func (*AccountController) SaveUser added in v1.3.7

func (r *AccountController) SaveUser(ctx context.Context, username string, employee *dto.AccountDTO) (resp.Response, error)

type DemoCacheController

type DemoCacheController struct {
	bean.Component
	service.Factory `bean:"service_factory"`
	// contains filtered or unexported fields
}

func (*DemoCacheController) Controller

func (r *DemoCacheController) Controller() string

func (*DemoCacheController) GetCache

func (r *DemoCacheController) GetCache(key string) interface{}

func (*DemoCacheController) SaveCache

func (r *DemoCacheController) SaveCache(key, value string) interface{}

type IndexController

type IndexController struct {
	bean.Component
	service.Factory `bean:"service_factory"`
	// contains filtered or unexported fields
}

func (*IndexController) Bean

func (r *IndexController) Bean() string

Bean 实现Bean接口将IndexController声明为Bean类型

func (*IndexController) Controller

func (r *IndexController) Controller() string

func (*IndexController) Index

func (r *IndexController) Index() resp.Response

定义为controller,注册路由

type TestFeignController added in v1.4.1

type TestFeignController struct {
	bean.Component
	feign.Factory `bean:"feign_factory"`
	// contains filtered or unexported fields
}

func (*TestFeignController) Controller added in v1.4.1

func (h *TestFeignController) Controller() string

func (*TestFeignController) GetUserById added in v1.4.1

func (h *TestFeignController) GetUserById(ctx context.Context, username string) (*dto.AccountDTO, error)

func (*TestFeignController) SaveUser added in v1.4.1

func (h *TestFeignController) SaveUser(ctx context.Context, username string, employee *dto.AccountDTO) (resp.Response, error)

func (*TestFeignController) TestGetAllUsers added in v1.4.1

func (h *TestFeignController) TestGetAllUsers() ([]*dto.AccountDTO, error)

type WsHandler added in v1.4.0

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

func (*WsHandler) Endpoint added in v1.4.0

func (w *WsHandler) Endpoint() string

func (*WsHandler) OnClose added in v1.4.0

func (w *WsHandler) OnClose(session *Session)

func (*WsHandler) OnError added in v1.4.0

func (w *WsHandler) OnError(session *Session, err error)

func (*WsHandler) OnMessage added in v1.4.0

func (w *WsHandler) OnMessage(session *Session, message []byte) error

func (*WsHandler) OnOpen added in v1.4.0

func (w *WsHandler) OnOpen(session *Session)

Jump to

Keyboard shortcuts

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