Documentation
¶
Index ¶
- func Error(ctx context.Context, w http.ResponseWriter, error string, code int)
- type Action
- type Base
- type CalendarConfig
- type CalendarDay
- type Config
- type DashboardConfig
- type DashboardHomeAssistantConfig
- type EntityConfig
- type HomeAssistantConfig
- type HomeAssistantRenderData
- type LogConfig
- type LogFormat
- type Page
- type PageRenderData
- type RenderData
- type Server
- type ServiceConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CalendarConfig ¶
type CalendarDay ¶
type CalendarDay struct { Time time.Time IsPast bool IsToday bool Events []homeassistant.CalendarEvent }
type Config ¶
type Config struct { Dev bool `toml:"dev"` ListenAddr string `toml:"listen_addr"` ListenPort int `toml:"listen_port"` DashboardDir string `toml:"dashboard_dir"` Log LogConfig `toml:"log"` HomeAssistant *HomeAssistantConfig `toml:"home_assistant"` }
func LoadConfig ¶
type DashboardConfig ¶
type DashboardConfig struct { Height int `toml:"height"` Width int `toml:"width"` Base string `toml:"base"` Pages []string `toml:"pages"` HomeAssistant DashboardHomeAssistantConfig `toml:"home_assistant"` }
type DashboardHomeAssistantConfig ¶
type DashboardHomeAssistantConfig struct { Entities []EntityConfig `toml:"entities"` Calendars []CalendarConfig `toml:"calendars"` Services []ServiceConfig `toml:"services"` }
type EntityConfig ¶
type HomeAssistantConfig ¶
type HomeAssistantConfig struct { Host string `toml:"host"` Port int `toml:"port"` Secure bool `toml:"secure"` Token string `toml:"token"` }
func (HomeAssistantConfig) String ¶
func (c HomeAssistantConfig) String() string
func (HomeAssistantConfig) URL ¶
func (c HomeAssistantConfig) URL() string
type HomeAssistantRenderData ¶
type HomeAssistantRenderData struct { Entities map[string]homeassistant.EntityState Calendars map[string][]CalendarDay Services map[string]homeassistant.Response }
type LogConfig ¶
type PageRenderData ¶
type RenderData ¶
type RenderData struct { PageIndex int PageCount int Pages []PageRenderData Vars map[string]any HomeAssistant HomeAssistantRenderData }
func (RenderData) Page ¶
func (r RenderData) Page() PageRenderData
Source Files
¶
Click to show internal directories.
Click to hide internal directories.