models

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alert

type Alert struct {
	ID         string                 `json:"id"`
	Type       string                 `json:"type"`
	Level      string                 `json:"level"`
	Message    string                 `json:"message"`
	EntityID   string                 `json:"entity_id"`
	EntityName string                 `json:"entity_name"`
	DeviceID   string                 `json:"device_id"`
	SpaceSlug  string                 `json:"space_slug"`
	Location   *LocationInfo          `json:"location,omitempty"`
	WaterDepth float64                `json:"water_depth"`
	Unit       string                 `json:"unit"`
	Threshold  *ThresholdInfo         `json:"threshold"`
	ReportedAt time.Time              `json:"reported_at"`
	Attributes map[string]interface{} `json:"attributes,omitempty"`
}

Alert represents a single alert

type AlertsRequest

type AlertsRequest struct {
	SpaceSlug         string  `query:"space_slug"`
	DeviceID          string  `query:"device_id" validate:"required"`
	Category          string  `query:"category" validate:"required"`
	StartDate         string  `query:"start_date"`
	EndDate           string  `query:"end_date"`
	Page              int     `query:"page"`
	PageSize          int     `query:"page_size"`
	CautionThreshold  float64 `query:"caution_threshold"`
	WarningThreshold  float64 `query:"warning_threshold"`
	CriticalThreshold float64 `query:"critical_threshold"`
}

AlertsRequest represents query parameters for alerts

type LocationInfo

type LocationInfo struct {
	Latitude  float64 `json:"latitude"`
	Longitude float64 `json:"longitude"`
	Address   string  `json:"address,omitempty"`
}

LocationInfo represents location information for an alert

type ThresholdInfo

type ThresholdInfo struct {
	Warning  float64 `json:"warning"`
	Critical float64 `json:"critical"`
}

ThresholdInfo represents threshold levels

Jump to

Keyboard shortcuts

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