Documentation
¶
Index ¶
- func CalculateRemainingAmount(ctx context.Context, svcCtx *svc.ServiceContext, userSubscribeId int64) (int64, error)
- func GetAuthMethod(l *QueryUserAffiliateListLogic, item *user.User) user.AuthMethods
- type BindOAuthCallbackDependencies
- type BindOAuthCallbackLogic
- type BindOAuthLogic
- type BindTelegramLogic
- type CommissionWithdrawLogic
- type GetDeviceListLogic
- type GetLoginLogLogic
- type GetOAuthMethodsLogic
- type GetSubscribeLogLogic
- type OAuthMethodPolicy
- type PreUnsubscribeLogic
- type QueryUserAffiliateListLogic
- type QueryUserAffiliateLogic
- type QueryUserBalanceLogLogic
- type QueryUserCommissionLogLogic
- type QueryUserInfoLogic
- type QueryUserSubscribeLogic
- type QueryWithdrawalLogLogic
- type ResetUserSubscribeTokenLogic
- type UnbindDeviceLogic
- type UnbindOAuthLogic
- type UnbindTelegramLogic
- type UnsubscribeLogic
- type UpdateBindEmailLogic
- type UpdateBindMobileLogic
- type UpdateUserNotifyLogic
- type UpdateUserPasswordLogic
- type UpdateUserRulesLogic
- type UpdateUserSubscribeNoteLogic
- type VerifyEmailLogic
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAuthMethod ¶
func GetAuthMethod(l *QueryUserAffiliateListLogic, item *user.User) user.AuthMethods
Types ¶
type BindOAuthCallbackDependencies ¶ added in v1.14.18
type BindOAuthCallbackDependencies struct {
Auth repository.AuthRepo
UserAuth repository.UserAuthRepo
UserCache repository.UserCacheRepo
Redis *redis.Client
Policy OAuthMethodPolicy
}
BindOAuthCallbackDependencies contains the collaborators required to bind an OAuth identity to the authenticated user. It deliberately excludes ServiceContext and unrelated repositories.
type BindOAuthCallbackLogic ¶
func NewBindOAuthCallbackLogic ¶
func NewBindOAuthCallbackLogic(ctx context.Context, deps BindOAuthCallbackDependencies) *BindOAuthCallbackLogic
Bind OAuth Callback
func (*BindOAuthCallbackLogic) BindOAuthCallback ¶
func (l *BindOAuthCallbackLogic) BindOAuthCallback(req *dto.BindOAuthCallbackRequest) error
type BindOAuthLogic ¶
func NewBindOAuthLogic ¶
func NewBindOAuthLogic(ctx context.Context, svcCtx *svc.ServiceContext) *BindOAuthLogic
Bind OAuth
func (*BindOAuthLogic) BindOAuth ¶
func (l *BindOAuthLogic) BindOAuth(req *dto.BindOAuthRequest) (resp *dto.BindOAuthResponse, err error)
type BindTelegramLogic ¶
func NewBindTelegramLogic ¶
func NewBindTelegramLogic(ctx context.Context, svcCtx *svc.ServiceContext) *BindTelegramLogic
Bind Telegram
func (*BindTelegramLogic) BindTelegram ¶
func (l *BindTelegramLogic) BindTelegram() (resp *dto.BindTelegramResponse, err error)
type CommissionWithdrawLogic ¶ added in v1.2.0
func NewCommissionWithdrawLogic ¶ added in v1.2.0
func NewCommissionWithdrawLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CommissionWithdrawLogic
Commission Withdraw
func (*CommissionWithdrawLogic) CommissionWithdraw ¶ added in v1.2.0
func (l *CommissionWithdrawLogic) CommissionWithdraw(req *dto.CommissionWithdrawRequest) (resp *dto.WithdrawalLog, err error)
type GetDeviceListLogic ¶ added in v1.1.8
func NewGetDeviceListLogic ¶ added in v1.1.8
func NewGetDeviceListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetDeviceListLogic
Get Device List
func (*GetDeviceListLogic) GetDeviceList ¶ added in v1.1.8
func (l *GetDeviceListLogic) GetDeviceList() (resp *dto.GetDeviceListResponse, err error)
type GetLoginLogLogic ¶
func NewGetLoginLogLogic ¶
func NewGetLoginLogLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetLoginLogLogic
Get Login Log
func (*GetLoginLogLogic) GetLoginLog ¶
func (l *GetLoginLogLogic) GetLoginLog(req *dto.GetLoginLogRequest) (resp *dto.GetLoginLogResponse, err error)
type GetOAuthMethodsLogic ¶
func NewGetOAuthMethodsLogic ¶
func NewGetOAuthMethodsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetOAuthMethodsLogic
Get OAuth Methods
func (*GetOAuthMethodsLogic) GetOAuthMethods ¶
func (l *GetOAuthMethodsLogic) GetOAuthMethods() (resp *dto.GetOAuthMethodsResponse, err error)
type GetSubscribeLogLogic ¶
func NewGetSubscribeLogLogic ¶
func NewGetSubscribeLogLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetSubscribeLogLogic
NewGetSubscribeLogLogic Get Subscribe Log
func (*GetSubscribeLogLogic) GetSubscribeLog ¶
func (l *GetSubscribeLogLogic) GetSubscribeLog(req *dto.GetSubscribeLogRequest) (resp *dto.GetSubscribeLogResponse, err error)
type OAuthMethodPolicy ¶ added in v1.14.18
OAuthMethodPolicy checks whether a requested OAuth method is enabled.
type PreUnsubscribeLogic ¶
func NewPreUnsubscribeLogic ¶
func NewPreUnsubscribeLogic(ctx context.Context, svcCtx *svc.ServiceContext) *PreUnsubscribeLogic
NewPreUnsubscribeLogic Pre Unsubscribe
func (*PreUnsubscribeLogic) PreUnsubscribe ¶
func (l *PreUnsubscribeLogic) PreUnsubscribe(req *dto.PreUnsubscribeRequest) (resp *dto.PreUnsubscribeResponse, err error)
type QueryUserAffiliateListLogic ¶
func NewQueryUserAffiliateListLogic ¶
func NewQueryUserAffiliateListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *QueryUserAffiliateListLogic
Query User Affiliate List
func (*QueryUserAffiliateListLogic) QueryUserAffiliateList ¶
func (l *QueryUserAffiliateListLogic) QueryUserAffiliateList(req *dto.QueryUserAffiliateListRequest) (resp *dto.QueryUserAffiliateListResponse, err error)
type QueryUserAffiliateLogic ¶
func NewQueryUserAffiliateLogic ¶
func NewQueryUserAffiliateLogic(ctx context.Context, svcCtx *svc.ServiceContext) *QueryUserAffiliateLogic
Query User Balance Log
func (*QueryUserAffiliateLogic) QueryUserAffiliate ¶
func (l *QueryUserAffiliateLogic) QueryUserAffiliate() (resp *dto.QueryUserAffiliateCountResponse, err error)
type QueryUserBalanceLogLogic ¶
func NewQueryUserBalanceLogLogic ¶
func NewQueryUserBalanceLogLogic(ctx context.Context, svcCtx *svc.ServiceContext) *QueryUserBalanceLogLogic
NewQueryUserBalanceLogLogic Query User Balance Log
func (*QueryUserBalanceLogLogic) QueryUserBalanceLog ¶
func (l *QueryUserBalanceLogLogic) QueryUserBalanceLog() (resp *dto.QueryUserBalanceLogListResponse, err error)
type QueryUserCommissionLogLogic ¶
func NewQueryUserCommissionLogLogic ¶
func NewQueryUserCommissionLogLogic(ctx context.Context, svcCtx *svc.ServiceContext) *QueryUserCommissionLogLogic
Query User Commission Log
func (*QueryUserCommissionLogLogic) QueryUserCommissionLog ¶
func (l *QueryUserCommissionLogLogic) QueryUserCommissionLog(req *dto.QueryUserCommissionLogListRequest) (resp *dto.QueryUserCommissionLogListResponse, err error)
type QueryUserInfoLogic ¶
func NewQueryUserInfoLogic ¶
func NewQueryUserInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *QueryUserInfoLogic
Query User Info
func (*QueryUserInfoLogic) QueryUserInfo ¶
func (l *QueryUserInfoLogic) QueryUserInfo() (resp *dto.User, err error)
type QueryUserSubscribeLogic ¶
func NewQueryUserSubscribeLogic ¶
func NewQueryUserSubscribeLogic(ctx context.Context, svcCtx *svc.ServiceContext) *QueryUserSubscribeLogic
Query User Subscribe
func (*QueryUserSubscribeLogic) QueryUserSubscribe ¶
func (l *QueryUserSubscribeLogic) QueryUserSubscribe() (resp *dto.QueryUserSubscribeListResponse, err error)
type QueryWithdrawalLogLogic ¶ added in v1.2.0
func NewQueryWithdrawalLogLogic ¶ added in v1.2.0
func NewQueryWithdrawalLogLogic(ctx context.Context, svcCtx *svc.ServiceContext) *QueryWithdrawalLogLogic
NewQueryWithdrawalLogLogic Query Withdrawal Log
func (*QueryWithdrawalLogLogic) QueryWithdrawalLog ¶ added in v1.2.0
func (l *QueryWithdrawalLogLogic) QueryWithdrawalLog(req *dto.QueryWithdrawalLogListRequest) (resp *dto.QueryWithdrawalLogListResponse, err error)
type ResetUserSubscribeTokenLogic ¶
type ResetUserSubscribeTokenLogic struct {
logger.Logger
// contains filtered or unexported fields
}
func NewResetUserSubscribeTokenLogic ¶
func NewResetUserSubscribeTokenLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ResetUserSubscribeTokenLogic
NewResetUserSubscribeTokenLogic Reset User Subscribe Token
func (*ResetUserSubscribeTokenLogic) ResetUserSubscribeToken ¶
func (l *ResetUserSubscribeTokenLogic) ResetUserSubscribeToken(req *dto.ResetUserSubscribeTokenRequest) error
type UnbindDeviceLogic ¶ added in v1.1.8
func NewUnbindDeviceLogic ¶ added in v1.1.8
func NewUnbindDeviceLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UnbindDeviceLogic
Unbind Device
func (*UnbindDeviceLogic) UnbindDevice ¶ added in v1.1.8
func (l *UnbindDeviceLogic) UnbindDevice(req *dto.UnbindDeviceRequest) error
type UnbindOAuthLogic ¶
func NewUnbindOAuthLogic ¶
func NewUnbindOAuthLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UnbindOAuthLogic
Unbind OAuth
func (*UnbindOAuthLogic) UnbindOAuth ¶
func (l *UnbindOAuthLogic) UnbindOAuth(req *dto.UnbindOAuthRequest) error
type UnbindTelegramLogic ¶
func NewUnbindTelegramLogic ¶
func NewUnbindTelegramLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UnbindTelegramLogic
Unbind Telegram
func (*UnbindTelegramLogic) UnbindTelegram ¶
func (l *UnbindTelegramLogic) UnbindTelegram() error
type UnsubscribeLogic ¶
func NewUnsubscribeLogic ¶
func NewUnsubscribeLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UnsubscribeLogic
NewUnsubscribeLogic creates a new instance of UnsubscribeLogic for handling subscription cancellation
func (*UnsubscribeLogic) Unsubscribe ¶
func (l *UnsubscribeLogic) Unsubscribe(req *dto.UnsubscribeRequest) error
Unsubscribe handles the subscription cancellation process with proper refund distribution It prioritizes refunding to gift amount for balance-paid orders, then to regular balance
type UpdateBindEmailLogic ¶
func NewUpdateBindEmailLogic ¶
func NewUpdateBindEmailLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateBindEmailLogic
NewUpdateBindEmailLogic Update Bind Email
func (*UpdateBindEmailLogic) UpdateBindEmail ¶
func (l *UpdateBindEmailLogic) UpdateBindEmail(req *dto.UpdateBindEmailRequest) error
type UpdateBindMobileLogic ¶
func NewUpdateBindMobileLogic ¶
func NewUpdateBindMobileLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateBindMobileLogic
Update Bind Mobile
func (*UpdateBindMobileLogic) UpdateBindMobile ¶
func (l *UpdateBindMobileLogic) UpdateBindMobile(req *dto.UpdateBindMobileRequest) error
type UpdateUserNotifyLogic ¶
func NewUpdateUserNotifyLogic ¶
func NewUpdateUserNotifyLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateUserNotifyLogic
Update User Notify
func (*UpdateUserNotifyLogic) UpdateUserNotify ¶
func (l *UpdateUserNotifyLogic) UpdateUserNotify(req *dto.UpdateUserNotifyRequest) error
type UpdateUserPasswordLogic ¶
func NewUpdateUserPasswordLogic ¶
func NewUpdateUserPasswordLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateUserPasswordLogic
Update User Password
func (*UpdateUserPasswordLogic) UpdateUserPassword ¶
func (l *UpdateUserPasswordLogic) UpdateUserPassword(req *dto.UpdateUserPasswordRequest) error
type UpdateUserRulesLogic ¶ added in v1.2.0
func NewUpdateUserRulesLogic ¶ added in v1.2.0
func NewUpdateUserRulesLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateUserRulesLogic
NewUpdateUserRulesLogic Update User Rules
func (*UpdateUserRulesLogic) UpdateUserRules ¶ added in v1.2.0
func (l *UpdateUserRulesLogic) UpdateUserRules(req *dto.UpdateUserRulesRequest) error
type UpdateUserSubscribeNoteLogic ¶ added in v1.2.0
type UpdateUserSubscribeNoteLogic struct {
logger.Logger
// contains filtered or unexported fields
}
func NewUpdateUserSubscribeNoteLogic ¶ added in v1.2.0
func NewUpdateUserSubscribeNoteLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateUserSubscribeNoteLogic
NewUpdateUserSubscribeNoteLogic Update User Subscribe Note
func (*UpdateUserSubscribeNoteLogic) UpdateUserSubscribeNote ¶ added in v1.2.0
func (l *UpdateUserSubscribeNoteLogic) UpdateUserSubscribeNote(req *dto.UpdateUserSubscribeNoteRequest) error
type VerifyEmailLogic ¶
func NewVerifyEmailLogic ¶
func NewVerifyEmailLogic(ctx context.Context, svcCtx *svc.ServiceContext) *VerifyEmailLogic
Verify Email
func (*VerifyEmailLogic) VerifyEmail ¶
func (l *VerifyEmailLogic) VerifyEmail(req *dto.VerifyEmailRequest) error
Source Files
¶
- bindOAuthCallbackDependencies.go
- bindOAuthCallbackLogic.go
- bindOAuthLogic.go
- bindTelegramLogic.go
- calculateRemainingAmount.go
- commissionWithdrawLogic.go
- getDeviceListLogic.go
- getLoginLogLogic.go
- getOAuthMethodsLogic.go
- getSubscribeLogLogic.go
- preUnsubscribeLogic.go
- queryUserAffiliateListLogic.go
- queryUserAffiliateLogic.go
- queryUserBalanceLogLogic.go
- queryUserCommissionLogLogic.go
- queryUserInfoLogic.go
- queryUserSubscribeLogic.go
- queryWithdrawalLogLogic.go
- resetUserSubscribeTokenLogic.go
- unbindDeviceLogic.go
- unbindOAuthLogic.go
- unbindTelegramLogic.go
- unsubscribeLogic.go
- updateBindEmailLogic.go
- updateBindMobileLogic.go
- updateUserNotifyLogic.go
- updateUserPasswordLogic.go
- updateUserRulesLogic.go
- updateUserSubscribeNoteLogic.go
- verifyEmailLogic.go