Documentation ¶
Index ¶
- func NewDefaultConfigurationStorage(logger *slog.Logger) model.ConfigurationStorage
- func NewFS(settings model.FileStorageLocal) fs.FS
- func NewFSConnectionTester(settings model.FileStorageLocal, expectedFiles []string) model.ConnectionTester
- func NewFSWithFiles(settings model.FileStorageLocal, files map[string][]byte) fs.FS
- func NewKeyStorageConnectionTester(settings model.FileStorageLocal) model.ConnectionTester
- type BuildinConfigStorage
- func (cs *BuildinConfigStorage) CloseUpdateChan()
- func (cs *BuildinConfigStorage) Errors() []error
- func (cs *BuildinConfigStorage) ForceReloadOnWriteConfig() bool
- func (cs *BuildinConfigStorage) GetUpdateChan() chan interface{}
- func (cs *BuildinConfigStorage) LoadServerSettings(validate bool) (model.ServerSettings, []error)
- func (cs *BuildinConfigStorage) LoadedSettings() *model.ServerSettings
- func (cs *BuildinConfigStorage) WriteConfig(settings model.ServerSettings) error
- type ConfigurationStorage
- func (cs *ConfigurationStorage) CloseUpdateChan()
- func (cs *ConfigurationStorage) Errors() []error
- func (cs *ConfigurationStorage) ForceReloadOnWriteConfig() bool
- func (cs *ConfigurationStorage) GetUpdateChan() chan interface{}
- func (cs *ConfigurationStorage) LoadServerSettings(validate bool) (model.ServerSettings, []error)
- func (cs *ConfigurationStorage) LoadedSettings() *model.ServerSettings
- func (cs *ConfigurationStorage) WriteConfig(settings model.ServerSettings) error
- type FSConnectionTester
- type KeyStorage
- type KeyStorageConnectionTester
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDefaultConfigurationStorage ¶ added in v2.3.0
func NewDefaultConfigurationStorage(logger *slog.Logger) model.ConfigurationStorage
func NewFSConnectionTester ¶
func NewFSConnectionTester(settings model.FileStorageLocal, expectedFiles []string) model.ConnectionTester
func NewFSWithFiles ¶
NewFSWithFiles creates the fs which already has predefined files on top of the base fs
func NewKeyStorageConnectionTester ¶
func NewKeyStorageConnectionTester(settings model.FileStorageLocal) model.ConnectionTester
Types ¶
type BuildinConfigStorage ¶ added in v2.3.3
type BuildinConfigStorage struct { UpdateChan chan interface{} // contains filtered or unexported fields }
func NewBuildingConfigurationStorage ¶ added in v2.3.3
func NewBuildingConfigurationStorage() *BuildinConfigStorage
func (*BuildinConfigStorage) CloseUpdateChan ¶ added in v2.3.3
func (cs *BuildinConfigStorage) CloseUpdateChan()
CloseUpdateChan closes update channel.
func (*BuildinConfigStorage) Errors ¶ added in v2.3.3
func (cs *BuildinConfigStorage) Errors() []error
func (*BuildinConfigStorage) ForceReloadOnWriteConfig ¶ added in v2.3.3
func (cs *BuildinConfigStorage) ForceReloadOnWriteConfig() bool
func (*BuildinConfigStorage) GetUpdateChan ¶ added in v2.3.3
func (cs *BuildinConfigStorage) GetUpdateChan() chan interface{}
func (*BuildinConfigStorage) LoadServerSettings ¶ added in v2.3.3
func (cs *BuildinConfigStorage) LoadServerSettings(validate bool) (model.ServerSettings, []error)
func (*BuildinConfigStorage) LoadedSettings ¶ added in v2.3.3
func (cs *BuildinConfigStorage) LoadedSettings() *model.ServerSettings
func (*BuildinConfigStorage) WriteConfig ¶ added in v2.3.3
func (cs *BuildinConfigStorage) WriteConfig(settings model.ServerSettings) error
type ConfigurationStorage ¶ added in v2.3.0
type ConfigurationStorage struct { ServerConfigPath string UpdateChan chan interface{} // contains filtered or unexported fields }
ConfigurationStorage is a wrapper over server configuration file.
func NewConfigurationStorage ¶ added in v2.3.0
func NewConfigurationStorage( logger *slog.Logger, config model.FileStorageSettings, ) (*ConfigurationStorage, error)
NewConfigurationStorage creates and returns new file configuration storage.
func (*ConfigurationStorage) CloseUpdateChan ¶ added in v2.3.0
func (cs *ConfigurationStorage) CloseUpdateChan()
CloseUpdateChan closes update channel.
func (*ConfigurationStorage) Errors ¶ added in v2.3.3
func (cs *ConfigurationStorage) Errors() []error
func (*ConfigurationStorage) ForceReloadOnWriteConfig ¶ added in v2.3.0
func (cs *ConfigurationStorage) ForceReloadOnWriteConfig() bool
func (*ConfigurationStorage) GetUpdateChan ¶ added in v2.3.0
func (cs *ConfigurationStorage) GetUpdateChan() chan interface{}
GetUpdateChan returns update channel.
func (*ConfigurationStorage) LoadServerSettings ¶ added in v2.3.0
func (cs *ConfigurationStorage) LoadServerSettings(validate bool) (model.ServerSettings, []error)
LoadServerSettings loads server settings from the file.
func (*ConfigurationStorage) LoadedSettings ¶ added in v2.3.3
func (cs *ConfigurationStorage) LoadedSettings() *model.ServerSettings
func (*ConfigurationStorage) WriteConfig ¶ added in v2.3.0
func (cs *ConfigurationStorage) WriteConfig(settings model.ServerSettings) error
WriteConfig writes new config to server configuration file.
type FSConnectionTester ¶
type FSConnectionTester struct {
// contains filtered or unexported fields
}
func (*FSConnectionTester) Connect ¶
func (ct *FSConnectionTester) Connect() error
type KeyStorage ¶
type KeyStorage struct {
PrivateKeyPath string
}
KeyStorage is a wrapper over private key files
func NewKeyStorage ¶
func NewKeyStorage(settings model.FileStorageLocal) (*KeyStorage, error)
NewKeyStorage creates and returns new key files storage.
func (*KeyStorage) LoadPrivateKey ¶
func (ks *KeyStorage) LoadPrivateKey() (interface{}, error)
LoadPrivateKey loads private key from the storage
func (*KeyStorage) ReplaceKey ¶
func (ks *KeyStorage) ReplaceKey(keyPEM []byte) error
ReplaceKey replaces private keys
type KeyStorageConnectionTester ¶
type KeyStorageConnectionTester struct {
// contains filtered or unexported fields
}
func (*KeyStorageConnectionTester) Connect ¶
func (ct *KeyStorageConnectionTester) Connect() error
Click to show internal directories.
Click to hide internal directories.