service

package
v1.4.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountService added in v1.3.7

type AccountService interface {
	component.Service
	GetUserById(ctx context.Context, username string) (*dto.AccountDTO, error)
	GetAllUsers(ctx context.Context) ([]*dto.AccountDTO, error)
	SaveUser(ctx context.Context, username string, account *dto.AccountDTO) (resp.Response, error)
}

type AccountServiceImpl added in v1.3.7

type AccountServiceImpl struct {
	bean.Component
	repository.Factory `bean:"repo_factory"`
}

func (*AccountServiceImpl) GetAllUsers added in v1.3.7

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

func (*AccountServiceImpl) GetUserById added in v1.3.7

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

func (*AccountServiceImpl) SaveUser added in v1.3.7

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

func (*AccountServiceImpl) Service added in v1.3.7

func (r *AccountServiceImpl) Service() string

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 interface {
	component.Service
	SaveCache(key, val string) interface{}
	GetFromCache(key string) interface{}
}

type DemoCacheServiceImpl added in v1.4.0

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

func (*DemoCacheServiceImpl) GetFromCache added in v1.4.0

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

func (*DemoCacheServiceImpl) SaveCache added in v1.4.0

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

func (*DemoCacheServiceImpl) Service added in v1.4.0

func (r *DemoCacheServiceImpl) Service() string

type Factory added in v1.4.0

type Factory interface {
	GetAccountService() AccountService
	GetDemoCacheService() DemoCacheService
	GetRouteService() RouteService
}

type FactoryImpl added in v1.4.0

type FactoryImpl struct {
	bean.Component
	AccountService   AccountService
	DemoCacheService DemoCacheService
	RouteService     RouteService
}

func (*FactoryImpl) Bean added in v1.4.0

func (f *FactoryImpl) Bean() string

func (*FactoryImpl) GetAccountService added in v1.4.0

func (f *FactoryImpl) GetAccountService() AccountService

func (*FactoryImpl) GetDemoCacheService added in v1.4.0

func (f *FactoryImpl) GetDemoCacheService() DemoCacheService

func (*FactoryImpl) GetRouteService added in v1.4.0

func (f *FactoryImpl) GetRouteService() RouteService

type RouteService

type RouteService interface {
	component.Service
	Apis() resp.Response
}

type RouteServiceImpl added in v1.4.0

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

func (*RouteServiceImpl) Apis added in v1.4.0

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

func (*RouteServiceImpl) Service added in v1.4.0

func (t *RouteServiceImpl) Service() string

Jump to

Keyboard shortcuts

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