Versions in this module Expand all Collapse all v1 v1.0.1 Nov 30, 2024 v1.0.0 Nov 17, 2024 Changes in this version + type Account struct + CreatedAt time.Time + Email string + EmailProviderHash string + ID string + Name string + Provider string + Role string + func (a *Account) ToJSON() (string, error) + type AccountsClient struct + func NewAccountsClient(kv *dragonfly.DragonflyClient, db *postgres.PostgresClient, ...) *AccountsClient + func (ac *AccountsClient) Create2FA(ctx context.Context, email string, provider string, secret string) error + func (ac *AccountsClient) CreateAccount(ctx context.Context, name string, role string, email string, provider string) (bool, error) + func (ac *AccountsClient) Delete2FA(ctx context.Context, email string, provider string) error + func (ac *AccountsClient) Generate2FA(ctx context.Context, email string, provider string) (*Generated2FA, error) + func (ac *AccountsClient) Get2FA(ctx context.Context, email string, provider string) (*TwoFactor, error) + func (ac *AccountsClient) GetAccount(ctx context.Context, email string, provider string) (*Account, error) + func (ac *AccountsClient) Update2FA(ctx context.Context, email string, provider string, enabled bool) error + func (ac *AccountsClient) Validate2FASecretCode(ctx context.Context, secret string, code string) (bool, error) + func (ac *AccountsClient) Verify2FA(ctx context.Context, email string, provider string, code string) (bool, error) + type Generated2FA struct + Image []byte + Secret string + type TwoFactor struct + CreatedAt time.Time + Enabled bool + ID string + ParentAccountHash string + Secret string