Documentation
¶
Overview ¶
Package adminuser implements the admin-side account management subdomain of the identity module: user CRUD, auth methods, devices and login logs. Only the module facade may reach it.
Index ¶
- type BatchDeleteUserLogic
- type CreateUserAuthMethodLogic
- type CreateUserLogic
- type CurrentUserLogic
- type DeleteUserAuthMethodLogic
- type DeleteUserDeviceLogic
- type DeleteUserLogic
- type Deps
- type GetUserAuthMethodLogic
- type GetUserDetailLogic
- type GetUserListLogic
- type GetUserLoginLogsLogic
- type KickOfflineByUserDeviceLogic
- type Service
- func (s *Service) BatchDeleteUser(ctx context.Context, req *dto.BatchDeleteUserRequest) error
- func (s *Service) CreateUser(ctx context.Context, req *dto.CreateUserRequest) error
- func (s *Service) CreateUserAuthMethod(ctx context.Context, req *dto.CreateUserAuthMethodRequest) error
- func (s *Service) CurrentUser(ctx context.Context) (*dto.User, error)
- func (s *Service) DeleteUser(ctx context.Context, req *dto.GetDetailRequest) error
- func (s *Service) DeleteUserAuthMethod(ctx context.Context, req *dto.DeleteUserAuthMethodRequest) error
- func (s *Service) DeleteUserDevice(ctx context.Context, req *dto.DeleteUserDeivceRequest) error
- func (s *Service) GetUserAuthMethod(ctx context.Context, req *dto.GetUserAuthMethodRequest) (*dto.GetUserAuthMethodResponse, error)
- func (s *Service) GetUserDetail(ctx context.Context, req *dto.GetDetailRequest) (*dto.User, error)
- func (s *Service) GetUserList(ctx context.Context, req *dto.GetUserListRequest) (*dto.GetUserListResponse, error)
- func (s *Service) GetUserLoginLogs(ctx context.Context, req *dto.GetUserLoginLogsRequest) (*dto.GetUserLoginLogsResponse, error)
- func (s *Service) KickOfflineByUserDevice(ctx context.Context, req *dto.KickOfflineRequest) error
- func (s *Service) UpdateUserAuthMethod(ctx context.Context, req *dto.UpdateUserAuthMethodRequest) error
- func (s *Service) UpdateUserBasicInfo(ctx context.Context, req *dto.UpdateUserBasiceInfoRequest) error
- func (s *Service) UpdateUserDevice(ctx context.Context, req *dto.UserDevice) error
- func (s *Service) UpdateUserNotifySetting(ctx context.Context, req *dto.UpdateUserNotifySettingRequest) error
- type UpdateUserAuthMethodLogic
- type UpdateUserBasicInfoLogic
- type UpdateUserDeviceLogic
- type UpdateUserNotifySettingLogic
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchDeleteUserLogic ¶
func (*BatchDeleteUserLogic) BatchDeleteUser ¶
func (l *BatchDeleteUserLogic) BatchDeleteUser(req *dto.BatchDeleteUserRequest) error
type CreateUserAuthMethodLogic ¶
func (*CreateUserAuthMethodLogic) CreateUserAuthMethod ¶
func (l *CreateUserAuthMethodLogic) CreateUserAuthMethod(req *dto.CreateUserAuthMethodRequest) error
type CreateUserLogic ¶
func (*CreateUserLogic) CreateUser ¶
func (l *CreateUserLogic) CreateUser(req *dto.CreateUserRequest) error
type CurrentUserLogic ¶
func (*CurrentUserLogic) CurrentUser ¶
func (l *CurrentUserLogic) CurrentUser() (*dto.User, error)
type DeleteUserAuthMethodLogic ¶
func (*DeleteUserAuthMethodLogic) DeleteUserAuthMethod ¶
func (l *DeleteUserAuthMethodLogic) DeleteUserAuthMethod(req *dto.DeleteUserAuthMethodRequest) error
type DeleteUserDeviceLogic ¶
func (*DeleteUserDeviceLogic) DeleteUserDevice ¶
func (l *DeleteUserDeviceLogic) DeleteUserDevice(req *dto.DeleteUserDeivceRequest) error
type DeleteUserLogic ¶
func (*DeleteUserLogic) DeleteUser ¶
func (l *DeleteUserLogic) DeleteUser(req *dto.GetDetailRequest) error
type Deps ¶
type Deps struct {
Users repository.UserRepo
UserAuths repository.UserAuthRepo
Devices repository.UserDeviceRepo
Cache repository.UserCacheRepo
// UserSubs/Plans/Traffic/Logs are read ports onto the subscription,
// network and platform domains for the admin detail views.
UserSubs repository.UserSubscriptionRepo
Plans repository.SubscribeRepo
Traffic repository.TrafficRepo
Logs repository.LogRepo
// Wallet is the read port onto the billing domain: the admin views show
// wallet values from the authoritative table, not the legacy user
// columns (ADR-001 step 5).
Wallet repository.WalletRepo
Store repository.Store
// KickDevice force-disconnects a bound device.
KickDevice func(userID int64, identifier string)
}
type GetUserAuthMethodLogic ¶
func (*GetUserAuthMethodLogic) GetUserAuthMethod ¶
func (l *GetUserAuthMethodLogic) GetUserAuthMethod(req *dto.GetUserAuthMethodRequest) (resp *dto.GetUserAuthMethodResponse, err error)
type GetUserDetailLogic ¶
func (*GetUserDetailLogic) GetUserDetail ¶
func (l *GetUserDetailLogic) GetUserDetail(req *dto.GetDetailRequest) (*dto.User, error)
type GetUserListLogic ¶
func (*GetUserListLogic) GetUserList ¶
func (l *GetUserListLogic) GetUserList(req *dto.GetUserListRequest) (*dto.GetUserListResponse, error)
type GetUserLoginLogsLogic ¶
func (*GetUserLoginLogsLogic) GetUserLoginLogs ¶
func (l *GetUserLoginLogsLogic) GetUserLoginLogs(req *dto.GetUserLoginLogsRequest) (resp *dto.GetUserLoginLogsResponse, err error)
type KickOfflineByUserDeviceLogic ¶
type KickOfflineByUserDeviceLogic struct {
logger.Logger
// contains filtered or unexported fields
}
func (*KickOfflineByUserDeviceLogic) KickOfflineByUserDevice ¶
func (l *KickOfflineByUserDeviceLogic) KickOfflineByUserDevice(req *dto.KickOfflineRequest) error
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) BatchDeleteUser ¶
func (*Service) CreateUser ¶
func (*Service) CreateUserAuthMethod ¶
func (*Service) DeleteUser ¶
func (*Service) DeleteUserAuthMethod ¶
func (*Service) DeleteUserDevice ¶
func (*Service) GetUserAuthMethod ¶
func (s *Service) GetUserAuthMethod(ctx context.Context, req *dto.GetUserAuthMethodRequest) (*dto.GetUserAuthMethodResponse, error)
func (*Service) GetUserDetail ¶
func (*Service) GetUserList ¶
func (s *Service) GetUserList(ctx context.Context, req *dto.GetUserListRequest) (*dto.GetUserListResponse, error)
func (*Service) GetUserLoginLogs ¶
func (s *Service) GetUserLoginLogs(ctx context.Context, req *dto.GetUserLoginLogsRequest) (*dto.GetUserLoginLogsResponse, error)
func (*Service) KickOfflineByUserDevice ¶
func (*Service) UpdateUserAuthMethod ¶
func (*Service) UpdateUserBasicInfo ¶
func (*Service) UpdateUserDevice ¶
func (*Service) UpdateUserNotifySetting ¶
type UpdateUserAuthMethodLogic ¶
func (*UpdateUserAuthMethodLogic) UpdateUserAuthMethod ¶
func (l *UpdateUserAuthMethodLogic) UpdateUserAuthMethod(req *dto.UpdateUserAuthMethodRequest) error
type UpdateUserBasicInfoLogic ¶
func (*UpdateUserBasicInfoLogic) UpdateUserBasicInfo ¶
func (l *UpdateUserBasicInfoLogic) UpdateUserBasicInfo(req *dto.UpdateUserBasiceInfoRequest) error
type UpdateUserDeviceLogic ¶
func (*UpdateUserDeviceLogic) UpdateUserDevice ¶
func (l *UpdateUserDeviceLogic) UpdateUserDevice(req *dto.UserDevice) error
type UpdateUserNotifySettingLogic ¶
type UpdateUserNotifySettingLogic struct {
logger.Logger
// contains filtered or unexported fields
}
func (*UpdateUserNotifySettingLogic) UpdateUserNotifySetting ¶
func (l *UpdateUserNotifySettingLogic) UpdateUserNotifySetting(req *dto.UpdateUserNotifySettingRequest) error
Source Files
¶
- batchdeleteuser.go
- createuser.go
- createuserauthmethod.go
- currentuser.go
- deleteuser.go
- deleteuserauthmethod.go
- deleteuserdevice.go
- getuserauthmethod.go
- getuserdetail.go
- getuserlist.go
- getuserloginlogs.go
- kickofflinebyuserdevice.go
- service.go
- updateuserauthmethod.go
- updateuserbasicinfo.go
- updateuserdevice.go
- updateusernotifysetting.go
Click to show internal directories.
Click to hide internal directories.