gcs_repo

package
v0.0.0-...-c6447ae Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

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)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL