usersqldb

package
v0.0.0-...-e400c07 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store manages the set of APIs for user database access.

func NewStore

func NewStore(log *logger.Logger, db *sqlx.DB) *Store

NewStore constructs the api for data access.

func (*Store) Create

func (s *Store) Create(ctx context.Context, usr user.User) (sql.Result, error)

Create inserts a new user into the database.

func (*Store) Delete

func (s *Store) Delete(ctx context.Context, usr user.User) error

Delete removes a user from the database.

func (*Store) QueryByEmail

func (s *Store) QueryByEmail(ctx context.Context, email mail.Address) (user.User, error)

QueryByEmail gets the specified user from the database by email.

Jump to

Keyboard shortcuts

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