config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: GPL-3.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CfgFiles = []string{
	"$HOME/.config/uberstatus/uberstatus.conf",
	"./cfg/uberstatus.conf",
	"./cfg/uberstatus.default.conf",
	"/usr/share/doc/uberstatus/uberstatus.example.conf",
}

Functions

This section is empty.

Types

type Config

type Config struct {
	Plugins          []PluginConfig
	PanicOnBadPlugin bool               `yaml:"panic_on_bad_plugin"`
	Logger           *zap.SugaredLogger `yaml:"-"`
}

func (*Config) GetDefaultConfig

func (c *Config) GetDefaultConfig() string

func (*Config) SetConfig

func (c *Config) SetConfig(s string)

type PluginConfig

type PluginConfig struct {
	Name     string             `yaml:"name"`
	Instance string             `yaml:"instance"`
	Plugin   string             `yaml:"plugin"`
	Config   yaml.Node          `yaml:"config"`
	Logger   *zap.SugaredLogger `yaml:"-"`
}

func (*PluginConfig) GetConfig

func (p *PluginConfig) GetConfig(i interface{}) error

pass your config struct to this function, it will fill it

Jump to

Keyboard shortcuts

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