Documentation ¶
Index ¶
- Constants
- type FileMeta
- type GoogleBucketClient
- func (c *GoogleBucketClient) CheckIfFileExists(fileName string) (bool, error)
- func (c *GoogleBucketClient) CreateSignedUrl(fileName string, method string, expire time.Time) (string, error)
- func (c *GoogleBucketClient) DeleteFile(fileName string) error
- func (c *GoogleBucketClient) DeleteFilesInDirectory(directoryPath string) (bool, error)
- func (c *GoogleBucketClient) DownloadFile(fileName string, destFileName string) error
- func (c *GoogleBucketClient) GetFileBuffer(fileName string) ([]byte, error)
- func (c *GoogleBucketClient) GetFileMeta(fileName string) (*FileMeta, error)
- func (c *GoogleBucketClient) ListDirectoryObjects(directoryPath string, recursive bool) ([]string, error)
- func (c *GoogleBucketClient) UploadFile(fileName string, content io.Reader, options *UploadOptions) error
- func (c *GoogleBucketClient) UploadFileBuffer(fileName string, content []byte, options *UploadOptions) error
- type StorageClient
- type UploadOptions
Constants ¶
View Source
const ( GoogleBucketNamePrefix = "project-hub-" GoogleProjectID = "tensorleap-ops3" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoogleBucketClient ¶
type GoogleBucketClient struct { Name string // contains filtered or unexported fields }
func NewGoogleBucketClient ¶
func NewGoogleBucketClient(bucket *storage.BucketHandle, name string) *GoogleBucketClient
func (*GoogleBucketClient) CheckIfFileExists ¶
func (c *GoogleBucketClient) CheckIfFileExists(fileName string) (bool, error)
func (*GoogleBucketClient) CreateSignedUrl ¶ added in v0.0.45
func (*GoogleBucketClient) DeleteFile ¶
func (c *GoogleBucketClient) DeleteFile(fileName string) error
func (*GoogleBucketClient) DeleteFilesInDirectory ¶
func (c *GoogleBucketClient) DeleteFilesInDirectory(directoryPath string) (bool, error)
func (*GoogleBucketClient) DownloadFile ¶
func (c *GoogleBucketClient) DownloadFile(fileName string, destFileName string) error
func (*GoogleBucketClient) GetFileBuffer ¶
func (c *GoogleBucketClient) GetFileBuffer(fileName string) ([]byte, error)
func (*GoogleBucketClient) GetFileMeta ¶
func (c *GoogleBucketClient) GetFileMeta(fileName string) (*FileMeta, error)
func (*GoogleBucketClient) ListDirectoryObjects ¶
func (c *GoogleBucketClient) ListDirectoryObjects(directoryPath string, recursive bool) ([]string, error)
func (*GoogleBucketClient) UploadFile ¶
func (c *GoogleBucketClient) UploadFile(fileName string, content io.Reader, options *UploadOptions) error
func (*GoogleBucketClient) UploadFileBuffer ¶
func (c *GoogleBucketClient) UploadFileBuffer(fileName string, content []byte, options *UploadOptions) error
type StorageClient ¶
type StorageClient interface { CheckIfFileExists(fileName string) (bool, error) GetFileBuffer(fileName string) ([]byte, error) UploadFile(fileName string, content io.Reader, options *UploadOptions) error UploadFileBuffer(fileName string, content []byte, options *UploadOptions) error DownloadFile(fileName string, destFileName string) error GetFileMeta(fileName string) (*FileMeta, error) DeleteFile(fileName string) error DeleteFilesInDirectory(directoryPath string) (bool, error) ListDirectoryObjects(directoryPath string, recursive bool) ([]string, error) CreateSignedUrl(fileName, method string, expire time.Time) (string, error) }
func CreateStorageClient ¶
func CreateStorageClient() (StorageClient, error)
type UploadOptions ¶
type UploadOptions struct {
NoCache bool
}
Click to show internal directories.
Click to hide internal directories.