Documentation
¶
Index ¶
- func NewTreeClusterRepository(s *store.Store, mappers TreeClusterMappers) storage.TreeClusterRepository
- func WithAddress(address string) entities.EntityFunc[entities.TreeCluster]
- func WithArchived(archived bool) entities.EntityFunc[entities.TreeCluster]
- func WithDescription(description string) entities.EntityFunc[entities.TreeCluster]
- func WithLastWatered(lastWatered time.Time) entities.EntityFunc[entities.TreeCluster]
- func WithLatitude(latitude *float64) entities.EntityFunc[entities.TreeCluster]
- func WithLongitude(longitude *float64) entities.EntityFunc[entities.TreeCluster]
- func WithMoistureLevel(moistureLevel float64) entities.EntityFunc[entities.TreeCluster]
- func WithName(name string) entities.EntityFunc[entities.TreeCluster]
- func WithRegion(region *entities.Region) entities.EntityFunc[entities.TreeCluster]
- func WithSoilCondition(soilCondition entities.TreeSoilCondition) entities.EntityFunc[entities.TreeCluster]
- func WithTrees(trees []*entities.Tree) entities.EntityFunc[entities.TreeCluster]
- func WithWateringStatus(wateringStatus entities.WateringStatus) entities.EntityFunc[entities.TreeCluster]
- type TreeClusterMappers
- type TreeClusterRepository
- func (r *TreeClusterRepository) Archive(ctx context.Context, id int32) error
- func (r *TreeClusterRepository) Create(ctx context.Context, createFn func(*entities.TreeCluster) (bool, error)) (*entities.TreeCluster, error)
- func (r *TreeClusterRepository) Delete(ctx context.Context, id int32) error
- func (r *TreeClusterRepository) GetAll(ctx context.Context) ([]*entities.TreeCluster, error)
- func (r *TreeClusterRepository) GetByID(ctx context.Context, id int32) (*entities.TreeCluster, error)
- func (r *TreeClusterRepository) GetLinkedTreesByTreeClusterID(ctx context.Context, id int32) ([]*entities.Tree, error)
- func (r *TreeClusterRepository) GetRegionByTreeClusterID(ctx context.Context, id int32) (*entities.Region, error)
- func (r *TreeClusterRepository) LinkTreesToCluster(ctx context.Context, treeClusterID int32, treeIDs []int32) error
- func (r *TreeClusterRepository) Update(ctx context.Context, id int32, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTreeClusterRepository ¶
func NewTreeClusterRepository(s *store.Store, mappers TreeClusterMappers) storage.TreeClusterRepository
func WithAddress ¶
func WithAddress(address string) entities.EntityFunc[entities.TreeCluster]
func WithArchived ¶
func WithArchived(archived bool) entities.EntityFunc[entities.TreeCluster]
func WithDescription ¶
func WithDescription(description string) entities.EntityFunc[entities.TreeCluster]
func WithLastWatered ¶
func WithLastWatered(lastWatered time.Time) entities.EntityFunc[entities.TreeCluster]
func WithLatitude ¶
func WithLatitude(latitude *float64) entities.EntityFunc[entities.TreeCluster]
func WithLongitude ¶
func WithLongitude(longitude *float64) entities.EntityFunc[entities.TreeCluster]
func WithMoistureLevel ¶
func WithMoistureLevel(moistureLevel float64) entities.EntityFunc[entities.TreeCluster]
func WithName ¶
func WithName(name string) entities.EntityFunc[entities.TreeCluster]
func WithRegion ¶
func WithRegion(region *entities.Region) entities.EntityFunc[entities.TreeCluster]
func WithSoilCondition ¶
func WithSoilCondition(soilCondition entities.TreeSoilCondition) entities.EntityFunc[entities.TreeCluster]
func WithTrees ¶
func WithTrees(trees []*entities.Tree) entities.EntityFunc[entities.TreeCluster]
func WithWateringStatus ¶
func WithWateringStatus(wateringStatus entities.WateringStatus) entities.EntityFunc[entities.TreeCluster]
Types ¶
type TreeClusterMappers ¶
type TreeClusterMappers struct {
// contains filtered or unexported fields
}
func NewTreeClusterRepositoryMappers ¶
func NewTreeClusterRepositoryMappers( tcMapper mapper.InternalTreeClusterRepoMapper, sMapper mapper.InternalSensorRepoMapper, rMapper mapper.InternalRegionRepoMapper, tMapper mapper.InternalTreeRepoMapper, ) TreeClusterMappers
type TreeClusterRepository ¶
type TreeClusterRepository struct { TreeClusterMappers // contains filtered or unexported fields }
func (*TreeClusterRepository) Archive ¶
func (r *TreeClusterRepository) Archive(ctx context.Context, id int32) error
func (*TreeClusterRepository) Create ¶
func (r *TreeClusterRepository) Create(ctx context.Context, createFn func(*entities.TreeCluster) (bool, error)) (*entities.TreeCluster, error)
func (*TreeClusterRepository) Delete ¶
func (r *TreeClusterRepository) Delete(ctx context.Context, id int32) error
func (*TreeClusterRepository) GetAll ¶
func (r *TreeClusterRepository) GetAll(ctx context.Context) ([]*entities.TreeCluster, error)
func (*TreeClusterRepository) GetByID ¶
func (r *TreeClusterRepository) GetByID(ctx context.Context, id int32) (*entities.TreeCluster, error)
func (*TreeClusterRepository) GetLinkedTreesByTreeClusterID ¶
func (*TreeClusterRepository) GetRegionByTreeClusterID ¶
func (*TreeClusterRepository) LinkTreesToCluster ¶
Click to show internal directories.
Click to hide internal directories.