storage

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseStorage

type BaseStorage struct {
	Name   string  `yaml:"name"`
	Type   string  `yaml:"type"`
	Config Storage `yaml:"config"`
}

func (*BaseStorage) UnmarshalYAML added in v0.6.0

func (b *BaseStorage) UnmarshalYAML(value *yaml.Node) error

type Downloader added in v0.6.0

type Downloader interface {
	DownloadDirectory(remotePath, localPath string) error
}

type EncryptionConfig added in v0.7.0

type EncryptionConfig struct {
	Enabled bool   `yaml:"enabled"`
	Key     string `yaml:"key"`
}

type Initializer added in v0.6.0

type Initializer interface {
	Initialize() error
}

type S3StorageConfig added in v0.6.0

type S3StorageConfig struct {
	Session        *session.Session `yaml:"-"`
	S3Client       s3iface.S3API    `yaml:"-"`
	Endpoint       string           `yaml:"endpoint"`
	Region         string           `yaml:"region"`
	AccessKey      string           `yaml:"access_key"`
	SecretKey      string           `yaml:"secret_key"`
	BucketName     string           `yaml:"bucket_name"`
	DisableSSL     bool             `yaml:"disable_ssl"`
	ForcePathStyle bool             `yaml:"force_path_style"`
	Encryption     EncryptionConfig `yaml:"encryption"`
}

func (*S3StorageConfig) DownloadDirectory added in v0.6.0

func (s *S3StorageConfig) DownloadDirectory(remotePath, localPath string) error

func (*S3StorageConfig) Initialize added in v0.6.0

func (s *S3StorageConfig) Initialize() error

func (*S3StorageConfig) UploadDirectory added in v0.6.0

func (s *S3StorageConfig) UploadDirectory(directoryPath string) error

type Storage

type Storage interface {
	Uploader
	Downloader
	Initializer
}

type Uploader added in v0.6.0

type Uploader interface {
	UploadDirectory(directoryPath string) error
}

Jump to

Keyboard shortcuts

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