internal

package
v0.0.0-...-3bd58ec Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Path       string // absolute path
	Content    []byte // content
	Encrypted  bool   // if true, content is encrypted
	Compressed bool   // if true, content is compressed
}

type IContentCipher

type IContentCipher interface {
	Encrypt(in *File, encryptKey string) (err error)
	Decrypt(in *File, decryptKey string) (err error)
}

type IContentCompressor

type IContentCompressor interface {
	Compress(in *File) (err error)
	Decompress(in *File) (err error)
}

type IDownloader

type IDownloader interface {
	Download(obj *S3Object, outputDir string) (file *File, err error)
}

type IFileReadWriter

type IFileReadWriter interface {
	Read(path string) (*File, error)
	Write(file *File) error
}

type IFileScanner

type IFileScanner interface {
	SearchFiles(path string) (files []string, err error)
}

type ILister

type ILister interface {
	List(endpoint, bucket string, prefix string) (objs []*S3Object, err error)
}

type IS3Client

type IS3Client interface {
	ILister
	IUploader
	IDownloader
}

type IUploader

type IUploader interface {
	Upload(endpoint, bucket, prefix string, file *File) (obj *S3Object, err error)
}

type S3Object

type S3Object struct {
	Endpoint string // endpoint
	Bucket   string // Object bucket
	Key      string // Object key
	Type     string // Object type
	Size     int64  // Object size
	ETag     string // Object eTag
}

Directories

Path Synopsis
s3clients

Jump to

Keyboard shortcuts

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