Documentation ¶
Index ¶
- func NewFS(settings model.FileStorageS3) (fs.FS, error)
- func NewFileStorageConnectionTester(settings model.FileStorageS3, expectedFiles []string) model.ConnectionTester
- func NewKeyStorageConnectionTester(settings model.FileStorageS3) model.ConnectionTester
- func NewS3Client(region, endpoint string) (*s3.S3, error)
- func NewSession(region, endpoint string) (*session.Session, 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 KeyStorage
- type KeyStorageConnectionTester
- type S3FSConnectionTester
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFileStorageConnectionTester ¶
func NewFileStorageConnectionTester(settings model.FileStorageS3, expectedFiles []string) model.ConnectionTester
func NewKeyStorageConnectionTester ¶
func NewKeyStorageConnectionTester(settings model.FileStorageS3) model.ConnectionTester
func NewS3Client ¶
NewS3Client creates and returns new S3 client.
Types ¶
type ConfigurationStorage ¶ added in v2.3.0
type ConfigurationStorage struct { Client *s3.S3 Bucket string ObjectName string UpdateChan chan interface{} // contains filtered or unexported fields }
ConfigurationStorage is a server configuration storage in S3.
func NewConfigurationStorage ¶ added in v2.3.0
func NewConfigurationStorage( logger *slog.Logger, config model.FileStorageSettings, ) (*ConfigurationStorage, error)
NewConfigurationStorage creates new server config storage in S3.
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 configuration from S3.
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 puts new configuration into the storage.
type KeyStorage ¶
type KeyStorage struct {
// contains filtered or unexported fields
}
KeyStorage is a wrapper over private key files
func NewKeyStorage ¶
func NewKeyStorage( logger *slog.Logger, settings model.FileStorageS3, ) (*KeyStorage, error)
NewKeyStorage creates and returns new S3-backed 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 key into S3 key storage
type KeyStorageConnectionTester ¶
type KeyStorageConnectionTester struct {
// contains filtered or unexported fields
}
func (*KeyStorageConnectionTester) Connect ¶
func (ct *KeyStorageConnectionTester) Connect() error
type S3FSConnectionTester ¶
type S3FSConnectionTester struct {
// contains filtered or unexported fields
}
func (*S3FSConnectionTester) Connect ¶
func (ct *S3FSConnectionTester) Connect() error
Click to show internal directories.
Click to hide internal directories.