Documentation ¶
Index ¶
- func TestRepo(ctx context.Context, t *testing.T, newRepo func() ReadWriter)
- type Config
- func (c *Config) ChangeFacebookSignInAppID(appID FacebookAppID)
- func (c *Config) ChangeFacebookSignInAppSecret(appSecret FacebookAppSecret)
- func (c *Config) ChangeGoogleSignInClientID(clientID GoogleClientID)
- func (c *Config) ChangeResendAPI(apiKey ResendAPIKey)
- func (c *Config) ChangeSecurityEmail(securityEmail Email)
- func (c *Config) ChangeSystemEmail(systemEmail Email)
- func (c *Config) ChangeTwilioAPI(twilioSID TwilioSID, twilioToken TwilioToken, twilioFromTel TwilioTel)
- func (c *Config) DisableFacebookSignIn()
- func (c *Config) DisableGoogleSignIn()
- func (c *Config) DisableMagicLinkSignIn()
- func (c *Config) DisableSignUp()
- func (c *Config) DisableSignUpAutoActivate()
- func (c *Config) DisableTOTPRequired()
- func (c *Config) DisableTOTPSMS()
- func (c *Config) EnableFacebookSignIn() error
- func (c *Config) EnableGoogleSignIn() error
- func (c *Config) EnableMagicLinkSignIn()
- func (c *Config) EnableSignUp()
- func (c *Config) EnableSignUpAutoActivate()
- func (c *Config) EnableTOTPRequired()
- func (c *Config) EnableTOTPSMS() error
- func (c *Config) HasSMS() bool
- type Email
- type FacebookAppID
- type FacebookAppSecret
- type GoogleClientID
- type ReadWriter
- type Reader
- type ResendAPIKey
- type Service
- func (s *Service) UpdateConfig(ctx context.Context, guard UpdateConfigGuard, ...) (*Config, error)
- func (s *Service) UpdateConfigValidate(guard UpdateConfigGuard, systemEmail, securityEmail string, ...) (UpdateConfigInput, error)
- func (s *Service) UpdateEmails(ctx context.Context, guard UpdateEmailsGuard, ...) (*Config, error)
- func (s *Service) UpdateEmailsValidate(guard UpdateEmailsGuard, systemEmail, securityEmail string) (UpdateEmailsInput, error)
- type TwilioSID
- type TwilioTel
- type TwilioToken
- type UpdateConfigGuard
- type UpdateConfigInput
- type UpdateEmailsGuard
- type UpdateEmailsInput
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { aggregate.Root SystemEmail string SecurityEmail string SignUpEnabled bool SignUpAutoActivateEnabled bool TOTPRequired bool TOTPSMSEnabled bool MagicLinkSignInEnabled bool GoogleSignInEnabled bool GoogleSignInClientID string FacebookSignInEnabled bool FacebookSignInAppID string FacebookSignInAppSecret string ResendAPIKey string TwilioSID string TwilioToken string TwilioFromTel string SetupRequired bool }
func (*Config) ChangeFacebookSignInAppID ¶
func (c *Config) ChangeFacebookSignInAppID(appID FacebookAppID)
func (*Config) ChangeFacebookSignInAppSecret ¶
func (c *Config) ChangeFacebookSignInAppSecret(appSecret FacebookAppSecret)
func (*Config) ChangeGoogleSignInClientID ¶
func (c *Config) ChangeGoogleSignInClientID(clientID GoogleClientID)
func (*Config) ChangeResendAPI ¶
func (c *Config) ChangeResendAPI(apiKey ResendAPIKey)
func (*Config) ChangeSecurityEmail ¶
func (*Config) ChangeSystemEmail ¶
func (*Config) ChangeTwilioAPI ¶
func (c *Config) ChangeTwilioAPI(twilioSID TwilioSID, twilioToken TwilioToken, twilioFromTel TwilioTel)
func (*Config) DisableFacebookSignIn ¶
func (c *Config) DisableFacebookSignIn()
func (*Config) DisableGoogleSignIn ¶
func (c *Config) DisableGoogleSignIn()
func (*Config) DisableMagicLinkSignIn ¶
func (c *Config) DisableMagicLinkSignIn()
func (*Config) DisableSignUp ¶
func (c *Config) DisableSignUp()
func (*Config) DisableSignUpAutoActivate ¶
func (c *Config) DisableSignUpAutoActivate()
func (*Config) DisableTOTPRequired ¶
func (c *Config) DisableTOTPRequired()
func (*Config) DisableTOTPSMS ¶
func (c *Config) DisableTOTPSMS()
func (*Config) EnableFacebookSignIn ¶
func (*Config) EnableGoogleSignIn ¶
func (*Config) EnableMagicLinkSignIn ¶
func (c *Config) EnableMagicLinkSignIn()
func (*Config) EnableSignUp ¶
func (c *Config) EnableSignUp()
func (*Config) EnableSignUpAutoActivate ¶
func (c *Config) EnableSignUpAutoActivate()
func (*Config) EnableTOTPRequired ¶
func (c *Config) EnableTOTPRequired()
func (*Config) EnableTOTPSMS ¶
type FacebookAppID ¶
type FacebookAppID string
func NewFacebookAppID ¶
func NewFacebookAppID(id string) (FacebookAppID, error)
func (FacebookAppID) String ¶
func (e FacebookAppID) String() string
type FacebookAppSecret ¶
type FacebookAppSecret string
func NewFacebookAppSecret ¶
func NewFacebookAppSecret(secret string) (FacebookAppSecret, error)
func (FacebookAppSecret) String ¶
func (e FacebookAppSecret) String() string
type GoogleClientID ¶
type GoogleClientID string
func NewGoogleClientID ¶
func NewGoogleClientID(id string) (GoogleClientID, error)
func (GoogleClientID) String ¶
func (e GoogleClientID) String() string
type ReadWriter ¶
type ResendAPIKey ¶
type ResendAPIKey string
func NewResendAPIKey ¶
func NewResendAPIKey(apiKey string) (ResendAPIKey, error)
func (ResendAPIKey) String ¶
func (e ResendAPIKey) String() string
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(broker event.Broker, repo ReadWriter) (*Service, error)
func (*Service) UpdateConfig ¶
func (s *Service) UpdateConfig(ctx context.Context, guard UpdateConfigGuard, systemEmail, securityEmail string, signUpEnabled, signUpAutoActivateEnabled bool, totpRequired, totpSMSEnabled bool, magicLinkSignInEnabled bool, googleSignInEnabled bool, googleSignInClientID string, facebookSignInEnabled bool, facebookSignInAppID, facebookSignInAppSecret string, resendAPIKey string, twilioSID, twilioToken, twilioFromTel string, ) (*Config, error)
func (*Service) UpdateConfigValidate ¶
func (s *Service) UpdateConfigValidate( guard UpdateConfigGuard, systemEmail, securityEmail string, signUpEnabled, signUpAutoActivateEnabled bool, totpRequired, totpSMSEnabled bool, magicLinkSignInEnabled bool, googleSignInEnabled bool, googleSignInClientID string, facebookSignInEnabled bool, facebookSignInAppID, facebookSignInAppSecret string, resendAPIKey string, twilioSID, twilioToken, twilioFromTel string, ) (UpdateConfigInput, error)
func (*Service) UpdateEmails ¶
func (*Service) UpdateEmailsValidate ¶
func (s *Service) UpdateEmailsValidate(guard UpdateEmailsGuard, systemEmail, securityEmail string) (UpdateEmailsInput, error)
type TwilioToken ¶
type TwilioToken string
func NewTwilioToken ¶
func NewTwilioToken(token string) (TwilioToken, error)
func (TwilioToken) String ¶
func (e TwilioToken) String() string
type UpdateConfigGuard ¶
type UpdateConfigGuard interface {
CanUpdateConfig() bool
}
type UpdateConfigInput ¶
type UpdateConfigInput struct { SystemEmail Email SecurityEmail Email SignUpEnabled bool SignUpAutoActivateEnabled bool TOTPRequired bool TOTPSMSEnabled bool MagicLinkSignInEnabled bool GoogleSignInEnabled bool GoogleSignInClientID GoogleClientID FacebookSignInEnabled bool FacebookSignInAppID FacebookAppID FacebookSignInAppSecret FacebookAppSecret ResendAPIKey ResendAPIKey TwilioSID TwilioSID TwilioToken TwilioToken TwilioFromTel TwilioTel }
type UpdateEmailsGuard ¶
type UpdateEmailsGuard interface {
CanUpdateEmails() bool
}
type UpdateEmailsInput ¶
Click to show internal directories.
Click to hide internal directories.