config

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetColor

func GetColor(hex string) tcell.Color

func GetSampleConfig

func GetSampleConfig() string

func InitConfigFiles

func InitConfigFiles() (string, error)

func LoadConfig

func LoadConfig()

Types

type Alias added in v0.3.0

type Alias struct {
	Key   string
	Value string
	Model string
	Color string
}

type Config

type Config struct {
	Servers    map[string]*odoo.Server `mapstructure:"servers"`
	MetaConfig *MainConfig             `mapstructure:"config"`
	Macros     map[string]Macro        `mapstructure:"macros"`
	Aliases    []Alias                 `mapstructure:"aliases"`
	Maps       MapConfig               `mapstructure:"maps"`
	Log        *logrus.Logger
	URL        string
	Version    string
}

type Macro

type Macro struct {
	Description, Model string
	Limit              int
	Domain             [][]interface{}
	Fields             []string
	Order              string
	Context            odoo.OdooContext
}

type MainConfig

type MainConfig struct {
	DefaultServer  string        `mapstructure:"default_server"`
	DefaultLimit   int           `mapstructure:"default_limit"`
	DefaultMacro   string        `mapstructure:"default_macro"`
	Readonly       bool          `mapstructure:"readonly"`
	ZenMode        bool          `mapstructure:"zen_mode"`
	Debug          bool          `mapstructure:"debug"`
	Refresh        RefreshConfig `mapstructure:"refresh"`
	ShowIDs        bool          `mapstructure:"show_ids"`
	DateFormat     string        `mapstructure:"date_format"`
	DatetimeFormat string        `mapstructure:"datetime_format"`
	NoHeader       bool          `mapstructure:"no_header"`
	NoPassword     bool          `mapstructure:"no_password"`
	Timeout        int           `mapstructure:"timeout"`
}

type MapConfig

type MapConfig map[string][]MapInfo

type MapInfo

type MapInfo struct {
	Relation string `mapstructure:"relation"`
	Field    string `mapstructure:"field"`
}

type RefreshConfig

type RefreshConfig struct {
	Startup         bool `mapstructure:"startup"`
	IntervalSeconds int  `mapstructure:"interval_seconds"`
}

type Skin

type Skin struct {
	ModalFgColor         tcell.Color
	MainFgColor          tcell.Color
	SecondaryFgColor     tcell.Color
	OptionalFgColor      tcell.Color
	FieldLabelColor      tcell.Color
	FieldValueColor      tcell.Color
	FieldColonColor      tcell.Color
	BackgroundColor      tcell.Color
	ModalBackgroundColor tcell.Color
	BorderColor          tcell.Color
	FgErrorColor         tcell.Color
	FgSuccessColor       tcell.Color
	TitleColor           tcell.Color
	TableBodyFgColor     tcell.Color
	TableHeaderFgColor   tcell.Color
	TableSelectedFgColor tcell.Color
	StatesColor          map[string]tcell.Color
}

func GetSkin

func GetSkin() Skin

type Skins

type Skins map[string]Skin

Jump to

Keyboard shortcuts

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