configuration

package
v0.15.2 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoAwayConfiguration

type AutoAwayConfiguration struct {
	Users []string      `yaml:"users"`
	Delay time.Duration `yaml:"delay"`
}

func (AutoAwayConfiguration) IsActive

func (c AutoAwayConfiguration) IsActive() bool

type Configuration

type Configuration struct {
	Home  HomeConfiguration
	Zones []ZoneConfiguration
}

func Load

func Load(r io.Reader) (Configuration, error)

type HomeConfiguration

type HomeConfiguration struct {
	AutoAway AutoAwayConfiguration `yaml:"autoAway"`
}

type LimitOverlayConfiguration

type LimitOverlayConfiguration struct {
	Delay time.Duration `yaml:"delay"`
}

func (LimitOverlayConfiguration) IsActive

func (c LimitOverlayConfiguration) IsActive() bool

type NightTimeConfiguration

type NightTimeConfiguration struct {
	Timestamp Timestamp `yaml:"time"`
}

func (NightTimeConfiguration) IsActive

func (c NightTimeConfiguration) IsActive() bool

type Timestamp

type Timestamp struct {
	Hour    int
	Minutes int
	Seconds int
	Active  bool
}

func (Timestamp) MarshalYAML

func (t Timestamp) MarshalYAML() (any, error)

func (*Timestamp) UnmarshalYAML

func (t *Timestamp) UnmarshalYAML(value *yaml.Node) error

type ZoneConfiguration

type ZoneConfiguration struct {
	Name  string                `yaml:"name"`
	Rules ZoneRuleConfiguration `yaml:"rules"`
}

type ZoneRuleConfiguration

type ZoneRuleConfiguration struct {
	AutoAway     AutoAwayConfiguration     `yaml:"autoAway"`
	LimitOverlay LimitOverlayConfiguration `yaml:"limitOverlay"`
	NightTime    NightTimeConfiguration    `yaml:"nightTime"`
}

func (ZoneRuleConfiguration) IsActive

func (c ZoneRuleConfiguration) IsActive() bool

Jump to

Keyboard shortcuts

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