defaultstore

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package defaultstore implements the SQL-backed default store for the emailotp plugin.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultEmailOTPStore

type DefaultEmailOTPStore struct {
	// contains filtered or unexported fields
}

DefaultEmailOTPStore implements emailotptypes.Store using a SQL database.

func NewDefaultEmailOTPStore

func NewDefaultEmailOTPStore(db *sql.DB, dialect plugins.Dialect) (*DefaultEmailOTPStore, error)

NewDefaultEmailOTPStore creates a DefaultEmailOTPStore for the given dialect.

func (*DefaultEmailOTPStore) CreateUser

CreateUser creates a new user in the store and returns the created user.

func (*DefaultEmailOTPStore) GetUserByEmail

func (s *DefaultEmailOTPStore) GetUserByEmail(ctx context.Context, email string) (*emailotptypes.User, error)

GetUserByEmail retrieves a user by their email address.

func (*DefaultEmailOTPStore) UpdateUserEmail

func (s *DefaultEmailOTPStore) UpdateUserEmail(ctx context.Context, userID, email string, verified bool) error

UpdateUserEmail updates the email address and verification status for a user.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL