Documentation ¶
Index ¶
- type GCSRepository
- func (s *GCSRepository) CreateBucket(bucket string) error
- func (s *GCSRepository) DeleteBucket(bucket string) error
- func (s *GCSRepository) DeleteFile(bucket string, object string) error
- func (s *GCSRepository) DownloadFile(bucket, object, destination string) error
- func (s *GCSRepository) DownloadFileToBytes(bucket, object string) (data []byte, err error)
- func (s *GCSRepository) ListBucketObjects(bucket string) ([]string, error)
- func (s *GCSRepository) UploadFile(bucket string, filename string) error
- func (s *GCSRepository) UploadFileFromBytes(bucket string, object string, data []byte) error
- type StorageRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GCSRepository ¶
type GCSRepository struct {
// contains filtered or unexported fields
}
func NewGCSRepo ¶
func NewGCSRepo(c *config.GCSConfig) *GCSRepository
func (*GCSRepository) CreateBucket ¶
func (s *GCSRepository) CreateBucket(bucket string) error
func (*GCSRepository) DeleteBucket ¶
func (s *GCSRepository) DeleteBucket(bucket string) error
func (*GCSRepository) DeleteFile ¶
func (s *GCSRepository) DeleteFile(bucket string, object string) error
func (*GCSRepository) DownloadFile ¶
func (s *GCSRepository) DownloadFile(bucket, object, destination string) error
func (*GCSRepository) DownloadFileToBytes ¶
func (s *GCSRepository) DownloadFileToBytes(bucket, object string) (data []byte, err error)
func (*GCSRepository) ListBucketObjects ¶
func (s *GCSRepository) ListBucketObjects(bucket string) ([]string, error)
func (*GCSRepository) UploadFile ¶
func (s *GCSRepository) UploadFile(bucket string, filename string) error
func (*GCSRepository) UploadFileFromBytes ¶
func (s *GCSRepository) UploadFileFromBytes(bucket string, object string, data []byte) error
type StorageRepository ¶
type StorageRepository interface { CreateBucket(bucket string) error DeleteBucket(bucket string) error UploadFile(bucket string, filename string) error UploadFileFromBytes(bucket string, object string, data []byte) error DownloadFileToBytes(bucket, object string) (data []byte, err error) DownloadFile(bucket, object, destination string) error DeleteFile(bucket, object string) error ListBucketObjects(bucket string) ([]string, error) }
Click to show internal directories.
Click to hide internal directories.