fair

package
v0.0.0-...-4778f52 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FairRepository

type FairRepository interface {
	GetByID(fairID int64) (entity.Fair, error)
	DeleteByID(fairID int64) error
	Save(fair entity.Fair) (int64, error)
	Update(id int64, fair entity.Fair) error
	GetByQueryID(filters entity.Filter) ([]entity.Fair, error)
	AlreadyAnID(userID int64) (bool, error)
}

type Repository

type Repository struct {
	DB *sqlx.DB
}

func NewRepository

func NewRepository(db *sqlx.DB) (*Repository, error)

func (*Repository) AlreadyAnID

func (repo *Repository) AlreadyAnID(userID int64) (bool, error)

func (*Repository) DeleteByID

func (repo *Repository) DeleteByID(fairID int64) error

func (*Repository) GetByID

func (repo *Repository) GetByID(fairID int64) (entity.Fair, error)

func (*Repository) GetByQueryID

func (repo *Repository) GetByQueryID(filters entity.Filter) ([]entity.Fair, error)

func (*Repository) Save

func (repo *Repository) Save(fair entity.Fair) (int64, error)

func (*Repository) Update

func (repo *Repository) Update(id int64, fair entity.Fair) error

Jump to

Keyboard shortcuts

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