Documentation ¶
Index ¶
- Variables
- func WithKeyValueService(keyValueService userland.KeyValueService) func(service *service)
- func WithMailingClient(mailingClient mailing.Client) func(service *service)
- func WithObjectStorageService(objectStorageService userland.ObjectStorageService) func(service *service)
- func WithUserRepository(userRepository userland.UserRepository) func(service *service)
- type Service
Constants ¶
This section is empty.
Variables ¶
View Source
var ( EventChangeEmailRequest = "user.profile.change_email_request" EventChangeEmail = "user.profile.change_email" EventChangePassword = "user.profile.change_password" EventEnableTFA = "user.profile.enable_tfa" EventDisableTFA = "user.profile.disable_tfa" ErrEmailAlreadyUsed = errors.New("Email is already used") ErrWrongPassword = errors.New("Wrong password") ErrTFAAlreadyEnabled = errors.New("TFA already enabled") ErrWrongOTP = errors.New("Wrong OTP") )
View Source
var (
MetricKeys = []string{"method"}
)
Functions ¶
func WithKeyValueService ¶
func WithKeyValueService(keyValueService userland.KeyValueService) func(service *service)
func WithMailingClient ¶
func WithObjectStorageService ¶
func WithObjectStorageService(objectStorageService userland.ObjectStorageService) func(service *service)
func WithUserRepository ¶
func WithUserRepository(userRepository userland.UserRepository) func(service *service)
Types ¶
type Service ¶
type Service interface { ProfileByEmail(email string) (userland.User, error) Profile(userID int) (userland.User, error) SetProfile(user userland.User) error SetProfilePicture(user userland.User, image io.Reader) error RequestChangeEmail(user userland.User, newEmail string) (verificationID string, err error) ChangeEmail(user userland.User, verificationID string) error ChangePassword(user userland.User, oldPassword, newPassword string) error EnrollTFA(user userland.User) (secret string, qrcodeImageBase64 string, err error) ActivateTFA(user userland.User, secret string, code string) ([]string, error) RemoveTFA(user userland.User, currPassword string) error DeleteAccount(user userland.User, currPassword string) error }
Service provide an interface to story domain service
func NewInstrumentorService ¶
func NewService ¶
func NewService(options ...func(*service)) Service
Click to show internal directories.
Click to hide internal directories.