Documentation ¶
Index ¶
- type Bucket
- type ObjectStorage
- 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) 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) 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) 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) UpsertBucket(name string) (Bucket, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ObjectStorage ¶
type ObjectStorage interface { GetBucket(name string) (Bucket, error) UpsertBucket(name string) (Bucket, error) DeleteBucket(bucket Bucket) error GetBucketQuota(bucket Bucket) (uint64, error) GetFile(bucket Bucket, fpath string) (utils.ReaderAtCloser, int64, time.Time, 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 ¶
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) PutFile ¶
func (s *StorageMinio) PutFile(bucket Bucket, fpath string, contents utils.ReaderAtCloser, entry *utils.FileEntry) (string, error)
func (*StorageMinio) UpsertBucket ¶
func (s *StorageMinio) UpsertBucket(name string) (Bucket, error)
Click to show internal directories.
Click to hide internal directories.