repository

package
v0.0.0-...-099e52b Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 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 AnimalRepository

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

func (*AnimalRepository) CreateAnimal

func (r *AnimalRepository) CreateAnimal(animal entity.Animal) error

func (*AnimalRepository) GetByID

func (r *AnimalRepository) GetByID(id uuid.UUID) (entity.Animal, error)

func (*AnimalRepository) GetBySpecies

func (r *AnimalRepository) GetBySpecies(speciesID string) ([]entity.Animal, error)

type AuthRepository

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

func (*AuthRepository) Create

func (r *AuthRepository) Create(user *entity.User) error

func (*AuthRepository) FindByEmail

func (r *AuthRepository) FindByEmail(email string) (entity.User, error)

type IAnimalRepository

type IAnimalRepository interface {
	CreateAnimal(animal entity.Animal) error
	GetByID(id uuid.UUID) (entity.Animal, error)
	GetBySpecies(speciesID string) ([]entity.Animal, error)
}

func NewAnimalRepository

func NewAnimalRepository(db *gorm.DB) IAnimalRepository

type IAuthRepository

type IAuthRepository interface {
	Create(user *entity.User) error
	FindByEmail(email string) (entity.User, error)
}

func NewAuthRepository

func NewAuthRepository(db *gorm.DB) IAuthRepository

type IReportRepository

type IReportRepository interface {
	Create(report entity.Report) error
	GetByID(id uuid.UUID) (entity.Report, error)
	GetByAnimalID(animalID uuid.UUID) ([]entity.Report, error)
	GetByUserID(userID uuid.UUID) ([]entity.Report, error)
	Approve(id uuid.UUID) error
}

func NewReportRepository

func NewReportRepository(db *gorm.DB) IReportRepository

type ISpeciesRepository

type ISpeciesRepository interface {
	CreateSpecies(species entity.Species) error
	GetByID(id string) (entity.Species, error)
	GetAll() ([]entity.Species, error)
}

func NewSpeciesRepository

func NewSpeciesRepository(db *gorm.DB) ISpeciesRepository

type ReportRepository

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

func (*ReportRepository) Approve

func (r *ReportRepository) Approve(id uuid.UUID) error

func (*ReportRepository) Create

func (r *ReportRepository) Create(report entity.Report) error

func (*ReportRepository) GetByAnimalID

func (r *ReportRepository) GetByAnimalID(animalID uuid.UUID) ([]entity.Report, error)

func (*ReportRepository) GetByID

func (r *ReportRepository) GetByID(id uuid.UUID) (entity.Report, error)

func (*ReportRepository) GetByUserID

func (r *ReportRepository) GetByUserID(userID uuid.UUID) ([]entity.Report, error)

type SpeciesRepository

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

func (*SpeciesRepository) CreateSpecies

func (r *SpeciesRepository) CreateSpecies(species entity.Species) error

func (*SpeciesRepository) GetAll

func (r *SpeciesRepository) GetAll() ([]entity.Species, error)

func (*SpeciesRepository) GetByID

func (r *SpeciesRepository) GetByID(id string) (entity.Species, error)

Jump to

Keyboard shortcuts

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