Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LV2HostConfig ¶
type LV2HostConfig struct { Plugins []LV2PluginConfig ValueMap map[string]interface{} FunctionMap map[string]govaluate.ExpressionFunction }
LV2HostConfig is main config structure containing plugin configuration. In addition, it also contains a parameter map (untyped), as well as govaluate expression function map, to enable evaluating arbitrary functions as part of config parsing.
func NewLV2HostConfig ¶
func NewLV2HostConfig() *LV2HostConfig
NewLV2HostConfig allocate new host config (usually for purposes of setting up its value map parameters)
func (*LV2HostConfig) Evaluate ¶
func (c *LV2HostConfig) Evaluate() error
Evaluate uses govaluate to (re-)parse contents of config structure into actual values.
func (*LV2HostConfig) ReadFile ¶
func (c *LV2HostConfig) ReadFile(file string) error
ReadFile will read a YAML config into an LV2HostConfig data structure. Note that any Data fields will not be initialized until Evaluate is called.
func (*LV2HostConfig) WriteToFile ¶
func (c *LV2HostConfig) WriteToFile(file string) error
WriteToFile will write LV2HostConfig data back into YAML form. Note that Data contents is not dumped into YAML - DataFmt is dumped instead. Therefore, any changes to Data values will not be reflected in the YAML file unless DataFmt was changed accordingly.
type LV2PluginConfig ¶
LV2PluginConfig is plugin config structure. Use LV2 symbols to map parameters to values. Also contains original formatting for data, in case the config would need to be saved back into file form.
func NewLV2PluginConfig ¶
func NewLV2PluginConfig() LV2PluginConfig
NewLV2PluginConfig allocate new plugin config