repository

package
v0.0.0-...-1f9399d Latest Latest
Warning

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

Go to latest
Published: May 24, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserRepository

type UserRepository struct {
	*sql.DB
}

UserRepository represents the repository for user operations.

func NewUserRepository

func NewUserRepository(db *sql.DB) *UserRepository

NewUserRepository returns a new repository for user operations.

func (*UserRepository) DeleteByID

func (r *UserRepository) DeleteByID(ctx context.Context, id model.UserID) error

DeleteByID deletes a user data by his ID.

func (*UserRepository) FindByEmail

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

FindByEmail finds a user data by his e-mail address.

func (*UserRepository) FindByID

func (r *UserRepository) FindByID(ctx context.Context, id model.UserID) (*model.User, error)

FindByID finds a user data by his ID.

func (*UserRepository) Store

func (r *UserRepository) Store(ctx context.Context, u *model.User) error

Store stores a user data.

Jump to

Keyboard shortcuts

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