Documentation
¶
Index ¶
- type App
- type AuthPlugin
- type BasicEvent
- type ClientToken
- type DrivingLicense
- type Entities
- type EntityFunc
- type Evaluation
- type EvaluationValue
- type Event
- type EventCreateTree
- type EventDeleteTree
- type EventNewSensorData
- type EventType
- type EventUpdateTree
- type EventUpdateTreeCluster
- type EventUpdateWateringPlan
- type GeoJSON
- type GeoJSONFeature
- type GeoJSONGeometry
- type GeoJSONLocation
- type GeoJSONMetadata
- type GeoJSONType
- type Git
- type IntroSpectTokenResult
- type LoginCallback
- type LoginRequest
- type LoginResp
- type Logout
- type Map
- type MqttPayload
- type Plugin
- type Query
- type Region
- type RegionEvaluation
- type RegisterUser
- type RouteMetadata
- type Sensor
- type SensorCreate
- type SensorData
- type SensorStatus
- type SensorUpdate
- type Server
- type Tree
- type TreeCluster
- type TreeClusterCreate
- type TreeClusterQuery
- type TreeClusterUpdate
- type TreeCreate
- type TreeQuery
- type TreeSoilCondition
- type TreeUpdate
- type User
- type UserRole
- type UserStatus
- type Vehicle
- type VehicleCreate
- type VehicleEvaluation
- type VehicleQuery
- type VehicleStatus
- type VehicleType
- type VehicleUpdate
- type WateringPlan
- type WateringPlanCreate
- type WateringPlanStatus
- type WateringPlanUpdate
- type WateringStatus
- type Watermark
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthPlugin ¶ added in v1.1.0
type BasicEvent ¶ added in v1.1.0
type BasicEvent struct {
// contains filtered or unexported fields
}
func (BasicEvent) Type ¶ added in v1.1.0
func (e BasicEvent) Type() EventType
type ClientToken ¶
type DrivingLicense ¶ added in v1.1.0
type DrivingLicense string
const ( DrivingLicenseB DrivingLicense = "B" DrivingLicenseBE DrivingLicense = "BE" DrivingLicenseC DrivingLicense = "C" DrivingLicenseCE DrivingLicense = "CE" )
func ParseDrivingLicense ¶ added in v1.2.0
func ParseDrivingLicense(drivingLicense string) DrivingLicense
type Entities ¶
type Entities interface { Sensor | Vehicle | TreeCluster | Tree | Region | WateringPlan | Evaluation }
type EntityFunc ¶
type EntityFunc[T Entities] func(*T)
type Evaluation ¶ added in v1.2.0
type Evaluation struct { TreeCount int64 TreeClusterCount int64 SensorCount int64 WateringPlanCount int64 TotalWaterConsumption int64 UserWateringPlanCount int64 VehicleEvaluation []*VehicleEvaluation RegionEvaluation []*RegionEvaluation }
type EvaluationValue ¶ added in v1.1.0
type EventCreateTree ¶ added in v1.1.0
type EventCreateTree struct { BasicEvent New *Tree PrevOfSensor *Tree }
func NewEventCreateTree ¶ added in v1.1.0
func NewEventCreateTree(newTree, prevOfSensor *Tree) EventCreateTree
type EventDeleteTree ¶ added in v1.1.0
type EventDeleteTree struct { BasicEvent Prev *Tree }
func NewEventDeleteTree ¶ added in v1.1.0
func NewEventDeleteTree(prev *Tree) EventDeleteTree
type EventNewSensorData ¶ added in v1.1.0
type EventNewSensorData struct { BasicEvent New *SensorData }
func NewEventSensorData ¶ added in v1.1.0
func NewEventSensorData(newData *SensorData) EventNewSensorData
type EventType ¶ added in v1.1.0
type EventType string
const ( EventTypeUpdateTree EventType = "update tree" EventTypeCreateTree EventType = "create tree" EventTypeDeleteTree EventType = "delete tree" EventTypeUpdateTreeCluster EventType = "update tree cluster" EventTypeNewSensorData EventType = "receive sensor data" EventTypeUpdateWateringPlan EventType = "update watering plan" )
type EventUpdateTree ¶ added in v1.1.0
type EventUpdateTree struct { BasicEvent Prev *Tree New *Tree PrevOfSensor *Tree }
func NewEventUpdateTree ¶ added in v1.1.0
func NewEventUpdateTree(prev, newTree, prevOfSensor *Tree) EventUpdateTree
type EventUpdateTreeCluster ¶ added in v1.1.0
type EventUpdateTreeCluster struct { BasicEvent Prev *TreeCluster New *TreeCluster }
func NewEventUpdateTreeCluster ¶ added in v1.1.0
func NewEventUpdateTreeCluster(prev, newTc *TreeCluster) EventUpdateTreeCluster
type EventUpdateWateringPlan ¶ added in v1.1.0
type EventUpdateWateringPlan struct { BasicEvent Prev *WateringPlan New *WateringPlan }
func NewEventUpdateWateringPlan ¶ added in v1.1.0
func NewEventUpdateWateringPlan(prev, newWp *WateringPlan) EventUpdateWateringPlan
type GeoJSON ¶ added in v1.1.0
type GeoJSON struct { Type GeoJSONType `json:"type"` Bbox []float64 `json:"bbox"` Features []GeoJSONFeature `json:"features"` Metadata GeoJSONMetadata `json:"metadata"` }
type GeoJSONFeature ¶ added in v1.1.0
type GeoJSONFeature struct { Type GeoJSONType `json:"type"` Bbox []float64 `json:"bbox"` Properties map[string]any `json:"properties"` Geometry GeoJSONGeometry `json:"geometry"` }
type GeoJSONGeometry ¶ added in v1.1.0
type GeoJSONGeometry struct { Type GeoJSONType `json:"type"` Coordinates [][]float64 `json:"coordinates"` }
type GeoJSONLocation ¶ added in v1.1.0
type GeoJSONMetadata ¶ added in v1.1.0
type GeoJSONMetadata struct { StartPoint GeoJSONLocation EndPoint GeoJSONLocation WateringPoint GeoJSONLocation }
type GeoJSONType ¶ added in v1.1.0
type GeoJSONType string
const ( FeatureCollection GeoJSONType = "FeatureCollection" Feature GeoJSONType = "Feature" LineString GeoJSONType = "LineString" )
type IntroSpectTokenResult ¶
type LoginCallback ¶
type LoginRequest ¶
type MqttPayload ¶
type RegionEvaluation ¶ added in v1.2.0
type RegisterUser ¶
type RouteMetadata ¶ added in v1.1.0
type SensorCreate ¶ added in v1.1.0
type SensorCreate struct { ID string `validate:"required"` Status SensorStatus `validate:"oneof=online offline unknown"` LatestData *SensorData Latitude float64 `validate:"required,max=90,min=-90"` Longitude float64 `validate:"required,max=180,min=-180"` Provider string AdditionalInfo map[string]interface{} }
type SensorData ¶
type SensorStatus ¶
type SensorStatus string
const ( SensorStatusOnline SensorStatus = "online" SensorStatusOffline SensorStatus = "offline" SensorStatusUnknown SensorStatus = "unknown" )
type SensorUpdate ¶ added in v1.1.0
type SensorUpdate struct { Status SensorStatus `validate:"oneof=online offline unknown"` LatestData *SensorData Latitude float64 `validate:"required,max=90,min=-90"` Longitude float64 `validate:"required,max=180,min=-180"` Provider string AdditionalInfo map[string]interface{} }
type Tree ¶
type Tree struct { ID int32 CreatedAt time.Time UpdatedAt time.Time TreeCluster *TreeCluster Sensor *Sensor PlantingYear int32 Species string Number string Latitude float64 Longitude float64 WateringStatus WateringStatus Description string LastWatered *time.Time Provider string AdditionalInfo map[string]interface{} }
type TreeCluster ¶
type TreeCluster struct { ID int32 CreatedAt time.Time UpdatedAt time.Time WateringStatus WateringStatus LastWatered *time.Time MoistureLevel float64 Region *Region Address string Description string Archived bool Latitude *float64 Longitude *float64 Trees []*Tree SoilCondition TreeSoilCondition Name string Provider string AdditionalInfo map[string]interface{} }
type TreeClusterCreate ¶
type TreeClusterQuery ¶ added in v1.2.0
type TreeClusterQuery struct { WateringStatuses []WateringStatus `query:"watering_statuses"` Regions []string `query:"regions"` Query }
type TreeClusterUpdate ¶
type TreeCreate ¶
type TreeCreate struct { TreeClusterID *int32 SensorID *string PlantingYear int32 `validate:"required"` Species string Number string `validate:"required"` Latitude float64 `validate:"required,max=90,min=-90"` Longitude float64 `validate:"required,max=180,min=-180"` Description string Provider string AdditionalInfo map[string]interface{} }
type TreeQuery ¶ added in v1.2.0
type TreeQuery struct { WateringStatuses []WateringStatus `query:"watering_statuses"` HasCluster *bool `query:"has_cluster"` PlantingYears []int32 `query:"planting_years"` Query }
type TreeSoilCondition ¶
type TreeSoilCondition string
const ( TreeSoilConditionSchluffig TreeSoilCondition = "schluffig" TreeSoilConditionSandig TreeSoilCondition = "sandig" TreeSoilConditionLehmig TreeSoilCondition = "lehmig" TreeSoilConditionTonig TreeSoilCondition = "tonig" TreeSoilConditionUnknown TreeSoilCondition = "unknown" )
type TreeUpdate ¶
type TreeUpdate struct { TreeClusterID *int32 SensorID *string PlantingYear int32 `validate:"gt=0"` Species string Number string Latitude float64 `validate:"omitempty,min=-90,max=90"` Longitude float64 `validate:"omitempty,min=-180,max=180"` Description string Provider string AdditionalInfo map[string]interface{} }
type User ¶
type User struct { ID uuid.UUID CreatedAt time.Time Username string `validate:"required,min=3,max=15"` FirstName string `validate:"required,min=3,max=30"` LastName string `validate:"required,min=3,max=30"` Email string `validate:"required,email"` EmployeeID string PhoneNumber string EmailVerified bool Roles []UserRole Avatar *url.URL DrivingLicenses []DrivingLicense Status UserStatus }
type UserStatus ¶ added in v1.1.0
type UserStatus string
const ( UserStatusAvailable UserStatus = "available" UserStatusAbsent UserStatus = "absent" UserStatusUnknown UserStatus = "unknown" )
func ParseUserStatus ¶ added in v1.1.0
func ParseUserStatus(status string) UserStatus
type Vehicle ¶
type Vehicle struct { ID int32 CreatedAt time.Time UpdatedAt time.Time ArchivedAt time.Time NumberPlate string Description string WaterCapacity float64 Status VehicleStatus Type VehicleType Model string DrivingLicense DrivingLicense Height float64 Width float64 Length float64 Weight float64 Provider string AdditionalInfo map[string]interface{} }
type VehicleCreate ¶ added in v1.1.0
type VehicleCreate struct { NumberPlate string `validate:"required"` Description string WaterCapacity float64 `validate:"gt=0"` Status VehicleStatus `validate:"oneof=active available 'not available' unknown"` Type VehicleType `validate:"oneof=transporter trailer unknown"` Model string `validate:"required"` DrivingLicense DrivingLicense `validate:"oneof=B BE C CE"` Height float64 `validate:"gt=0"` Width float64 `validate:"gt=0"` Length float64 `validate:"gt=0"` Weight float64 `validate:"gt=0"` Provider string AdditionalInfo map[string]interface{} }
type VehicleEvaluation ¶ added in v1.2.0
type VehicleQuery ¶ added in v1.2.0
type VehicleStatus ¶ added in v1.1.0
type VehicleStatus string
const ( VehicleStatusActive VehicleStatus = "active" VehicleStatusAvailable VehicleStatus = "available" VehicleStatusNotAvailable VehicleStatus = "not available" VehicleStatusUnknown VehicleStatus = "unknown" )
type VehicleType ¶ added in v1.1.0
type VehicleType string
const ( VehicleTypeTransporter VehicleType = "transporter" VehicleTypeTrailer VehicleType = "trailer" VehicleTypeUnknown VehicleType = "unknown" )
func ParseVehicleType ¶ added in v1.2.0
func ParseVehicleType(vehicleTypeStr string) VehicleType
type VehicleUpdate ¶ added in v1.1.0
type VehicleUpdate struct { NumberPlate string `validate:"required"` Description string WaterCapacity float64 `validate:"gt=0"` Status VehicleStatus `validate:"oneof=active available 'not available' unknown"` Type VehicleType `validate:"oneof=transporter trailer unknown"` Model string `validate:"required"` DrivingLicense DrivingLicense `validate:"oneof=B BE C CE"` Height float64 `validate:"gt=0"` Width float64 `validate:"gt=0"` Length float64 `validate:"gt=0"` Weight float64 `validate:"gt=0"` Provider string AdditionalInfo map[string]interface{} }
type WateringPlan ¶ added in v1.1.0
type WateringPlan struct { ID int32 CreatedAt time.Time UpdatedAt time.Time Date time.Time Description string Status WateringPlanStatus Distance *float64 TotalWaterRequired *float64 UserIDs []*uuid.UUID TreeClusters []*TreeCluster Transporter *Vehicle Trailer *Vehicle CancellationNote string Evaluation []*EvaluationValue GpxURL string RefillCount int32 Duration time.Duration Provider string AdditionalInfo map[string]interface{} }
type WateringPlanCreate ¶ added in v1.1.0
type WateringPlanCreate struct { Date time.Time `validate:"required"` Description string TreeClusterIDs []*int32 `validate:"required,min=1,dive,required"` TransporterID *int32 `validate:"required"` TrailerID *int32 UserIDs []*uuid.UUID `validate:"required,min=1,dive,required"` Provider string AdditionalInfo map[string]interface{} }
type WateringPlanStatus ¶ added in v1.1.0
type WateringPlanStatus string
const ( WateringPlanStatusPlanned WateringPlanStatus = "planned" WateringPlanStatusActive WateringPlanStatus = "active" WateringPlanStatusCanceled WateringPlanStatus = "canceled" WateringPlanStatusFinished WateringPlanStatus = "finished" WateringPlanStatusNotCompeted WateringPlanStatus = "not competed" WateringPlanStatusUnknown WateringPlanStatus = "unknown" )
type WateringPlanUpdate ¶ added in v1.1.0
type WateringPlanUpdate struct { Date time.Time `validate:"required"` Description string TreeClusterIDs []*int32 `validate:"required,min=1,dive,required"` TransporterID *int32 `validate:"required"` TrailerID *int32 CancellationNote string Status WateringPlanStatus `validate:"oneof=planned active canceled finished 'not competed' unknown"` Evaluation []*EvaluationValue UserIDs []*uuid.UUID `validate:"required,min=1,dive,required"` Provider string AdditionalInfo map[string]interface{} }
type WateringStatus ¶
type WateringStatus string
const ( WateringStatusGood WateringStatus = "good" WateringStatusModerate WateringStatus = "moderate" WateringStatusBad WateringStatus = "bad" WateringStatusJustWatered WateringStatus = "just watered" WateringStatusUnknown WateringStatus = "unknown" )
Click to show internal directories.
Click to hide internal directories.