Documentation ¶
Index ¶
- Variables
- func Exists(name string) (bool, error)
- func FetchFileFromCloud(AppName string, ProfileName string, ConfServerURI string) ([]byte, error)
- func GetValueByNameFromEnv(aName string) string
- type ApplicationConfig
- func (conf *ApplicationConfig) GetParamsFromYml(path string) error
- func (conf *ApplicationConfig) GetSecretsFromJson(fileName string) (Secrets, string, error)
- func (conf *ApplicationConfig) ParseCloudFile() (*ApplicationConfig, error)
- func (conf *ApplicationConfig) PrintConfigToLog()
- func (conf *ApplicationConfig) ReloadConfig()
- type Congig
- type Secrets
Constants ¶
This section is empty.
Variables ¶
View Source
var (
AppConfig = ApplicationConfig{}
)
Functions ¶
func FetchFileFromCloud ¶
read config from Spring Cloud Config Server
func GetValueByNameFromEnv ¶
===========read params from env =========
Types ¶
type ApplicationConfig ¶
type ApplicationConfig struct { AppName string `json:"app_name" yaml:"app_name"` ConfServerURI string `json:"conf_server_uri" yaml:"conf_server_uri"` LogLevel string `json:"log_level" yaml:"log_level"` ProfileName string `json:"profile_name" yaml:"profile_name"` Secrets `json:"-"` }
func (*ApplicationConfig) GetParamsFromYml ¶
func (conf *ApplicationConfig) GetParamsFromYml(path string) error
===========read params from application.yml =========
func (*ApplicationConfig) GetSecretsFromJson ¶
func (conf *ApplicationConfig) GetSecretsFromJson(fileName string) (Secrets, string, error)
===========read secrets from APP_NAME.json =========
func (*ApplicationConfig) ParseCloudFile ¶
func (conf *ApplicationConfig) ParseCloudFile() (*ApplicationConfig, error)
func (*ApplicationConfig) PrintConfigToLog ¶
func (conf *ApplicationConfig) PrintConfigToLog()
func (*ApplicationConfig) ReloadConfig ¶
func (conf *ApplicationConfig) ReloadConfig()
Click to show internal directories.
Click to hide internal directories.