sqlstore

package
v0.0.0-...-a35c77e Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestDB

func TestDB(t *testing.T, databaseURL string) (*sql.DB, func(...string))

Types

type Store

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

func New

func New(db *sql.DB) *Store

func (*Store) Close

func (s *Store) Close()

func (*Store) User

func (s *Store) User() store.UserRepository

type UserRepository

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

func (*UserRepository) Create

func (r *UserRepository) Create(u *model.User) error

func (*UserRepository) FindByEmail

func (r *UserRepository) FindByEmail(email string) (*model.User, error)

func (*UserRepository) FindById

func (r *UserRepository) FindById(id int) (*model.User, error)

Jump to

Keyboard shortcuts

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