Documentation
¶
Index ¶
- type AwsS3
- func (this *AwsS3) DeleteOldObjects() error
- func (this *AwsS3) Download(objectName string, filePath string) error
- func (this *AwsS3) GetTargetObjectName(objectKey string) (string, error)
- func (this *AwsS3) Init(endpoint string, accessKeyId string, secretAccessKey string, region string, ...) error
- func (this *AwsS3) Upload(blobName string, buffer []byte) (string, error)
- type AzBlob
- func (this *AzBlob) DeleteOldObjects() error
- func (this *AzBlob) Download(blobName string, filePath string) error
- func (this *AzBlob) GetTargetObjectName(blobName string) (string, error)
- func (this *AzBlob) Init(accountName string, accountKey string, containerName string, endpoint string) error
- func (this *AzBlob) Upload(blobName string, buffer []byte) (string, error)
- type GcpServiceAccountCreds
- type GcpStorage
- func (this *GcpStorage) Close()
- func (this *GcpStorage) DeleteOldObjects() error
- func (this *GcpStorage) Download(objectName string, filePath string) error
- func (this *GcpStorage) GetTargetObjectName(objectName string) (string, error)
- func (this *GcpStorage) Init(...) error
- func (this *GcpStorage) Upload(objectName string, buffer []byte) (string, error)
- type LocalStorage
- func (this *LocalStorage) DeleteOldObjects() error
- func (this *LocalStorage) Download(objectName string, filePath string) error
- func (this *LocalStorage) GetTargetObjectName(objectName string) (string, error)
- func (this *LocalStorage) Init(localPath string, expiryDays int) error
- func (this *LocalStorage) Upload(objectName string, buffer []byte) (string, error)
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AwsS3 ¶
type AwsS3 struct { Endpoint string AccessKeyId string SecretAccessKey string Region string Bucket string S3ForcePathStyle bool Session *session.Session Service *s3.S3 }
func (*AwsS3) DeleteOldObjects ¶ added in v0.5.0
func (*AwsS3) GetTargetObjectName ¶
type AzBlob ¶
type AzBlob struct { AccountName string AccountKey string ContainerName string Endpoint string BlobServiceClient *azblob.Client BlobContainerClient *container.Client }
func (*AzBlob) DeleteOldObjects ¶ added in v0.5.0
func (*AzBlob) GetTargetObjectName ¶
type GcpServiceAccountCreds ¶
type GcpServiceAccountCreds struct { Type string `json:"type"` ProjectID string `json:"project_id"` PrivateKeyID string `json:"private_key_id"` PrivateKey string `json:"private_key"` ClientEmail string `json:"client_email"` ClientID string `json:"client_id"` AuthUri string `json:"auth_uri"` TokenUri string `json:"token_uri"` AuthProviderX509CertUrl string `json:"auth_provider_x509_cert_url"` UniverseDomain string `json:"universe_domain"` }
type GcpStorage ¶
func (*GcpStorage) Close ¶
func (this *GcpStorage) Close()
func (*GcpStorage) DeleteOldObjects ¶ added in v0.5.0
func (this *GcpStorage) DeleteOldObjects() error
func (*GcpStorage) Download ¶
func (this *GcpStorage) Download(objectName string, filePath string) error
See https://cloud.google.com/storage/docs/downloading-objects#storage-download-object-go
func (*GcpStorage) GetTargetObjectName ¶
func (this *GcpStorage) GetTargetObjectName(objectName string) (string, error)
func (*GcpStorage) Init ¶
func (this *GcpStorage) Init(endpoint, bucket, credsPath, projectID, privateKeyId, privateKey, clientEmail, clientID string) error
type LocalStorage ¶ added in v0.3.0
func (*LocalStorage) DeleteOldObjects ¶ added in v0.5.0
func (this *LocalStorage) DeleteOldObjects() error
func (*LocalStorage) Download ¶ added in v0.3.0
func (this *LocalStorage) Download(objectName string, filePath string) error
func (*LocalStorage) GetTargetObjectName ¶ added in v0.3.0
func (this *LocalStorage) GetTargetObjectName(objectName string) (string, error)
Click to show internal directories.
Click to hide internal directories.