repos

package
v0.0.0-...-9834320 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PlantRepo

type PlantRepo interface {
	SavePlant(plant models.Plant) (models.Plant, error)
	GetPlantByName(name string) (models.Plant, error)
	GetAllPlants() ([]models.Plant, error)
}

type SpecimenRepo

type SpecimenRepo interface {
	SaveSpecimen(speciment models.Specimen) (models.Specimen, error)
	GetSpecimenById(id uint32) (models.Specimen, error)
	GetAllSpecimensForTheYear() ([]models.Specimen, error)
	UpdateSpecimen(updatedSpecimen models.Specimen) (models.Specimen, error)
}

type SqlPlantRepo

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

func CreateSqlPlantRepo

func CreateSqlPlantRepo(database *sql.DB) SqlPlantRepo

func (SqlPlantRepo) GetAllPlants

func (self SqlPlantRepo) GetAllPlants() ([]models.Plant, error)

func (SqlPlantRepo) GetPlantByName

func (self SqlPlantRepo) GetPlantByName(name string) (models.Plant, error)

func (SqlPlantRepo) SavePlant

func (self SqlPlantRepo) SavePlant(plant models.Plant) (models.Plant, error)

type SqlSpecimenRepo

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

func CreateRepo

func CreateRepo(database *sql.DB) SqlSpecimenRepo

func (SqlSpecimenRepo) GetAllSpecimensForTheYear

func (self SqlSpecimenRepo) GetAllSpecimensForTheYear() ([]models.Specimen, error)

func (SqlSpecimenRepo) GetSpecimenById

func (self SqlSpecimenRepo) GetSpecimenById(id uint32) (models.Specimen, error)

func (SqlSpecimenRepo) SaveSpecimen

func (self SqlSpecimenRepo) SaveSpecimen(specimen models.Specimen) (models.Specimen, error)

func (SqlSpecimenRepo) UpdateSpecimen

func (self SqlSpecimenRepo) UpdateSpecimen(updatedSpecimen models.Specimen) (models.Specimen, error)

Jump to

Keyboard shortcuts

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