s3

package
v2.2.16 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: MIT Imports: 13 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.S3KeyStorageSettings) model.ConnectionTester

func NewS3Client

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

NewS3Client creates and returns new S3 client.

func NewSession

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

Types

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.S3KeyStorageSettings) (*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