Documentation ¶
Index ¶
- func NewTreeRepository(s *store.Store, mappers TreeMappers) storage.TreeRepository
- func WithDescription(description string) entities.EntityFunc[entities.Tree]
- func WithImages(images []*entities.Image) entities.EntityFunc[entities.Tree]
- func WithLatitude(lat float64) entities.EntityFunc[entities.Tree]
- func WithLongitude(long float64) entities.EntityFunc[entities.Tree]
- func WithPlantingYear(year int32) entities.EntityFunc[entities.Tree]
- func WithReadonly(readonly bool) entities.EntityFunc[entities.Tree]
- func WithSensor(sensor *entities.Sensor) entities.EntityFunc[entities.Tree]
- func WithSpecies(species string) entities.EntityFunc[entities.Tree]
- func WithTreeCluster(treeCluster *entities.TreeCluster) entities.EntityFunc[entities.Tree]
- func WithTreeNumber(number string) entities.EntityFunc[entities.Tree]
- func WithWateringStatus(wateringStatus entities.WateringStatus) entities.EntityFunc[entities.Tree]
- type TreeMappers
- type TreeRepository
- func (r *TreeRepository) Create(ctx context.Context, tFn ...entities.EntityFunc[entities.Tree]) (*entities.Tree, error)
- func (r *TreeRepository) CreateAndLinkImages(ctx context.Context, tFn ...entities.EntityFunc[entities.Tree]) (*entities.Tree, error)
- func (r *TreeRepository) Delete(ctx context.Context, id int32) error
- func (r *TreeRepository) DeleteAndUnlinkImages(ctx context.Context, id int32) error
- func (r *TreeRepository) GetAll(ctx context.Context) ([]*entities.Tree, error)
- func (r *TreeRepository) GetAllImagesByID(ctx context.Context, id int32) ([]*entities.Image, error)
- func (r *TreeRepository) GetByCoordinates(ctx context.Context, latitude, longitude float64) (*entities.Tree, error)
- func (r *TreeRepository) GetByID(ctx context.Context, id int32) (*entities.Tree, error)
- func (r *TreeRepository) GetByTreeClusterID(ctx context.Context, id int32) ([]*entities.Tree, error)
- func (r *TreeRepository) GetCenterPoint(ctx context.Context, ids []int32) (lat, long float64, err error)
- func (r *TreeRepository) GetSensorByTreeID(ctx context.Context, flowerbedID int32) (*entities.Sensor, error)
- func (r *TreeRepository) GetTreeClusterByTreeID(ctx context.Context, treeID int32) (*entities.TreeCluster, error)
- func (r *TreeRepository) GetTreesByIDs(ctx context.Context, ids []int32) ([]*entities.Tree, error)
- func (r *TreeRepository) UnlinkAllImages(ctx context.Context, treeID int32) error
- func (r *TreeRepository) UnlinkImage(ctx context.Context, treeID, imageID int32) error
- func (r *TreeRepository) UnlinkTreeClusterID(ctx context.Context, treeClusterID int32) error
- func (r *TreeRepository) Update(ctx context.Context, id int32, tFn ...entities.EntityFunc[entities.Tree]) (*entities.Tree, error)
- func (r *TreeRepository) UpdateTreeClusterID(ctx context.Context, treeIDs []int32, treeClusterID *int32) error
- func (r *TreeRepository) UpdateWithImages(ctx context.Context, id int32, tFn ...entities.EntityFunc[entities.Tree]) (*entities.Tree, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTreeRepository ¶
func NewTreeRepository(s *store.Store, mappers TreeMappers) storage.TreeRepository
func WithDescription ¶
func WithDescription(description string) entities.EntityFunc[entities.Tree]
func WithImages ¶
func WithLatitude ¶
func WithLatitude(lat float64) entities.EntityFunc[entities.Tree]
func WithLongitude ¶
func WithLongitude(long float64) entities.EntityFunc[entities.Tree]
func WithPlantingYear ¶
func WithPlantingYear(year int32) entities.EntityFunc[entities.Tree]
func WithReadonly ¶
func WithReadonly(readonly bool) entities.EntityFunc[entities.Tree]
func WithSensor ¶
func WithSpecies ¶
func WithSpecies(species string) entities.EntityFunc[entities.Tree]
func WithTreeCluster ¶
func WithTreeCluster(treeCluster *entities.TreeCluster) entities.EntityFunc[entities.Tree]
func WithTreeNumber ¶
func WithTreeNumber(number string) entities.EntityFunc[entities.Tree]
func WithWateringStatus ¶
func WithWateringStatus(wateringStatus entities.WateringStatus) entities.EntityFunc[entities.Tree]
Types ¶
type TreeMappers ¶
type TreeMappers struct {
// contains filtered or unexported fields
}
func NewTreeRepositoryMappers ¶
func NewTreeRepositoryMappers( tMapper imgMapper.InternalTreeRepoMapper, iMapper imgMapper.InternalImageRepoMapper, sMapper imgMapper.InternalSensorRepoMapper, tcMapper imgMapper.InternalTreeClusterRepoMapper, ) TreeMappers
type TreeRepository ¶
type TreeRepository struct { TreeMappers // contains filtered or unexported fields }
func (*TreeRepository) Create ¶
func (r *TreeRepository) Create(ctx context.Context, tFn ...entities.EntityFunc[entities.Tree]) (*entities.Tree, error)
func (*TreeRepository) CreateAndLinkImages ¶
func (r *TreeRepository) CreateAndLinkImages(ctx context.Context, tFn ...entities.EntityFunc[entities.Tree]) (*entities.Tree, error)
func (*TreeRepository) Delete ¶
func (r *TreeRepository) Delete(ctx context.Context, id int32) error
func (*TreeRepository) DeleteAndUnlinkImages ¶
func (r *TreeRepository) DeleteAndUnlinkImages(ctx context.Context, id int32) error
func (*TreeRepository) GetAllImagesByID ¶
func (*TreeRepository) GetByCoordinates ¶
func (*TreeRepository) GetByTreeClusterID ¶
func (*TreeRepository) GetCenterPoint ¶
func (*TreeRepository) GetSensorByTreeID ¶
func (*TreeRepository) GetTreeClusterByTreeID ¶
func (r *TreeRepository) GetTreeClusterByTreeID(ctx context.Context, treeID int32) (*entities.TreeCluster, error)
func (*TreeRepository) GetTreesByIDs ¶
func (*TreeRepository) UnlinkAllImages ¶
func (r *TreeRepository) UnlinkAllImages(ctx context.Context, treeID int32) error
func (*TreeRepository) UnlinkImage ¶
func (r *TreeRepository) UnlinkImage(ctx context.Context, treeID, imageID int32) error
func (*TreeRepository) UnlinkTreeClusterID ¶
func (r *TreeRepository) UnlinkTreeClusterID(ctx context.Context, treeClusterID int32) error
func (*TreeRepository) UpdateTreeClusterID ¶
func (*TreeRepository) UpdateWithImages ¶
Click to show internal directories.
Click to hide internal directories.