config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveConfig

func SaveConfig(config *Config) error

SaveConfig writes the updated Config struct back to the YAML file

func SetDefaults

func SetDefaults(cfg *Config)

func ValidateConfig

func ValidateConfig(cfg *Config) error

ValidateConfig checks if the configuration values are valid

Types

type Config

type Config struct {
	Reminder struct {
		Time    string `yaml:"time"`
		Title   string `yaml:"title"`
		Message string `yaml:"message"`
	} `yaml:"reminder"`
	Plugins struct {
		Jira struct {
			Enabled bool   `yaml:"enabled"`
			BaseURL string `yaml:"base_url"`
		} `yaml:"jira"`
		GitHub struct {
			Enabled  bool   `yaml:"enabled"`
			APIToken string `yaml:"api_token"`
		} `yaml:"github"`
	} `yaml:"plugins"`
}

Config structure to represent the YAML config file

func LoadConfig

func LoadConfig() (*Config, error)

LoadConfig reads the config.yaml file and parses it into the Config struct

Jump to

Keyboard shortcuts

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