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: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutomationSummary added in v0.0.2

type AutomationSummary struct {
	ID   string  `json:"id"`
	Name *string `json:"name,omitempty"`
}

AutomationSummary represents summary info about an automation for event responses

type DeleteEventRuleResponse

type DeleteEventRuleResponse struct {
	Message string `json:"message"`
}

DeleteEventRuleResponse represents response after deleting an event rule

type EventItem

type EventItem struct {
	EventID    int64              `json:"id"`
	EventType  string             `json:"event_type"`
	EventLevel string             `json:"event_level,omitempty"`
	Title      string             `json:"title,omitempty"`
	TimeFired  time.Time          `json:"time_fired"`
	Automation *AutomationSummary `json:"automation,omitempty"`
	Geofence   *GeofenceSummary   `json:"geofence,omitempty"`
	Location   *LocationData      `json:"location,omitempty"`
}

EventItem represents a single event in API response

type EventRuleRequest added in v0.0.2

type EventRuleRequest struct {
	RuleKey     *string         `json:"rule_key" validate:"required"`
	Definition  json.RawMessage `json:"definition"`
	IsActive    *bool           `json:"is_active"`
	RepeatAble  *bool           `json:"repeat_able"`
	CooldownSec *int            `json:"cooldown_sec"`
	Description *string         `json:"description"`
}

EventRuleRequest represents event rule fields within an automation request

type GeofenceSummary added in v0.0.2

type GeofenceSummary struct {
	ID       string  `json:"id"`
	Name     *string `json:"name,omitempty"`
	TypeZone *string `json:"type_zone,omitempty"`
}

GeofenceSummary represents summary info about a geofence for event responses

type LocationData added in v0.0.2

type LocationData struct {
	Latitude  float64 `json:"latitude"`
	Longitude float64 `json:"longitude"`
}

LocationData represents geographic coordinates

Jump to

Keyboard shortcuts

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