Documentation
¶
Index ¶
- func NewFlowerbedRepository(s *store.Store, mappers FlowerbedMappers) storage.FlowerbedRepository
- func WithAddress(address string) entities.EntityFunc[entities.Flowerbed]
- func WithArchived(archived bool) entities.EntityFunc[entities.Flowerbed]
- func WithDescription(description string) entities.EntityFunc[entities.Flowerbed]
- func WithImages(images []*entities.Image) entities.EntityFunc[entities.Flowerbed]
- func WithImagesIDs(imagesIDs []int32) entities.EntityFunc[entities.Flowerbed]
- func WithLatitude(latitude float64) entities.EntityFunc[entities.Flowerbed]
- func WithLongitude(longitude float64) entities.EntityFunc[entities.Flowerbed]
- func WithMoistureLevel(moistureLevel float64) entities.EntityFunc[entities.Flowerbed]
- func WithNumberOfPlants(numberOfPlants int32) entities.EntityFunc[entities.Flowerbed]
- func WithRegion(region *entities.Region) entities.EntityFunc[entities.Flowerbed]
- func WithSensor(sensor *entities.Sensor) entities.EntityFunc[entities.Flowerbed]
- func WithSensorID(id int32) entities.EntityFunc[entities.Flowerbed]
- func WithSize(size float64) entities.EntityFunc[entities.Flowerbed]
- type FlowerbedMappers
- type FlowerbedRepository
- func (r *FlowerbedRepository) Archive(ctx context.Context, id int32) error
- func (r *FlowerbedRepository) Create(ctx context.Context, fFn ...entities.EntityFunc[entities.Flowerbed]) (*entities.Flowerbed, error)
- func (r *FlowerbedRepository) CreateAndLinkImages(ctx context.Context, fFn ...entities.EntityFunc[entities.Flowerbed]) (*entities.Flowerbed, error)
- func (r *FlowerbedRepository) Delete(ctx context.Context, id int32) error
- func (r *FlowerbedRepository) DeleteAndUnlinkImages(ctx context.Context, id int32) error
- func (r *FlowerbedRepository) GetAll(ctx context.Context) ([]*entities.Flowerbed, error)
- func (r *FlowerbedRepository) GetAllImagesByID(ctx context.Context, flowerbedID int32) ([]*entities.Image, error)
- func (r *FlowerbedRepository) GetByID(ctx context.Context, id int32) (*entities.Flowerbed, error)
- func (r *FlowerbedRepository) GetRegionByFlowerbedID(ctx context.Context, flowerbedID int32) (*entities.Region, error)
- func (r *FlowerbedRepository) GetSensorByFlowerbedID(ctx context.Context, flowerbedID int32) (*entities.Sensor, error)
- func (r *FlowerbedRepository) UnlinkAllImages(ctx context.Context, id int32) error
- func (r *FlowerbedRepository) UnlinkImage(ctx context.Context, id, imageID int32) error
- func (r *FlowerbedRepository) Update(ctx context.Context, id int32, fFn ...entities.EntityFunc[entities.Flowerbed]) (*entities.Flowerbed, error)
- func (r *FlowerbedRepository) UpdateWithImages(ctx context.Context, id int32, fFn ...entities.EntityFunc[entities.Flowerbed]) (*entities.Flowerbed, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFlowerbedRepository ¶
func NewFlowerbedRepository(s *store.Store, mappers FlowerbedMappers) storage.FlowerbedRepository
func WithAddress ¶
func WithAddress(address string) entities.EntityFunc[entities.Flowerbed]
func WithArchived ¶
func WithArchived(archived bool) entities.EntityFunc[entities.Flowerbed]
func WithDescription ¶
func WithDescription(description string) entities.EntityFunc[entities.Flowerbed]
func WithImages ¶
func WithImagesIDs ¶
func WithImagesIDs(imagesIDs []int32) entities.EntityFunc[entities.Flowerbed]
func WithLatitude ¶
func WithLatitude(latitude float64) entities.EntityFunc[entities.Flowerbed]
func WithLongitude ¶
func WithLongitude(longitude float64) entities.EntityFunc[entities.Flowerbed]
func WithMoistureLevel ¶
func WithMoistureLevel(moistureLevel float64) entities.EntityFunc[entities.Flowerbed]
func WithNumberOfPlants ¶
func WithNumberOfPlants(numberOfPlants int32) entities.EntityFunc[entities.Flowerbed]
func WithRegion ¶
func WithSensor ¶
func WithSensorID ¶
func WithSensorID(id int32) entities.EntityFunc[entities.Flowerbed]
Types ¶
type FlowerbedMappers ¶
type FlowerbedMappers struct {
// contains filtered or unexported fields
}
func NewFlowerbedMappers ¶
func NewFlowerbedMappers( fMapper mapper.InternalFlowerbedRepoMapper, iMapper mapper.InternalImageRepoMapper, sMapper mapper.InternalSensorRepoMapper, rMapper mapper.InternalRegionRepoMapper, ) FlowerbedMappers
type FlowerbedRepository ¶
type FlowerbedRepository struct { FlowerbedMappers // contains filtered or unexported fields }
func (*FlowerbedRepository) Archive ¶
func (r *FlowerbedRepository) Archive(ctx context.Context, id int32) error
func (*FlowerbedRepository) Create ¶
func (r *FlowerbedRepository) Create(ctx context.Context, fFn ...entities.EntityFunc[entities.Flowerbed]) (*entities.Flowerbed, error)
func (*FlowerbedRepository) CreateAndLinkImages ¶
func (r *FlowerbedRepository) CreateAndLinkImages(ctx context.Context, fFn ...entities.EntityFunc[entities.Flowerbed]) (*entities.Flowerbed, error)
func (*FlowerbedRepository) Delete ¶
func (r *FlowerbedRepository) Delete(ctx context.Context, id int32) error
func (*FlowerbedRepository) DeleteAndUnlinkImages ¶
func (r *FlowerbedRepository) DeleteAndUnlinkImages(ctx context.Context, id int32) error
func (*FlowerbedRepository) GetAllImagesByID ¶
func (*FlowerbedRepository) GetRegionByFlowerbedID ¶
func (*FlowerbedRepository) GetSensorByFlowerbedID ¶
func (*FlowerbedRepository) UnlinkAllImages ¶
func (r *FlowerbedRepository) UnlinkAllImages(ctx context.Context, id int32) error
func (*FlowerbedRepository) UnlinkImage ¶
func (r *FlowerbedRepository) UnlinkImage(ctx context.Context, id, imageID int32) error
func (*FlowerbedRepository) UpdateWithImages ¶
Click to show internal directories.
Click to hide internal directories.