ConfigService class

Internal service parsing configuration files, command line arguments and environment variables.

The config path "datahub" is reserved for internal values:

datahub.log defines the log level LogService. See enum values in LogLevel. datahub.environment defines the service environment. See enum values in Environment.

TODO more docs

Inheritance

Constructors

ConfigService(Map<String, dynamic> defaultConfig, List<String> arguments)

Properties

arguments List<String>
final
configPath ConfigPath?
finalinherited
environment Environment
The services environment.
latefinaloverride-getter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addConfigArgument(String configArgument) → void
Add a single config value by using the command line syntax. This is usually used for command line argument parsing.
addConfigFile(File configFile) → void
Read and add config file into the config map.
config<T>(String path, {T? defaultValue}) → T
Fetches a configuration value from ConfigService.
inherited
configObject<T extends TransferObjectBase>(String path, TransferBean<T> bean) → T
Fetches a configuration value from ConfigService and parse it into the TransferObject.
inherited
fetch<T>(ConfigPath path, {T? defaultValue}) → T
Get a config value under the given path.
fetchObject<T extends TransferObjectBase>(ConfigPath path, TransferBean<T> bean) → T
Get a config value as map and parse it into the given TransferObject.
initialize() Future<void>
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
shutdown() Future<void>
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited