Documentation ¶
Index ¶
- type FileStorage
- func (fs FileStorage) CreateBucket(name string) (*data.Bucket, error)
- func (fs FileStorage) DestroyBucket(name string) error
- func (fs FileStorage) GetBucket(name string) (*data.Bucket, error)
- func (fs FileStorage) GetBuckets() ([]*data.Bucket, error)
- func (fs FileStorage) GetFile(bucketName, name string) (*data.File, error)
- func (fs FileStorage) GetFiles(bucketName string) ([]*data.File, error)
- func (fs FileStorage) RemoveFile(bucketName, name string) error
- func (fs FileStorage) UploadFile(bucketName string, request *http.Request) ([]*data.File, error)
- type S3Storage
- func (s3S S3Storage) CreateBucket(name string) (*data.Bucket, error)
- func (s3S S3Storage) DestroyBucket(name string) error
- func (s3S S3Storage) GetBucket(name string) (*data.Bucket, error)
- func (s3S S3Storage) GetBuckets() ([]*data.Bucket, error)
- func (s3S S3Storage) GetFile(bucketName, name string) (*data.File, error)
- func (s3S S3Storage) GetFiles(bucketName string) ([]*data.File, error)
- func (s3S S3Storage) RemoveFile(bucketName, name string) error
- func (s3S S3Storage) UploadFile(bucketName string, request *http.Request) ([]*data.File, error)
- type Storage
- type StorageProviderFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileStorage ¶
type FileStorage struct {
// contains filtered or unexported fields
}
func NewFileStorage ¶
func NewFileStorage(rootPath string) *FileStorage
func (FileStorage) CreateBucket ¶
func (fs FileStorage) CreateBucket(name string) (*data.Bucket, error)
func (FileStorage) DestroyBucket ¶
func (fs FileStorage) DestroyBucket(name string) error
func (FileStorage) GetBuckets ¶
func (fs FileStorage) GetBuckets() ([]*data.Bucket, error)
func (FileStorage) GetFile ¶
func (fs FileStorage) GetFile(bucketName, name string) (*data.File, error)
func (FileStorage) GetFiles ¶
func (fs FileStorage) GetFiles(bucketName string) ([]*data.File, error)
func (FileStorage) RemoveFile ¶
func (fs FileStorage) RemoveFile(bucketName, name string) error
func (FileStorage) UploadFile ¶
type S3Storage ¶
func NewS3Storage ¶
func NewS3Storage() *S3Storage
func (S3Storage) CreateBucket ¶
func (S3Storage) DestroyBucket ¶
func (S3Storage) RemoveFile ¶
type Storage ¶
type Storage interface { GetBuckets() ([]*data.Bucket, error) GetBucket(name string) (*data.Bucket, error) CreateBucket(name string) (*data.Bucket, error) DestroyBucket(string string) error GetFiles(bucketName string) ([]*data.File, error) GetFile(bucketName, name string) (*data.File, error) RemoveFile(bucketName, name string) error UploadFile(bucketName string, request *http.Request) ([]*data.File, error) }
type StorageProviderFactory ¶
type StorageProviderFactory struct{}
func (StorageProviderFactory) CreateProvider ¶
func (f StorageProviderFactory) CreateProvider(provider string) (Storage, error)
Click to show internal directories.
Click to hide internal directories.