Documentation ¶
Index ¶
- type ConfigurationStorage
- func (cs *ConfigurationStorage) CloseUpdateChan()
- func (cs *ConfigurationStorage) GetUpdateChan() chan interface{}
- func (cs *ConfigurationStorage) InsertConfig(key string, value interface{}) error
- func (cs *ConfigurationStorage) InsertKeys(keys *model.JWTKeys) error
- func (cs *ConfigurationStorage) LoadKeys(alg ijwt.TokenSignatureAlgorithm) (*model.JWTKeys, error)
- func (cs *ConfigurationStorage) LoadServerSettings(ss *model.ServerSettings) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigurationStorage ¶
type ConfigurationStorage struct { ServerConfigPath string UpdateChan chan interface{} // contains filtered or unexported fields }
ConfigurationStorage is a wrapper over server configuration file.
func NewConfigurationStorage ¶
func NewConfigurationStorage(settings model.ConfigurationStorageSettings) (*ConfigurationStorage, error)
NewConfigurationStorage creates and returns new file configuration storage.
func (*ConfigurationStorage) CloseUpdateChan ¶
func (cs *ConfigurationStorage) CloseUpdateChan()
CloseUpdateChan closes update channel.
func (*ConfigurationStorage) GetUpdateChan ¶
func (cs *ConfigurationStorage) GetUpdateChan() chan interface{}
GetUpdateChan returns update channel.
func (*ConfigurationStorage) InsertConfig ¶
func (cs *ConfigurationStorage) InsertConfig(key string, value interface{}) error
InsertConfig writes new value to server configuration file.
func (*ConfigurationStorage) InsertKeys ¶
func (cs *ConfigurationStorage) InsertKeys(keys *model.JWTKeys) error
InsertKeys inserts new public and private keys.
func (*ConfigurationStorage) LoadKeys ¶
func (cs *ConfigurationStorage) LoadKeys(alg ijwt.TokenSignatureAlgorithm) (*model.JWTKeys, error)
LoadKeys loads public and private keys from the key storage.
func (*ConfigurationStorage) LoadServerSettings ¶
func (cs *ConfigurationStorage) LoadServerSettings(ss *model.ServerSettings) error
LoadServerSettings loads server settings from the file.
Click to show internal directories.
Click to hide internal directories.