tree

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

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 WithImages(images []*entities.Image) entities.EntityFunc[entities.Tree]

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 WithSensor(sensor *entities.Sensor) entities.EntityFunc[entities.Tree]

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
}

type TreeRepository

type TreeRepository struct {
	TreeMappers
	// contains filtered or unexported fields
}

func (*TreeRepository) Create

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) GetAll

func (r *TreeRepository) GetAll(ctx context.Context) ([]*entities.Tree, error)

func (*TreeRepository) GetAllImagesByID

func (r *TreeRepository) GetAllImagesByID(ctx context.Context, id int32) ([]*entities.Image, error)

func (*TreeRepository) GetByCoordinates

func (r *TreeRepository) GetByCoordinates(ctx context.Context, latitude, longitude float64) (*entities.Tree, error)

func (*TreeRepository) GetByID

func (r *TreeRepository) GetByID(ctx context.Context, id int32) (*entities.Tree, error)

func (*TreeRepository) GetByTreeClusterID

func (r *TreeRepository) GetByTreeClusterID(ctx context.Context, id int32) ([]*entities.Tree, error)

func (*TreeRepository) GetCenterPoint

func (r *TreeRepository) GetCenterPoint(ctx context.Context, ids []int32) (lat, long float64, err error)

func (*TreeRepository) GetSensorByTreeID

func (r *TreeRepository) GetSensorByTreeID(ctx context.Context, flowerbedID int32) (*entities.Sensor, error)

func (*TreeRepository) GetTreeClusterByTreeID

func (r *TreeRepository) GetTreeClusterByTreeID(ctx context.Context, treeID int32) (*entities.TreeCluster, error)

func (*TreeRepository) GetTreesByIDs

func (r *TreeRepository) GetTreesByIDs(ctx context.Context, ids []int32) ([]*entities.Tree, error)

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) Update

func (*TreeRepository) UpdateTreeClusterID

func (r *TreeRepository) UpdateTreeClusterID(ctx context.Context, treeIDs []int32, treeClusterID *int32) error

func (*TreeRepository) UpdateWithImages

func (r *TreeRepository) UpdateWithImages(ctx context.Context, id int32, tFn ...entities.EntityFunc[entities.Tree]) (*entities.Tree, error)

Jump to

Keyboard shortcuts

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