Documentation
¶
Overview ¶
Code generated by tool; DO NOT EDIT.
Code generated by tool; DO NOT EDIT.
Code generated by tool; DO NOT EDIT.
Index ¶
- func LoadconfigurationFromFile(filename string, params *AllParameters) error
- func LoadvarsConfigFromFile(filename string, params *SystemVariables) error
- func LoadvconfigFromFile(filename string, params *Variables) error
- type AllParameters
- func (ap *AllParameters) GetBoolSet1() bool
- func (ap *AllParameters) GetBoolSet2() bool
- func (ap *AllParameters) GetBoolSet3() bool
- func (ap *AllParameters) GetDefinition(name string) (string, error)
- func (ap *AllParameters) GetFloat64Range1() float64
- func (ap *AllParameters) GetFloat64set1() float64
- func (ap *AllParameters) GetFloat64set2() float64
- func (ap *AllParameters) GetFloat64set3() float64
- func (ap *AllParameters) GetInt64Range1() int64
- func (ap *AllParameters) GetInt64set1() int64
- func (ap *AllParameters) GetInt64set2() int64
- func (ap *AllParameters) GetInt64set3() int64
- func (ap *AllParameters) GetStringSet1() string
- func (ap *AllParameters) GetStringSet2() string
- func (ap *AllParameters) HasParameter(name string) bool
- func (ap *AllParameters) LoadInitialValues() error
- func (ap *AllParameters) PrepareDefinition()
- func (ap *AllParameters) SetBoolSet1(value bool) error
- func (ap *AllParameters) SetBoolSet2(value bool) error
- func (ap *AllParameters) SetBoolSet3(value bool) error
- func (ap *AllParameters) SetFloat64Range1(value float64) error
- func (ap *AllParameters) SetFloat64set1(value float64) error
- func (ap *AllParameters) SetFloat64set3(value float64) error
- func (ap *AllParameters) SetInt64Range1(value int64) error
- func (ap *AllParameters) SetInt64set1(value int64) error
- func (ap *AllParameters) SetInt64set3(value int64) error
- func (ap *AllParameters) SetStringSet1(value string) error
- func (ap *AllParameters) SetStringSet2(value string) error
- func (ap *AllParameters) UpdateParametersWithConfiguration(config *configuration) error
- type ConfigurationFileGenerator
- type ConfigurationFileGeneratorImpl
- type ConfigurationFileHotLoader
- type SystemVariables
- func (ap *SystemVariables) GetDefinition(name string) (string, error)
- func (ap *SystemVariables) GetDumppassword() string
- func (ap *SystemVariables) GetDumpuser() string
- func (ap *SystemVariables) GetHost() string
- func (ap *SystemVariables) GetPort() int64
- func (ap *SystemVariables) GetRootname() string
- func (ap *SystemVariables) GetRootpassword() string
- func (ap *SystemVariables) HasParameter(name string) bool
- func (ap *SystemVariables) LoadInitialValues() error
- func (ap *SystemVariables) PrepareDefinition()
- func (ap *SystemVariables) SetRootpassword(value string) error
- func (ap *SystemVariables) UpdateParametersWithConfiguration(config *varsConfig) error
- type Variables
- func (ap *Variables) GetAutoload() bool
- func (ap *Variables) GetDefinition(name string) (string, error)
- func (ap *Variables) GetDumppassword() string
- func (ap *Variables) GetDumpuser() string
- func (ap *Variables) GetIp() string
- func (ap *Variables) GetPort() int64
- func (ap *Variables) GetRootname() string
- func (ap *Variables) GetRootpassword() string
- func (ap *Variables) HasParameter(name string) bool
- func (ap *Variables) LoadInitialValues() error
- func (ap *Variables) PrepareDefinition()
- func (ap *Variables) SetAutoload(value bool) error
- func (ap *Variables) SetDumppassword(value string) error
- func (ap *Variables) SetDumpuser(value string) error
- func (ap *Variables) SetIp(value string) error
- func (ap *Variables) SetPort(value int64) error
- func (ap *Variables) SetRootname(value string) error
- func (ap *Variables) SetRootpassword(value string) error
- func (ap *Variables) UpdateParametersWithConfiguration(config *vconfig) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadconfigurationFromFile ¶
func LoadconfigurationFromFile(filename string, params *AllParameters) error
* Load configuration from file into configuration. Then update items into AllParameters
func LoadvarsConfigFromFile ¶
func LoadvarsConfigFromFile(filename string, params *SystemVariables) error
* Load configuration from file into varsConfig. Then update items into SystemVariables
func LoadvconfigFromFile ¶
* Load configuration from file into vconfig. Then update items into Variables
Types ¶
type AllParameters ¶
type AllParameters struct {
// contains filtered or unexported fields
} //end AllParameters
all parameters in the system
func (*AllParameters) GetBoolSet1 ¶
func (ap *AllParameters) GetBoolSet1() bool
* Get the value of the parameter boolSet1
func (*AllParameters) GetBoolSet2 ¶
func (ap *AllParameters) GetBoolSet2() bool
* Get the value of the parameter boolSet2
func (*AllParameters) GetBoolSet3 ¶
func (ap *AllParameters) GetBoolSet3() bool
* Get the value of the parameter boolSet3
func (*AllParameters) GetDefinition ¶
func (ap *AllParameters) GetDefinition(name string) (string, error)
* get the definition of the parameter.
func (*AllParameters) GetFloat64Range1 ¶
func (ap *AllParameters) GetFloat64Range1() float64
* Get the value of the parameter float64Range1
func (*AllParameters) GetFloat64set1 ¶
func (ap *AllParameters) GetFloat64set1() float64
* Get the value of the parameter float64set1
func (*AllParameters) GetFloat64set2 ¶
func (ap *AllParameters) GetFloat64set2() float64
* Get the value of the parameter float64set2
func (*AllParameters) GetFloat64set3 ¶
func (ap *AllParameters) GetFloat64set3() float64
* Get the value of the parameter float64set3
func (*AllParameters) GetInt64Range1 ¶
func (ap *AllParameters) GetInt64Range1() int64
* Get the value of the parameter int64Range1
func (*AllParameters) GetInt64set1 ¶
func (ap *AllParameters) GetInt64set1() int64
* Get the value of the parameter int64set1
func (*AllParameters) GetInt64set2 ¶
func (ap *AllParameters) GetInt64set2() int64
* Get the value of the parameter int64set2
func (*AllParameters) GetInt64set3 ¶
func (ap *AllParameters) GetInt64set3() int64
* Get the value of the parameter int64set3
func (*AllParameters) GetStringSet1 ¶
func (ap *AllParameters) GetStringSet1() string
* Get the value of the parameter stringSet1
func (*AllParameters) GetStringSet2 ¶
func (ap *AllParameters) GetStringSet2() string
* Get the value of the parameter stringSet2
func (*AllParameters) HasParameter ¶
func (ap *AllParameters) HasParameter(name string) bool
* check if there is the parameter
func (*AllParameters) LoadInitialValues ¶
func (ap *AllParameters) LoadInitialValues() error
* Load the initial values of all parameters.
func (*AllParameters) PrepareDefinition ¶
func (ap *AllParameters) PrepareDefinition()
* set parameter and its string of the definition.
func (*AllParameters) SetBoolSet1 ¶
func (ap *AllParameters) SetBoolSet1(value bool) error
* Set the value of the parameter boolSet1
func (*AllParameters) SetBoolSet2 ¶
func (ap *AllParameters) SetBoolSet2(value bool) error
* Set the value of the parameter boolSet2
func (*AllParameters) SetBoolSet3 ¶
func (ap *AllParameters) SetBoolSet3(value bool) error
* Set the value of the parameter boolSet3
func (*AllParameters) SetFloat64Range1 ¶
func (ap *AllParameters) SetFloat64Range1(value float64) error
* Set the value of the parameter float64Range1
func (*AllParameters) SetFloat64set1 ¶
func (ap *AllParameters) SetFloat64set1(value float64) error
* Set the value of the parameter float64set1
func (*AllParameters) SetFloat64set3 ¶
func (ap *AllParameters) SetFloat64set3(value float64) error
* Set the value of the parameter float64set3
func (*AllParameters) SetInt64Range1 ¶
func (ap *AllParameters) SetInt64Range1(value int64) error
* Set the value of the parameter int64Range1
func (*AllParameters) SetInt64set1 ¶
func (ap *AllParameters) SetInt64set1(value int64) error
* Set the value of the parameter int64set1
func (*AllParameters) SetInt64set3 ¶
func (ap *AllParameters) SetInt64set3(value int64) error
* Set the value of the parameter int64set3
func (*AllParameters) SetStringSet1 ¶
func (ap *AllParameters) SetStringSet1(value string) error
* Set the value of the parameter stringSet1
func (*AllParameters) SetStringSet2 ¶
func (ap *AllParameters) SetStringSet2(value string) error
* Set the value of the parameter stringSet2
func (*AllParameters) UpdateParametersWithConfiguration ¶
func (ap *AllParameters) UpdateParametersWithConfiguration(config *configuration) error
* Update parameters' values with configuration.
type ConfigurationFileGenerator ¶
type ConfigurationFileGenerator interface {
/**
Input: parameter definition file name
Output:
1. operation interface and code for parameters
2. configuraion file for parameters
*/
Generate() error
}
* Analyse the template files. Generate configuration file, operation interfaces.
func NewConfigurationFileGenerator ¶
func NewConfigurationFileGenerator(defFileName string) ConfigurationFileGenerator
type ConfigurationFileGeneratorImpl ¶
type ConfigurationFileGeneratorImpl struct {
// contains filtered or unexported fields
}
func (*ConfigurationFileGeneratorImpl) Generate ¶
func (cfgi *ConfigurationFileGeneratorImpl) Generate() error
type ConfigurationFileHotLoader ¶
type ConfigurationFileHotLoader interface {
/**
register a configuration file into the loader.
path : the path of the configuration file
period: load the configration every period
configObject: the target that will be updated
*/
Register(path string, period int64, configObject interface{})
/**
unregister a configuration file from the loader.
the configuration file will be loaded again.
*/
Unregister(path string)
}
* load items from configuration file periodly.
type SystemVariables ¶
type SystemVariables struct {
// contains filtered or unexported fields
} //end SystemVariables
all parameters in the system
func (*SystemVariables) GetDefinition ¶
func (ap *SystemVariables) GetDefinition(name string) (string, error)
* get the definition of the parameter.
func (*SystemVariables) GetDumppassword ¶
func (ap *SystemVariables) GetDumppassword() string
* Get the value of the parameter dumppassword
func (*SystemVariables) GetDumpuser ¶
func (ap *SystemVariables) GetDumpuser() string
* Get the value of the parameter dumpuser
func (*SystemVariables) GetHost ¶
func (ap *SystemVariables) GetHost() string
* Get the value of the parameter host
func (*SystemVariables) GetPort ¶
func (ap *SystemVariables) GetPort() int64
* Get the value of the parameter port
func (*SystemVariables) GetRootname ¶
func (ap *SystemVariables) GetRootname() string
* Get the value of the parameter rootname
func (*SystemVariables) GetRootpassword ¶
func (ap *SystemVariables) GetRootpassword() string
* Get the value of the parameter rootpassword
func (*SystemVariables) HasParameter ¶
func (ap *SystemVariables) HasParameter(name string) bool
* check if there is the parameter
func (*SystemVariables) LoadInitialValues ¶
func (ap *SystemVariables) LoadInitialValues() error
* Load the initial values of all parameters.
func (*SystemVariables) PrepareDefinition ¶
func (ap *SystemVariables) PrepareDefinition()
* set parameter and its string of the definition.
func (*SystemVariables) SetRootpassword ¶
func (ap *SystemVariables) SetRootpassword(value string) error
* Set the value of the parameter rootpassword
func (*SystemVariables) UpdateParametersWithConfiguration ¶
func (ap *SystemVariables) UpdateParametersWithConfiguration(config *varsConfig) error
* Update parameters' values with configuration.
type Variables ¶
type Variables struct {
// contains filtered or unexported fields
} //end Variables
all parameters in the system
func (*Variables) GetAutoload ¶
* Get the value of the parameter autoload
func (*Variables) GetDefinition ¶
* get the definition of the parameter.
func (*Variables) GetDumppassword ¶
* Get the value of the parameter dumppassword
func (*Variables) GetDumpuser ¶
* Get the value of the parameter dumpuser
func (*Variables) GetRootname ¶
* Get the value of the parameter rootname
func (*Variables) GetRootpassword ¶
* Get the value of the parameter rootpassword
func (*Variables) HasParameter ¶
* check if there is the parameter
func (*Variables) LoadInitialValues ¶
* Load the initial values of all parameters.
func (*Variables) PrepareDefinition ¶
func (ap *Variables) PrepareDefinition()
* set parameter and its string of the definition.
func (*Variables) SetAutoload ¶
* Set the value of the parameter autoload
func (*Variables) SetDumppassword ¶
* Set the value of the parameter dumppassword
func (*Variables) SetDumpuser ¶
* Set the value of the parameter dumpuser
func (*Variables) SetRootname ¶
* Set the value of the parameter rootname
func (*Variables) SetRootpassword ¶
* Set the value of the parameter rootpassword
func (*Variables) UpdateParametersWithConfiguration ¶
* Update parameters' values with configuration.