config

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Code generated by tool; DO NOT EDIT.

Code generated by tool; DO NOT EDIT.

Code generated by tool; DO NOT EDIT.

Index

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

func LoadvconfigFromFile(filename string, params *Variables) error

* 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

func (ap *Variables) GetAutoload() bool

* Get the value of the parameter autoload

func (*Variables) GetDefinition

func (ap *Variables) GetDefinition(name string) (string, error)

* get the definition of the parameter.

func (*Variables) GetDumppassword

func (ap *Variables) GetDumppassword() string

* Get the value of the parameter dumppassword

func (*Variables) GetDumpuser

func (ap *Variables) GetDumpuser() string

* Get the value of the parameter dumpuser

func (*Variables) GetIp

func (ap *Variables) GetIp() string

* Get the value of the parameter ip

func (*Variables) GetPort

func (ap *Variables) GetPort() int64

* Get the value of the parameter port

func (*Variables) GetRootname

func (ap *Variables) GetRootname() string

* Get the value of the parameter rootname

func (*Variables) GetRootpassword

func (ap *Variables) GetRootpassword() string

* Get the value of the parameter rootpassword

func (*Variables) HasParameter

func (ap *Variables) HasParameter(name string) bool

* check if there is the parameter

func (*Variables) LoadInitialValues

func (ap *Variables) LoadInitialValues() error

* 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

func (ap *Variables) SetAutoload(value bool) error

* Set the value of the parameter autoload

func (*Variables) SetDumppassword

func (ap *Variables) SetDumppassword(value string) error

* Set the value of the parameter dumppassword

func (*Variables) SetDumpuser

func (ap *Variables) SetDumpuser(value string) error

* Set the value of the parameter dumpuser

func (*Variables) SetIp

func (ap *Variables) SetIp(value string) error

* Set the value of the parameter ip

func (*Variables) SetPort

func (ap *Variables) SetPort(value int64) error

* Set the value of the parameter port

func (*Variables) SetRootname

func (ap *Variables) SetRootname(value string) error

* Set the value of the parameter rootname

func (*Variables) SetRootpassword

func (ap *Variables) SetRootpassword(value string) error

* Set the value of the parameter rootpassword

func (*Variables) UpdateParametersWithConfiguration

func (ap *Variables) UpdateParametersWithConfiguration(config *vconfig) error

* Update parameters' values with configuration.

Jump to

Keyboard shortcuts

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