Documentation
¶
Index ¶
- func MapBbox(src [4]float64) [4]float64
- func MapCenter(src [2]float64) [2]float64
- func MapDrivingLicense(drivingLicense domain.DrivingLicense) entities.DrivingLicense
- func MapDrivingLicenseReq(drivingLicense entities.DrivingLicense) domain.DrivingLicense
- func MapLatestDataToResponse(sensorData *domain.SensorData) *entities.SensorDataResponse
- func MapSensorStatus(src domain.SensorStatus) entities.SensorStatus
- func MapSoilCondition(condition domain.TreeSoilCondition) entities.TreeSoilCondition
- func MapSoilConditionReq(condition entities.TreeSoilCondition) domain.TreeSoilCondition
- func MapTreeClusterToID(treeCluster *domain.TreeCluster) *int32
- func MapTreesToIDs(trees []*domain.Tree) []*int32
- func MapUUIDReq(userIDs []string) []*uuid.UUID
- func MapUUIDs(source []*uuid.UUID) []*uuid.UUID
- func MapUserRoles(userRole domain.UserRole) entities.UserRole
- func MapUserStatus(userStatus domain.UserStatus) entities.UserStatus
- func MapVehicleStatus(vehicleStatus domain.VehicleStatus) entities.VehicleStatus
- func MapVehicleStatusReq(vehicleStatus entities.VehicleStatus) domain.VehicleStatus
- func MapVehicleType(vehicleType domain.VehicleType) entities.VehicleType
- func MapVehicleTypeReq(vehicleType entities.VehicleType) domain.VehicleType
- func MapWateringPlanStatus(status domain.WateringPlanStatus) entities.WateringPlanStatus
- func MapWateringPlanStatusReq(status entities.WateringPlanStatus) domain.WateringPlanStatus
- func MapWateringStatus(status domain.WateringStatus) entities.WateringStatus
- type EvaluationHTTPMapper
- type InfoHTTPMapper
- type RegionHTTPMapper
- type SensorHTTPMapper
- type TreeClusterHTTPMapper
- type TreeHTTPMapper
- type UserHTTPMapper
- type VehicleHTTPMapper
- type WateringPlanHTTPMapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MapDrivingLicense ¶
func MapDrivingLicense(drivingLicense domain.DrivingLicense) entities.DrivingLicense
func MapDrivingLicenseReq ¶
func MapDrivingLicenseReq(drivingLicense entities.DrivingLicense) domain.DrivingLicense
func MapLatestDataToResponse ¶
func MapLatestDataToResponse(sensorData *domain.SensorData) *entities.SensorDataResponse
func MapSensorStatus ¶
func MapSensorStatus(src domain.SensorStatus) entities.SensorStatus
func MapSoilCondition ¶
func MapSoilCondition(condition domain.TreeSoilCondition) entities.TreeSoilCondition
func MapSoilConditionReq ¶
func MapSoilConditionReq(condition entities.TreeSoilCondition) domain.TreeSoilCondition
func MapTreeClusterToID ¶
func MapTreeClusterToID(treeCluster *domain.TreeCluster) *int32
func MapTreesToIDs ¶
func MapUUIDReq ¶
func MapUserStatus ¶
func MapUserStatus(userStatus domain.UserStatus) entities.UserStatus
func MapVehicleStatus ¶
func MapVehicleStatus(vehicleStatus domain.VehicleStatus) entities.VehicleStatus
func MapVehicleStatusReq ¶
func MapVehicleStatusReq(vehicleStatus entities.VehicleStatus) domain.VehicleStatus
func MapVehicleType ¶
func MapVehicleType(vehicleType domain.VehicleType) entities.VehicleType
func MapVehicleTypeReq ¶
func MapVehicleTypeReq(vehicleType entities.VehicleType) domain.VehicleType
func MapWateringPlanStatus ¶
func MapWateringPlanStatus(status domain.WateringPlanStatus) entities.WateringPlanStatus
func MapWateringPlanStatusReq ¶
func MapWateringPlanStatusReq(status entities.WateringPlanStatus) domain.WateringPlanStatus
func MapWateringStatus ¶
func MapWateringStatus(status domain.WateringStatus) entities.WateringStatus
Types ¶
type EvaluationHTTPMapper ¶
type EvaluationHTTPMapper interface {
FromResponse(src *domain.Evaluation) *entities.EvaluationResponse
}
goverter:converter
type InfoHTTPMapper ¶
type InfoHTTPMapper interface { ToResponse(src *domain.App) *entities.AppInfoResponse FromResponse(src *entities.AppInfoResponse) *domain.App }
goverter:converter goverter:extend github.com/green-ecolution/backend/internal/utils:TimeToTime github.com/green-ecolution/backend/internal/utils:URLToURL github.com/green-ecolution/backend/internal/utils:TimeDurationToTimeDuration github.com/green-ecolution/backend/internal/utils:StringToTime github.com/green-ecolution/backend/internal/utils:StringToURL github.com/green-ecolution/backend/internal/utils:StringToNetIP goverter:extend github.com/green-ecolution/backend/internal/utils:StringToDuration github.com/green-ecolution/backend/internal/utils:TimeToString github.com/green-ecolution/backend/internal/utils:NetURLToString github.com/green-ecolution/backend/internal/utils:NetIPToString github.com/green-ecolution/backend/internal/utils:TimeDurationToString goverter:extend MapCenter MapBbox
type RegionHTTPMapper ¶
type RegionHTTPMapper interface {
FromResponse(src *domain.Region) *entities.RegionResponse
}
goverter:converter goverter:extend github.com/green-ecolution/backend/internal/utils:TimeToTime
type SensorHTTPMapper ¶
type SensorHTTPMapper interface { FromResponse(src *domain.Sensor) *entities.SensorResponse FromDataResponse(src *domain.SensorData) *entities.SensorDataResponse FromWatermarkResponse(src *domain.Watermark) *entities.WatermarkResponse }
goverter:converter goverter:extend github.com/green-ecolution/backend/internal/utils:TimeToTime goverter:extend github.com/green-ecolution/backend/internal/utils:MapKeyValueInterface goverter:extend MapSensorStatus MapLatestDataToResponse
type TreeClusterHTTPMapper ¶
type TreeClusterHTTPMapper interface { FromResponse(*domain.TreeCluster) *entities.TreeClusterResponse FromResponseList([]*domain.TreeCluster) []*entities.TreeClusterInListResponse FromCreateRequest(*entities.TreeClusterCreateRequest) *domain.TreeClusterCreate FromUpdateRequest(*entities.TreeClusterUpdateRequest) *domain.TreeClusterUpdate // goverter:map Trees TreeIDs FromInListResponse(*domain.TreeCluster) *entities.TreeClusterInListResponse }
goverter:converter goverter:extend github.com/green-ecolution/backend/internal/utils:TimeToTime goverter:extend github.com/green-ecolution/backend/internal/utils:TimeToTimePtr goverter:extend github.com/green-ecolution/backend/internal/utils:MapKeyValueInterface goverter:extend MapWateringStatus MapSoilCondition MapSoilConditionReq MapTreesToIDs MapSensorStatus goverter:ignoreMissing
type TreeHTTPMapper ¶
type TreeHTTPMapper interface { // goverter:map TreeCluster TreeClusterID // goverter:ignore Sensor FromResponse(*domain.Tree) *entities.TreeResponse FromResponseList([]*domain.Tree) []*entities.TreeResponse FromUpdateRequest(*entities.TreeUpdateRequest) *domain.TreeUpdate FromCreateRequest(*entities.TreeCreateRequest) *domain.TreeCreate }
goverter:converter goverter:extend github.com/green-ecolution/backend/internal/utils:TimeToTime goverter:extend github.com/green-ecolution/backend/internal/utils:MapKeyValueInterface goverter:extend MapTreeClusterToID MapWateringStatus
type UserHTTPMapper ¶
type UserHTTPMapper interface { FromResponse(*domain.User) *entities.UserResponse FromResponseList([]*domain.User) []*entities.UserResponse }
goverter:converter goverter:extend github.com/green-ecolution/backend/internal/utils:TimeToTime goverter:extend github.com/green-ecolution/backend/internal/utils:UUIDToString goverter:extend github.com/green-ecolution/backend/internal/utils:URLToString goverter:extend MapDrivingLicense MapUserRoles MapUserStatus
type VehicleHTTPMapper ¶
type VehicleHTTPMapper interface { FromResponse(*domain.Vehicle) *entities.VehicleResponse FromResponseList([]*domain.Vehicle) []*entities.VehicleResponse FromCreateRequest(*entities.VehicleCreateRequest) *domain.VehicleCreate FromUpdateRequest(*entities.VehicleUpdateRequest) *domain.VehicleUpdate }
goverter:converter goverter:extend github.com/green-ecolution/backend/internal/utils:TimeToTime goverter:extend github.com/green-ecolution/backend/internal/utils:TimeToTimePtr goverter:extend github.com/green-ecolution/backend/internal/utils:TimeToPtrTime goverter:extend github.com/green-ecolution/backend/internal/utils:MapKeyValueInterface goverter:extend MapVehicleStatus MapVehicleType MapVehicleStatusReq MapVehicleTypeReq MapDrivingLicense MapDrivingLicenseReq
type WateringPlanHTTPMapper ¶
type WateringPlanHTTPMapper interface { FromResponse(*domain.WateringPlan) *entities.WateringPlanResponse FromResponseList([]*domain.WateringPlan) []*entities.WateringPlanResponse FromCreateRequest(*entities.WateringPlanCreateRequest) *domain.WateringPlanCreate FromUpdateRequest(*entities.WateringPlanUpdateRequest) *domain.WateringPlanUpdate FromInListResponse(*domain.WateringPlan) *entities.WateringPlanInListResponse // goverter:map Trees TreeIDs FromTreeClusterInListResponse(*domain.TreeCluster) *entities.TreeClusterInListResponse }
goverter:converter goverter:extend github.com/green-ecolution/backend/internal/utils:TimeToTime goverter:extend github.com/green-ecolution/backend/internal/utils:TimeToTimePtr goverter:extend github.com/green-ecolution/backend/internal/utils:TimeToPtrTime goverter:extend github.com/green-ecolution/backend/internal/utils:DurationToPtrFloat64 goverter:extend github.com/green-ecolution/backend/internal/utils:MapKeyValueInterface goverter:extend MapWateringPlanStatus MapVehicleStatus MapVehicleType MapDrivingLicense MapWateringPlanStatusReq goverter:extend MapWateringStatus MapSensorStatus MapSoilCondition MapTreesToIDs MapUUIDs MapUUIDReq