internal

package
v0.0.0-...-ae2f2bf Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2021 License: LGPL-2.1 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WindowID    WindowProperty = "id"
	WindowClass                = "class"
	WindowName                 = "name"
	WindowType                 = "type"

	Or  FilterOperator = "or"
	And                = "and"

	GroupID   GroupProperty = "id"
	GroupName               = "name"
)
View Source
const DefaultCellSelectionGUITheme string = `` /* 743-byte string literal not displayed */
View Source
const DefaultGroupCreationGUITheme string = `` /* 598-byte string literal not displayed */
View Source
const DefaultGroupSelectionGUITheme string = `` /* 966-byte string literal not displayed */
View Source
const DefaultWindowSelectionGUITheme string = `` /* 967-byte string literal not displayed */

Variables

View Source
var (
	NormalLogger  *logrus.Entry //nolint:gochecknoglobals //Need the main logger to be global
	VerboseLogger *logrus.Entry //nolint:gochecknoglobals //Need the main logger to be global
)
View Source
var AlreadyExistsError error = eris.New("Element already exists")

AlreadyExistsError Sentinel error for element already existing.

View Source
var ConfigurationError error = eris.New("Error handling configuration configuration")

ConfigurationError Sentinel error for configuration argument.

View Source
var InternalError error = eris.New("Internal error")

InternalError Sentinel error for all purpose argument.

View Source
var InvalidArgumentError error = eris.New("Invalid argument")

InvalidArgumentError Sentinel error for invalid argument.

View Source
var NotExistsError error = eris.New("Element does not exist")

NotExistsError Sentinel error for non existent argument.

View Source
var OutOfRangeArgumentError error = eris.New("Out of range argument")

OutOfRangeArgumentError Sentinel error for out of range argument.

Functions

func HexStringToInt

func HexStringToInt(hexStrToConvert string) (res uint32, err error)

func InitConfigFile

func InitConfigFile() (err error)

func InitLoggers

func InitLoggers()

func InitThemes

func InitThemes() (err error)

Types

type Configuration

type Configuration struct {
	GridConfig        GridConfiguration        `yaml:"grid" mapstructure:"grid"`
	GUIConfig         GUIConfiguration         `yaml:"gui" mapstructure:"gui"`
	GroupLabelsConfig GroupLabelsConfiguration `yaml:"group_labels" mapstructure:"group_labels"`
	GroupConfigs      []GroupConfiguration     `yaml:"groups" mapstructure:"groups"`
}

type FilterConfiguration

type FilterConfiguration struct {
	WinProperty WindowProperty        `yaml:"window_property,omitempty" mapstructure:"window_property,omitempty"`
	Regex       string                `yaml:"regex,omitempty" mapstructure:"regex,omitempty"`
	Operator    FilterOperator        `yaml:"operator,omitempty" mapstructure:"operator,omitempty"`
	Filters     []FilterConfiguration `yaml:"filters,omitempty" mapstructure:"filters,omitempty"`
}

type FilterOperator

type FilterOperator string

func (*FilterOperator) UnmarshalJSON

func (op *FilterOperator) UnmarshalJSON(b []byte) (err error)

type GUIConfiguration

type GUIConfiguration struct {
	CellSelection   SpecificGUIConfiguration `yaml:"cellselection" mapstructure:"cellselection"`
	GroupSelection  SpecificGUIConfiguration `yaml:"groupselection" mapstructure:"groupselection"`
	WindowSelection SpecificGUIConfiguration `yaml:"windowselection" mapstructure:"windowselection"`
	GroupCreation   SpecificGUIConfiguration `yaml:"groupcreation" mapstructure:"groupcreation"`
}

type GridConfiguration

type GridConfiguration struct {
	Cols uint32 `yaml:"cols" mapstructure:"cols"`
	Rows uint32 `yaml:"rows" mapstructure:"rows"`
}

type GroupConfiguration

type GroupConfiguration struct {
	ID      uint8                 `yaml:"id" mapstructure:"id"`
	Name    string                `yaml:"name" mapstructure:"name"`
	Color   string                `yaml:"color" mapstructure:"color"`
	Filters []FilterConfiguration `yaml:"filters" mapstructure:"filters"`
}

type GroupLabelsConfiguration

type GroupLabelsConfiguration struct {
	Font           string `yaml:"font" mapstructure:"font"`
	Position       string `yaml:"position" mapstructure:"position"`
	FontSize       uint32 `yaml:"font_size" mapstructure:"font_size"`
	DisplayTimeout uint32 `yaml:"display_timeout" mapstructure:"display_timeout"`
}

type GroupProperty

type GroupProperty string

type SpecificGUIConfiguration

type SpecificGUIConfiguration struct {
	ThemeFilePath string `yaml:"theme_filepath" mapstructure:"theme_filepath"`
	Position      string `yaml:"position" mapstructure:"position"`
}

type WindowProperty

type WindowProperty string

func (*WindowProperty) UnmarshalJSON

func (wf *WindowProperty) UnmarshalJSON(b []byte) (err error)

Directories

Path Synopsis
hmi
cli
gui

Jump to

Keyboard shortcuts

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