config

package
v0.0.0-...-f3d3b89 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckConfig

func CheckConfig(target TargetValue) (err error)

Returns error for invalid configurations

Types

type TargetValue

type TargetValue map[time.Weekday][]timerange.TimeRange

For each weekday, we can define a list of time ranges we want to try to make a reservation in. The list is sorted by descreasing priority. If a slot is open within the first time range, a reservation will be executed for that slot.

func LoadConfig

func LoadConfig(filename string) (target TargetValue, err error)

func (*TargetValue) Clone

func (t *TargetValue) Clone() TargetValue

type TargetValueJSON

type TargetValueJSON map[string][]timerange.TimeRange

func (TargetValueJSON) Parse

func (json TargetValueJSON) Parse() (target TargetValue, err error)

Jump to

Keyboard shortcuts

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