Documentation ¶
Index ¶
- func GetDefaultConf() string
- func Init_template() template.Template
- type Configuration
- type ConfigurationManager
- func (c *ConfigurationManager) GetIODevices() map[string]IODeviceConfiguration
- func (c *ConfigurationManager) GetIOIntervals() []IntervalDisplay
- func (c *ConfigurationManager) GetIOReadLabel() string
- func (c *ConfigurationManager) GetIOReadLabelBg() string
- func (c *ConfigurationManager) GetIOReadLabelFg() string
- func (c *ConfigurationManager) GetIOWriteLabel() string
- func (c *ConfigurationManager) GetIOWriteLabelBg() string
- func (c *ConfigurationManager) GetIOWriteLabelFg() string
- func (c *ConfigurationManager) GetLoadIntervals() []IntervalDisplay
- func (c *ConfigurationManager) GetMemIntervals() []IntervalDisplay
- func (c *ConfigurationManager) GetMemSeparator() string
- func (c *ConfigurationManager) GetMemSeparatorBg() string
- func (c *ConfigurationManager) GetMemSeparatorFg() string
- func (c *ConfigurationManager) GetMemTotalBg() string
- func (c *ConfigurationManager) GetMemTotalFg() string
- func (c *ConfigurationManager) GetNetDownLabel() string
- func (c *ConfigurationManager) GetNetDownLabelBg() string
- func (c *ConfigurationManager) GetNetDownLabelFg() string
- func (c *ConfigurationManager) GetNetInterfaces() map[string]NetIFConfiguration
- func (c *ConfigurationManager) GetNetIntervals() []IntervalDisplay
- func (c *ConfigurationManager) GetNetUpLabel() string
- func (c *ConfigurationManager) GetNetUpLabelBg() string
- func (c *ConfigurationManager) GetNetUpLabelFg() string
- func (c *ConfigurationManager) GetSensorsTemplate(format string) template.Template
- type IOConfiguration
- type IODeviceConfiguration
- type IntervalDisplay
- type LoadConfiguration
- type MemConfiguration
- type NetConfiguration
- type NetIFConfiguration
- type SensorsConfiguration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDefaultConf ¶
func GetDefaultConf() string
func Init_template ¶
Types ¶
type Configuration ¶
type Configuration struct { Load *LoadConfiguration `json:"load"` Net *NetConfiguration `json:"net"` Mem *MemConfiguration `json:"mem"` IO *IOConfiguration `json:"io"` Sensors *SensorsConfiguration `json:"sensors"` }
func LoadConfFromBytes ¶
func LoadConfFromBytes(json_input []byte) *Configuration
type ConfigurationManager ¶
type ConfigurationManager struct { User *Configuration Default *Configuration }
func LoadConf ¶
func LoadConf() *ConfigurationManager
func (*ConfigurationManager) GetIODevices ¶
func (c *ConfigurationManager) GetIODevices() map[string]IODeviceConfiguration
func (*ConfigurationManager) GetIOIntervals ¶
func (c *ConfigurationManager) GetIOIntervals() []IntervalDisplay
func (*ConfigurationManager) GetIOReadLabel ¶
func (c *ConfigurationManager) GetIOReadLabel() string
func (*ConfigurationManager) GetIOReadLabelBg ¶
func (c *ConfigurationManager) GetIOReadLabelBg() string
func (*ConfigurationManager) GetIOReadLabelFg ¶
func (c *ConfigurationManager) GetIOReadLabelFg() string
func (*ConfigurationManager) GetIOWriteLabel ¶
func (c *ConfigurationManager) GetIOWriteLabel() string
func (*ConfigurationManager) GetIOWriteLabelBg ¶
func (c *ConfigurationManager) GetIOWriteLabelBg() string
func (*ConfigurationManager) GetIOWriteLabelFg ¶
func (c *ConfigurationManager) GetIOWriteLabelFg() string
func (*ConfigurationManager) GetLoadIntervals ¶
func (c *ConfigurationManager) GetLoadIntervals() []IntervalDisplay
func (*ConfigurationManager) GetMemIntervals ¶
func (c *ConfigurationManager) GetMemIntervals() []IntervalDisplay
func (*ConfigurationManager) GetMemSeparator ¶
func (c *ConfigurationManager) GetMemSeparator() string
func (*ConfigurationManager) GetMemSeparatorBg ¶
func (c *ConfigurationManager) GetMemSeparatorBg() string
func (*ConfigurationManager) GetMemSeparatorFg ¶
func (c *ConfigurationManager) GetMemSeparatorFg() string
func (*ConfigurationManager) GetMemTotalBg ¶
func (c *ConfigurationManager) GetMemTotalBg() string
func (*ConfigurationManager) GetMemTotalFg ¶
func (c *ConfigurationManager) GetMemTotalFg() string
func (*ConfigurationManager) GetNetDownLabel ¶
func (c *ConfigurationManager) GetNetDownLabel() string
func (*ConfigurationManager) GetNetDownLabelBg ¶
func (c *ConfigurationManager) GetNetDownLabelBg() string
func (*ConfigurationManager) GetNetDownLabelFg ¶
func (c *ConfigurationManager) GetNetDownLabelFg() string
func (*ConfigurationManager) GetNetInterfaces ¶
func (c *ConfigurationManager) GetNetInterfaces() map[string]NetIFConfiguration
func (*ConfigurationManager) GetNetIntervals ¶
func (c *ConfigurationManager) GetNetIntervals() []IntervalDisplay
func (*ConfigurationManager) GetNetUpLabel ¶
func (c *ConfigurationManager) GetNetUpLabel() string
func (*ConfigurationManager) GetNetUpLabelBg ¶
func (c *ConfigurationManager) GetNetUpLabelBg() string
func (*ConfigurationManager) GetNetUpLabelFg ¶
func (c *ConfigurationManager) GetNetUpLabelFg() string
func (*ConfigurationManager) GetSensorsTemplate ¶
func (c *ConfigurationManager) GetSensorsTemplate(format string) template.Template
format -- CLI option
type IOConfiguration ¶
type IOConfiguration struct { Devices *map[string]IODeviceConfiguration `json:"devices"` ReadLabel *string `json:"read_label"` ReadLabelBg *string `json:"read_label_bg"` ReadLabelFg *string `json:"read_label_fg"` WriteLabel *string `json:"write_label"` WriteLabelBg *string `json:"write_label_bg"` WriteLabelFg *string `json:"write_label_fg"` Intervals *[]IntervalDisplay `json:"intervals"` }
type IODeviceConfiguration ¶
type IntervalDisplay ¶
type IntervalDisplay struct { From *string `json:"from"` To *string `json:"to"` BgColor string `json:"bg_color"` FgColor string `json:"fg_color"` }
func (*IntervalDisplay) GetFrom ¶
func (i *IntervalDisplay) GetFrom() (float64, bool)
func (*IntervalDisplay) GetTo ¶
func (i *IntervalDisplay) GetTo() (float64, bool)
type LoadConfiguration ¶
type LoadConfiguration struct {
Intervals *[]IntervalDisplay `json:"intervals"`
}
type MemConfiguration ¶
type NetConfiguration ¶
type NetConfiguration struct { Interfaces *map[string]NetIFConfiguration `json:"interfaces"` UpLabel *string `json:"upload_label"` UpLabelBg *string `json:"upload_label_bg"` UpLabelFg *string `json:"upload_label_fg"` DownLabel *string `json:"download_label"` DownLabelBg *string `json:"download_label_bg"` DownLabelFg *string `json:"download_label_fg"` Intervals *[]IntervalDisplay `json:"intervals"` }
type NetIFConfiguration ¶
type SensorsConfiguration ¶
type SensorsConfiguration struct {
Template *string `json:"template"`
}
configuration in a config file
Click to show internal directories.
Click to hide internal directories.