filemanager

package
v0.0.0-...-8b28c38 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

Functions

This section is empty.

Types

type AzureBlobFile

type AzureBlobFile struct {
	// contains filtered or unexported fields
}

func NewAzureBlobFile

func NewAzureBlobFile(blobURL string) (*AzureBlobFile, error)

func (*AzureBlobFile) Download

func (a *AzureBlobFile) Download(ctx context.Context, f *os.File) error

func (*AzureBlobFile) Upload

func (a *AzureBlobFile) Upload(ctx context.Context, f *os.File) error

type FileManager

type FileManager interface {
	Download(ctx context.Context, f *os.File) error
	Upload(ctx context.Context, f *os.File) error
}

FileManager is a unified interface for downloading and uploading files from various storage providers.

func NewFileManager

func NewFileManager(filePath string) (FileManager, error)

type GCSStorageFile

type GCSStorageFile struct {
	// contains filtered or unexported fields
}

func NewGCSStorageFile

func NewGCSStorageFile(filePath string) (*GCSStorageFile, error)

func (*GCSStorageFile) Download

func (g *GCSStorageFile) Download(ctx context.Context, f *os.File) error

func (*GCSStorageFile) Upload

func (g *GCSStorageFile) Upload(ctx context.Context, f *os.File) error

type InMemoryFile

type InMemoryFile struct {
	Data []byte
}

func (*InMemoryFile) Download

func (c *InMemoryFile) Download(ctx context.Context, f *os.File) error

func (*InMemoryFile) Upload

func (c *InMemoryFile) Upload(ctx context.Context, f *os.File) error

type S3File

type S3File struct {
	// contains filtered or unexported fields
}

func NewAltS3File

func NewAltS3File(filePath string) (*S3File, error)

func NewS3File

func NewS3File(filePath string) (*S3File, error)

func (*S3File) Download

func (c *S3File) Download(ctx context.Context, f *os.File) error

func (*S3File) Upload

func (c *S3File) Upload(ctx context.Context, f *os.File) error

type SystemFile

type SystemFile struct {
	// contains filtered or unexported fields
}

func NewSystemFile

func NewSystemFile(filePath string) *SystemFile

func (*SystemFile) Download

func (s *SystemFile) Download(ctx context.Context, f *os.File) error

func (*SystemFile) Upload

func (s *SystemFile) Upload(ctx context.Context, f *os.File) error

Jump to

Keyboard shortcuts

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