Documentation ¶
Overview ¶
Cadmium - multiprotocol crossplatform messenger. Copyright (c) 2017, Stanislav N aka pztrn. Copyright (c) 2017, Cadmium developers and contributors.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Cadmium - multiprotocol crossplatform messenger. Copyright (c) 2017, Stanislav N aka pztrn. Copyright (c) 2017, Cadmium developers and contributors.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Cadmium - multiprotocol crossplatform messenger. Copyright (c) 2017, Stanislav N aka pztrn. Copyright (c) 2017, Cadmium developers and contributors.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Index ¶
- func New(cc *context.Context)
- type Config
- type ConfigHandler
- func (ch ConfigHandler) GetTempValue(key string) string
- func (ch ConfigHandler) GetValue(key string) string
- func (ch ConfigHandler) Initialize()
- func (ch ConfigHandler) LaterLoadConfig()
- func (ch ConfigHandler) SetTempValue(key string, value string)
- func (ch ConfigHandler) SetValue(key string, value string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config provides access to configuration storage. It also stores some basic variables that defined in temporary configuration storage. They can be accessed with these keys:
- CONFIGPATH - application's configuration path, defaulting to /Users/<user>/Library/Application Support/Cadmium os macOS, ~/.config/Cadmium on Nixes and APPDATA/Roaming/Cadmiun on Windows. This path is used to build other paths, like database path, caches path, etc.
- CACHEPATH - application's caches path.
func (*Config) GetTempValue ¶
GetTempValue returns value for key from temporary configuration storage.
func (*Config) Initialize ¶
func (cfg *Config) Initialize()
Initialize initializes configuration storage and application paths for later access by e.g. Database.
func (*Config) LaterLoadConfig ¶
func (cfg *Config) LaterLoadConfig()
LaterLoadConfig loads configuration from already initialized database and adds some events handlers.
func (*Config) SetTempValue ¶
SetTempValue sets value for key in temporary configuration storage.
type ConfigHandler ¶
type ConfigHandler struct{}
ConfigHandler provides handler for ConfigurationInterface. It launching real functions from Config struct.
func (ConfigHandler) GetTempValue ¶
func (ch ConfigHandler) GetTempValue(key string) string
func (ConfigHandler) GetValue ¶
func (ch ConfigHandler) GetValue(key string) string
func (ConfigHandler) Initialize ¶
func (ch ConfigHandler) Initialize()
func (ConfigHandler) LaterLoadConfig ¶
func (ch ConfigHandler) LaterLoadConfig()
func (ConfigHandler) SetTempValue ¶
func (ch ConfigHandler) SetTempValue(key string, value string)
func (ConfigHandler) SetValue ¶
func (ch ConfigHandler) SetValue(key string, value string)
Directories ¶
Path | Synopsis |
---|---|
Cadmium - multiprotocol crossplatform messenger.
|
Cadmium - multiprotocol crossplatform messenger. |