Documentation ¶
Index ¶
- type AccountService
- type AccountServiceImpl
- func (r *AccountServiceImpl) GetAllUsers(ctx context.Context) ([]*dto.AccountDTO, error)
- func (r *AccountServiceImpl) GetUserById(ctx context.Context, username string) (*dto.AccountDTO, error)
- func (r *AccountServiceImpl) SaveUser(ctx context.Context, username string, account *dto.AccountDTO) (resp.Response, error)
- type Api
- type ControllerModel
- type DemoCacheService
- type DemoCacheServiceImpl
- type Factory
- type FactoryImpl
- type Param
- type RouteService
- type RouteServiceImpl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountService ¶ added in v1.3.7
type AccountServiceImpl ¶ added in v1.3.7
type AccountServiceImpl struct { types.Service `service:"AccountService"` Log log.Logger `wire:""` repository.Factory `wire:"repository_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)
type ControllerModel ¶
type DemoCacheService ¶
type DemoCacheServiceImpl ¶ added in v1.4.0
type DemoCacheServiceImpl struct { types.Service `service:"DemoCacheService"` Cache cache.ICache `wire:""` //使用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{}
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 { types.Component `name:"service_factory"` AccountService AccountService `wire:""` DemoCacheService DemoCacheService `wire:""` RouteService RouteService `wire:""` }
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 RouteServiceImpl ¶ added in v1.4.0
type RouteServiceImpl struct { types.Service `service:"RouteService"` Controllers []web.Controller `wire:""` //使用切片接口类型注入所有实现类 AppName string `value:"application.app_name"` //使用value标签实现配置文件注入 }
func (*RouteServiceImpl) Apis ¶ added in v1.4.0
func (t *RouteServiceImpl) Apis() resp.Response
Click to show internal directories.
Click to hide internal directories.