Documentation ¶
Index ¶
- func FileSize(path string) (int64, error)
- func ZipArchive(zipname string, files ...string) error
- type Config
- type Data
- func (s *Data) Close() error
- func (s *Data) Download(filename string, obj io.WriteCloser) error
- func (store *Data) DownloadFilesToDirectory(files [][]string, localDir string, fromPath string, overwrite bool) error
- func (store *Data) DownloadFilesToMemory(files []string, fromPath string) (map[string][]byte, error)
- func (s *Data) Exists(filename string) bool
- func (s *Data) Move(filename, src, dest string) error
- func (s *Data) Remove(filename string) error
- func (s *Data) Upload(filename string, size int64, obj io.ReadCloser) error
- func (s *Data) UploadFile(filename, localPath string) error
- func (s *Data) UploadFileForce(filename, localPath string) error
- func (store *Data) UploadFilesFromDirectory(files [][]string, localDir string, toPath string) error
- func (store *Data) UploadFilesFromDirectoryWithForce(files [][]string, localDir string, toPath string) error
- func (store *Data) UploadFilesFromMemory(files map[string][]byte, dir string) error
- func (s *Data) UploadForce(filename string, size int64, obj io.ReadCloser) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ZipArchive ¶
ZipArchive creates a zipfile (this function allows only for absolute paths)
Types ¶
type Config ¶
type Config struct { Provider string `mapstructure:"provider"` AccessKey string `mapstructure:"aws_access_key"` SecretKey string `mapstructure:"aws_secret_key"` AzureStorageAccount string `mapstructure:"azure_storage_account"` AzureStorageKey string `mapstructure:"azure_storage_key"` GoogleServiceAccount string `mapstructure:"google_service_account"` GoogleProjectId string `mapstructure:"google_project_id"` URL string `mapstructure:"url"` Region string `mapstructure:"region"` BucketName string `mapstructure:"bucketName"` LocalPath string `mapstructure:"path"` }
Config represent a configuration for working with an object storage
type Data ¶
type Data struct {
// contains filtered or unexported fields
}
Data represent where to put whatever you're downloading
func (*Data) Download ¶
func (s *Data) Download(filename string, obj io.WriteCloser) error
Download is the single interface to download something from Object Storage
func (*Data) DownloadFilesToDirectory ¶
func (*Data) DownloadFilesToMemory ¶ added in v0.1.0
func (*Data) Exists ¶ added in v0.1.0
Exists is the single interface to check for file existence from Object Storage
func (*Data) UploadFile ¶
func (*Data) UploadFileForce ¶
func (*Data) UploadFilesFromDirectory ¶
func (*Data) UploadFilesFromDirectoryWithForce ¶
func (*Data) UploadFilesFromMemory ¶
func (*Data) UploadForce ¶
Click to show internal directories.
Click to hide internal directories.