service

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Api

type Api struct {
	Method string
	Url    string
	Params []web.Param
}

type ControllerModel

type ControllerModel struct {
	Controller string
	APIs       []Api
}

type DemoCacheService

type DemoCacheService struct {
	bean.Component
	Cache cache.ICache //使用cache注入缓存实现
}

func (*DemoCacheService) GetFromCache

func (r *DemoCacheService) GetFromCache(key string) interface{}

func (*DemoCacheService) SaveCache

func (r *DemoCacheService) SaveCache(key, val string) interface{}

type EmployeeService

type EmployeeService struct {
	bean.Component
	Repo *repository2.AccountRepository
}

func (*EmployeeService) GetAllUsers

func (r *EmployeeService) GetAllUsers() []model2.Account

func (*EmployeeService) GetUserById

func (r *EmployeeService) GetUserById(username string) model2.Account

func (*EmployeeService) SaveUser

func (r *EmployeeService) SaveUser(username string, account model2.Account) model2.Account

type RouteService

type RouteService struct {
	Controllers []component.Controller //使用切片接口类型注入所有实现类
	AppName     string                 `value:"application.app_name"` //使用value标签实现配置文件注入
}

func (*RouteService) Apis

func (t *RouteService) Apis() resp.Response

func (*RouteService) Bean

func (t *RouteService) Bean() string

func (*RouteService) Service

func (t *RouteService) Service() string

type WsHandler

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

func (*WsHandler) Endpoint

func (w *WsHandler) Endpoint() string

func (*WsHandler) OnClose

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

func (*WsHandler) OnError

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

func (*WsHandler) OnMessage

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

func (*WsHandler) OnOpen

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

Jump to

Keyboard shortcuts

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