repository

package
v0.0.0-...-b88e834 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository struct {
	User
}

func NewRepository

func NewRepository(db *sqlx.DB) *Repository

type User

type User interface {
	CreateUser(user entity.User) (int, error)
	GetUserByEmail(email string) (entity.User, error)
	GetUserById(id int) (entity.User, error)
	GetAll() ([]entity.User, error)
}

type UserRepository

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

func NewUserRepository

func NewUserRepository(db *sqlx.DB) *UserRepository

func (*UserRepository) CreateUser

func (r *UserRepository) CreateUser(user entity.User) (int, error)

func (*UserRepository) GetAll

func (r *UserRepository) GetAll() ([]entity.User, error)

func (*UserRepository) GetUserByEmail

func (r *UserRepository) GetUserByEmail(email string) (entity.User, error)

func (*UserRepository) GetUserById

func (r *UserRepository) GetUserById(id int) (entity.User, error)

Jump to

Keyboard shortcuts

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