Documentation ¶
Index ¶
- func GetMimeType(fpath string) string
- func HandleProxy(dataURL string, ratio *Ratio, original bool, useProxy bool) (io.ReadCloser, string, error)
- type Bucket
- type ObjectStorage
- type Ratio
- type StorageFS
- func (s *StorageFS) DeleteBucket(bucket Bucket) error
- func (s *StorageFS) DeleteFile(bucket Bucket, fpath string) error
- func (s *StorageFS) GetBucket(name string) (Bucket, error)
- func (s *StorageFS) GetBucketQuota(bucket Bucket) (uint64, error)
- func (s *StorageFS) GetFile(bucket Bucket, fpath string) (utils.ReaderAtCloser, int64, time.Time, error)
- func (s *StorageFS) ListBuckets() ([]string, error)
- func (s *StorageFS) ListFiles(bucket Bucket, dir string, recursive bool) ([]os.FileInfo, error)
- func (s *StorageFS) PutFile(bucket Bucket, fpath string, contents utils.ReaderAtCloser, ...) (string, error)
- func (s *StorageFS) ServeFile(bucket Bucket, fpath string, ratio *Ratio, original bool, useProxy bool) (io.ReadCloser, string, error)
- func (s *StorageFS) UpsertBucket(name string) (Bucket, error)
- type StorageMinio
- func (s *StorageMinio) DeleteBucket(bucket Bucket) error
- func (s *StorageMinio) DeleteFile(bucket Bucket, fpath string) error
- func (s *StorageMinio) GetBucket(name string) (Bucket, error)
- func (s *StorageMinio) GetBucketQuota(bucket Bucket) (uint64, error)
- func (s *StorageMinio) GetFile(bucket Bucket, fpath string) (utils.ReaderAtCloser, int64, time.Time, error)
- func (s *StorageMinio) ListBuckets() ([]string, error)
- func (s *StorageMinio) ListFiles(bucket Bucket, dir string, recursive bool) ([]os.FileInfo, error)
- func (s *StorageMinio) PutFile(bucket Bucket, fpath string, contents utils.ReaderAtCloser, ...) (string, error)
- func (s *StorageMinio) ServeFile(bucket Bucket, fpath string, ratio *Ratio, original bool, useProxy bool) (io.ReadCloser, string, error)
- func (s *StorageMinio) UpsertBucket(name string) (Bucket, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMimeType ¶ added in v1.7.0
func HandleProxy ¶ added in v1.7.0
Types ¶
type ObjectStorage ¶
type ObjectStorage interface { GetBucket(name string) (Bucket, error) UpsertBucket(name string) (Bucket, error) ListBuckets() ([]string, error) DeleteBucket(bucket Bucket) error GetBucketQuota(bucket Bucket) (uint64, error) GetFile(bucket Bucket, fpath string) (utils.ReaderAtCloser, int64, time.Time, error) ServeFile(bucket Bucket, fpath string, ratio *Ratio, original bool, useProxy bool) (io.ReadCloser, string, error) PutFile(bucket Bucket, fpath string, contents utils.ReaderAtCloser, entry *utils.FileEntry) (string, error) DeleteFile(bucket Bucket, fpath string) error ListFiles(bucket Bucket, dir string, recursive bool) ([]os.FileInfo, error) }
type StorageFS ¶
type StorageFS struct {
Dir string
}
func NewStorageFS ¶
func (*StorageFS) DeleteBucket ¶
func (*StorageFS) GetBucketQuota ¶
func (*StorageFS) ListBuckets ¶ added in v1.6.0
type StorageMinio ¶
type StorageMinio struct { Client *minio.Client Admin *madmin.AdminClient }
func NewStorageMinio ¶
func NewStorageMinio(address, user, pass string) (*StorageMinio, error)
func (*StorageMinio) DeleteBucket ¶
func (s *StorageMinio) DeleteBucket(bucket Bucket) error
func (*StorageMinio) DeleteFile ¶
func (s *StorageMinio) DeleteFile(bucket Bucket, fpath string) error
func (*StorageMinio) GetBucketQuota ¶
func (s *StorageMinio) GetBucketQuota(bucket Bucket) (uint64, error)
func (*StorageMinio) GetFile ¶
func (s *StorageMinio) GetFile(bucket Bucket, fpath string) (utils.ReaderAtCloser, int64, time.Time, error)
func (*StorageMinio) ListBuckets ¶ added in v1.6.0
func (s *StorageMinio) ListBuckets() ([]string, error)
func (*StorageMinio) PutFile ¶
func (s *StorageMinio) PutFile(bucket Bucket, fpath string, contents utils.ReaderAtCloser, entry *utils.FileEntry) (string, error)
func (*StorageMinio) ServeFile ¶ added in v1.7.0
func (s *StorageMinio) ServeFile(bucket Bucket, fpath string, ratio *Ratio, original bool, useProxy bool) (io.ReadCloser, string, error)
func (*StorageMinio) UpsertBucket ¶
func (s *StorageMinio) UpsertBucket(name string) (Bucket, error)
Click to show internal directories.
Click to hide internal directories.