db

package
v0.0.0-...-314964c Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsErrRecordNotFound

func IsErrRecordNotFound(err error) bool

Types

type DatabaseHandler

type DatabaseHandler interface {
	IsInDatabase(id uint) bool
	Create(job *models.JobEntity) error
	Delete(id uint) error
	Update(job *models.JobEntity) error
	GetOneById(id uint) (*models.JobEntity, error)
	GetLatest20Jobs() ([]models.JobEntity, error)
}

func NewMysqlDatabaseHandler

func NewMysqlDatabaseHandler() DatabaseHandler

type MysqlDatabaseRepository

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

func (*MysqlDatabaseRepository) Create

func (mysqlDatabaseHandler *MysqlDatabaseRepository) Create(job *models.JobEntity) error

func (*MysqlDatabaseRepository) Delete

func (m *MysqlDatabaseRepository) Delete(id uint) error

func (*MysqlDatabaseRepository) GetLatest20Jobs

func (m *MysqlDatabaseRepository) GetLatest20Jobs() ([]models.JobEntity, error)

func (*MysqlDatabaseRepository) GetOneById

func (m *MysqlDatabaseRepository) GetOneById(id uint) (*models.JobEntity, error)

func (*MysqlDatabaseRepository) IsInDatabase

func (mysqlDatabaseHandler *MysqlDatabaseRepository) IsInDatabase(id uint) bool

func (*MysqlDatabaseRepository) Update

func (mysqlDatabaseHandler *MysqlDatabaseRepository) Update(job *models.JobEntity) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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