storage

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 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 GDriveConfig

type GDriveConfig struct {
	Enabled bool
}

type S3Config

type S3Config struct {
	Enabled bool
	Bucket  string
}

type SFTPConfig

type SFTPConfig struct {
	Enabled   bool
	Username  string
	Password  string
	Port      int
	RemoteDir string
}

type Storage

type Storage interface {
	Store(ctx context.Context, remoteDir string, file *fs.File) error
	StoreAll(ctx context.Context, remoteDir string, files []*fs.File) error
}

func NewGoogleDriveStorage

func NewGoogleDriveStorage(cfg GDriveConfig) (Storage, error)

func NewS3Storage

func NewS3Storage(cfg S3Config) (Storage, error)

func NewSFTPStorage

func NewSFTPStorage(cfg SFTPConfig) (Storage, error)

Jump to

Keyboard shortcuts

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