config

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InRange

func InRange[T cmp.Ordered](min T, value T, max T) bool

func ToDuration

func ToDuration(seconds *float64) time.Duration

Types

type Config

type Config struct {
	Period  *models.Seconds
	Fans    []Fan
	Sensors []Sensor
	Profile *Profile
}

func Load

func Load(path string) (Config, error)

type Fan

type Fan struct {
	Name string
	Type string

	Sensors []string
	Select  string

	Level     string
	Repeat    *models.Seconds
	Delay     *models.Seconds
	DelayUp   *models.Seconds `yaml:"delayUp"`
	DelayDown *models.Seconds `yaml:"delayDown"`
	Levels    []Level
	Profiles  []ProfileLevels

	Path         string
	RawLevel     bool   `yaml:"rawLevel"`
	SuspendLevel string `yaml:"suspendLevel"`
}

type Level

type Level struct {
	Min       *float64
	Max       *float64
	Level     string
	Delay     *models.Seconds
	DelayUp   *models.Seconds `yaml:"delayUp"`
	DelayDown *models.Seconds `yaml:"delayDown"`
}

type Profile

type Profile struct {
	Type string
	Path string
}

type ProfileLevels

type ProfileLevels struct {
	Name      string
	Levels    []Level
	Delay     *models.Seconds
	DelayUp   *models.Seconds `yaml:"delayUp"`
	DelayDown *models.Seconds `yaml:"delayDown"`
}

type Sensor

type Sensor struct {
	Name   string
	Type   string
	Factor *float64
	Add    *float64

	Sensor string
	Label  string
	Select string
	Path   string
}

Jump to

Keyboard shortcuts

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