Documentation ¶
Overview ¶
Package config provides APIs for managing the shell's runtime config
Index ¶
- Variables
- type Config
- func (conf *Config) Copy() *Config
- func (conf *Config) DataType(app, key string) string
- func (conf *Config) Default(app string, key string, fileRef *ref.File) error
- func (conf *Config) Define(app string, key string, properties Properties)
- func (conf *Config) DumpConfig() (obj map[string]map[string]map[string]any)
- func (conf *Config) DumpRuntime() (obj map[string]map[string]map[string]any)
- func (conf *Config) ExistsAndGlobal(app, key string) (exists, global bool)
- func (conf *Config) Get(app, key, dataType string) (any, error)
- func (conf *Config) GetFileRef(app, key, dataType string) (any, *ref.File, error)
- func (conf *Config) Set(app string, key string, value any, fileRef *ref.File) error
- type DynamicProperties
- type GoFuncProperties
- type Properties
Constants ¶
This section is empty.
Variables ¶
var InitConf = newGlobal()
InitConf is a table of global config options
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config is used to store all the configuration settings, `config`, in a thread-safe API
func (*Config) Define ¶
func (conf *Config) Define(app string, key string, properties Properties)
Define allows new properties to be created in the Config object
func (*Config) DumpConfig ¶
DumpConfig returns an object based on Config which is optimised for JSON serialisation for the `config` CLI command
func (*Config) DumpRuntime ¶
DumpRuntime returns an object based on Config which is optimised for JSON serialisation for the `runtime --config` CLI command
func (*Config) ExistsAndGlobal ¶
ExistsAndGlobal checks if a config option exists and/or is global
func (*Config) Get ¶
Get retrieves a setting from the Config. Returns an interface{} for the value and err for any failures
app == tooling name key == name of setting dataType == what `types.dataType` to cast the return value into
func (*Config) GetFileRef ¶
GetFileRef retrieves a setting from the Config. Returns an interface{} for the value and err for any failures
type DynamicProperties ¶
type DynamicProperties struct { Read string Write string GetDynamic getDynamicT `json:"-"` SetDynamic setDynamicT `json:"-"` }
DynamicProperties is used for dynamic values written in murex
type GoFuncProperties ¶
type GoFuncProperties struct { Read func() (any, error) `json:"-"` Write func(any) error `json:"-"` }
GoFuncProperties are used for dynamic values written in Go
type Properties ¶
type Properties struct { Description string Default any DataType string Options []string Global bool Dynamic DynamicProperties GoFunc GoFuncProperties FileRefDef *ref.File }
Properties is the Config defaults and descriptions
Directories ¶
Path | Synopsis |
---|---|
Package defaults defines the default state for many run time config
|
Package defaults defines the default state for many run time config |
Package profile is used to read the various non-default murex user profiles and modules
|
Package profile is used to read the various non-default murex user profiles and modules |