Documentation ¶
Index ¶
- type UserNotificationConfigRepo
- type UserNotificationConfigService
- func (us *UserNotificationConfigService) GetUserNotificationConfig(ctx context.Context, userID string) (resp *schema.GetUserNotificationConfigResp, err error)
- func (us *UserNotificationConfigService) SetDefaultUserNotificationConfig(ctx context.Context, userIDs []string) (err error)
- func (us *UserNotificationConfigService) UpdateUserNotificationConfig(ctx context.Context, req *schema.UpdateUserNotificationConfigReq) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserNotificationConfigRepo ¶
type UserNotificationConfigRepo interface { Add(ctx context.Context, userIDs []string, source, channels string) (err error) Save(ctx context.Context, uc *entity.UserNotificationConfig) (err error) GetByUserID(ctx context.Context, userID string) ([]*entity.UserNotificationConfig, error) GetBySource(ctx context.Context, source constant.NotificationSource) ([]*entity.UserNotificationConfig, error) GetByUserIDAndSource(ctx context.Context, userID string, source constant.NotificationSource) ( conf *entity.UserNotificationConfig, exist bool, err error) GetByUsersAndSource(ctx context.Context, userIDs []string, source constant.NotificationSource) ( []*entity.UserNotificationConfig, error) }
type UserNotificationConfigService ¶
type UserNotificationConfigService struct {
// contains filtered or unexported fields
}
func NewUserNotificationConfigService ¶
func NewUserNotificationConfigService( userRepo usercommon.UserRepo, userNotificationConfigRepo UserNotificationConfigRepo, ) *UserNotificationConfigService
func (*UserNotificationConfigService) GetUserNotificationConfig ¶
func (us *UserNotificationConfigService) GetUserNotificationConfig(ctx context.Context, userID string) ( resp *schema.GetUserNotificationConfigResp, err error)
func (*UserNotificationConfigService) SetDefaultUserNotificationConfig ¶
func (us *UserNotificationConfigService) SetDefaultUserNotificationConfig(ctx context.Context, userIDs []string) ( err error)
SetDefaultUserNotificationConfig set default user notification config for user register
func (*UserNotificationConfigService) UpdateUserNotificationConfig ¶
func (us *UserNotificationConfigService) UpdateUserNotificationConfig( ctx context.Context, req *schema.UpdateUserNotificationConfigReq) (err error)
Click to show internal directories.
Click to hide internal directories.