s3

package
v2.8.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFS

func NewFS(settings model.FileStorageS3) (fs.FS, error)

func NewFileStorageConnectionTester

func NewFileStorageConnectionTester(settings model.FileStorageS3, expectedFiles []string) model.ConnectionTester

func NewKeyStorageConnectionTester

func NewKeyStorageConnectionTester(settings model.FileStorageS3) model.ConnectionTester

func NewS3Client

func NewS3Client(region, endpoint string) (*s3.S3, error)

NewS3Client creates and returns new S3 client.

func NewSession

func NewSession(region, endpoint string) (*session.Session, error)

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(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 {
	Client         *s3.S3
	Bucket         string
	PrivateKeyPath string
}

KeyStorage is a wrapper over private key files

func NewKeyStorage

func NewKeyStorage(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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL