Documentation ¶
Index ¶
- Constants
- Variables
- type AlibabaCloudOSSBackend
- type AmazonS3Backend
- func NewAmazonS3Backend(bucket string, prefix string, region string, endpoint string, sse string) *AmazonS3Backend
- func NewAmazonS3BackendWithCredentials(bucket string, prefix string, region string, endpoint string, sse string, ...) *AmazonS3Backend
- func NewAmazonS3BackendWithOptions(bucket string, prefix string, region string, endpoint string, sse string, ...) *AmazonS3Backend
- type AmazonS3Options
- type Backend
- type BaiduBOSBackend
- type GoogleCSBackend
- type LocalFilesystemBackend
- type Metadata
- type MicrosoftBlobBackend
- type Object
- type ObjectSliceDiff
- type OpenstackOSBackend
- type OracleCSBackend
- type ReauthRoundTripper
- type TencentCloudCOSBackend
Constants ¶
const DefaultPrefix = "/chart_backend_bucket"
const (
HTTPHeaderLastModified = "Last-Modified"
)
Variables ¶
var ( DefileDialTimeOut = "5s" TimeStampKey = "timestamp" ErrNotExistEndpoints = fmt.Errorf("endpoints cannot connect !") ErrNotExist = fmt.Errorf("not exist!") )
Functions ¶
This section is empty.
Types ¶
type AlibabaCloudOSSBackend ¶
type AlibabaCloudOSSBackend struct { Bucket *oss.Bucket Client *oss.Client Prefix string SSE string }
AlibabaCloudOSSBackend is a storage backend for Alibaba Cloud OSS
func NewAlibabaCloudOSSBackend ¶
func NewAlibabaCloudOSSBackend(bucket string, prefix string, endpoint string, sse string) *AlibabaCloudOSSBackend
NewAlibabaCloudOSSBackend creates a new instance of AlibabaCloudOSSBackend
func (AlibabaCloudOSSBackend) DeleteObject ¶
func (b AlibabaCloudOSSBackend) DeleteObject(path string) error
DeleteObject removes an object from Alibaba Cloud OSS bucket, at prefix
func (AlibabaCloudOSSBackend) GetObject ¶
func (b AlibabaCloudOSSBackend) GetObject(path string) (Object, error)
GetObject retrieves an object from Alibaba Cloud OSS bucket, at prefix
func (AlibabaCloudOSSBackend) ListObjects ¶
func (b AlibabaCloudOSSBackend) ListObjects(prefix string) ([]Object, error)
ListObjects lists all objects in Alibaba Cloud OSS bucket, at prefix
type AmazonS3Backend ¶
type AmazonS3Backend struct { Bucket string Client *s3.S3 Downloader *s3manager.Downloader Prefix string Uploader *s3manager.Uploader SSE string }
AmazonS3Backend is a storage backend for Amazon S3
func NewAmazonS3Backend ¶
func NewAmazonS3Backend(bucket string, prefix string, region string, endpoint string, sse string) *AmazonS3Backend
NewAmazonS3Backend creates a new instance of AmazonS3Backend
func NewAmazonS3BackendWithCredentials ¶ added in v0.6.0
func NewAmazonS3BackendWithCredentials(bucket string, prefix string, region string, endpoint string, sse string, credentials *credentials.Credentials) *AmazonS3Backend
NewAmazonS3BackendWithCredentials creates a new instance of AmazonS3Backend with credentials
func NewAmazonS3BackendWithOptions ¶ added in v0.14.1
func NewAmazonS3BackendWithOptions(bucket string, prefix string, region string, endpoint string, sse string, options *AmazonS3Options) *AmazonS3Backend
func (AmazonS3Backend) DeleteObject ¶
func (b AmazonS3Backend) DeleteObject(path string) error
DeleteObject removes an object from Amazon S3 bucket, at prefix
func (AmazonS3Backend) GetObject ¶
func (b AmazonS3Backend) GetObject(path string) (Object, error)
GetObject retrieves an object from Amazon S3 bucket, at prefix
func (AmazonS3Backend) ListObjects ¶
func (b AmazonS3Backend) ListObjects(prefix string) ([]Object, error)
ListObjects lists all objects in Amazon S3 bucket, at prefix
type AmazonS3Options ¶ added in v0.14.1
type AmazonS3Options struct {
S3ForcePathStyle *bool
}
type Backend ¶
type Backend interface { ListObjects(prefix string) ([]Object, error) GetObject(path string) (Object, error) PutObject(path string, content []byte) error DeleteObject(path string) error }
Backend is a generic interface for storage backends
type BaiduBOSBackend ¶ added in v0.3.0
BaiduBOSBackend is a storage backend for Baidu Cloud BOS
func NewBaiDuBOSBackend ¶ added in v0.3.0
func NewBaiDuBOSBackend(bucket string, prefix string, endpoint string) *BaiduBOSBackend
NewBaiduBOSBackend creates a new instance of BaiduBOSBackend
func (BaiduBOSBackend) DeleteObject ¶ added in v0.3.0
func (b BaiduBOSBackend) DeleteObject(path string) error
DeleteObject removes an object from Baidu Cloud BOS bucket, at prefix
func (BaiduBOSBackend) GetObject ¶ added in v0.3.0
func (b BaiduBOSBackend) GetObject(path string) (Object, error)
GetObject retrieves an object from Baidu Cloud BOS bucket, at prefix
func (BaiduBOSBackend) ListObjects ¶ added in v0.3.0
func (b BaiduBOSBackend) ListObjects(prefix string) ([]Object, error)
ListObjects lists all objects in Baidu Cloud BOS bucket, at prefix
type GoogleCSBackend ¶
type GoogleCSBackend struct { Prefix string Client *storage.BucketHandle Context context.Context }
GoogleCSBackend is a storage backend for Google Cloud Storage
func NewGoogleCSBackend ¶
func NewGoogleCSBackend(bucket string, prefix string) *GoogleCSBackend
NewGoogleCSBackend creates a new instance of GoogleCSBackend
func (GoogleCSBackend) DeleteObject ¶
func (b GoogleCSBackend) DeleteObject(path string) error
DeleteObject removes an object from Google Cloud Storage bucket, at prefix
func (GoogleCSBackend) GetObject ¶
func (b GoogleCSBackend) GetObject(path string) (Object, error)
GetObject retrieves an object from Google Cloud Storage bucket, at prefix
func (GoogleCSBackend) ListObjects ¶
func (b GoogleCSBackend) ListObjects(prefix string) ([]Object, error)
ListObjects lists all objects in Google Cloud Storage bucket, at prefix
type LocalFilesystemBackend ¶
type LocalFilesystemBackend struct {
RootDirectory string
}
LocalFilesystemBackend is a storage backend for local filesystem storage
func NewLocalFilesystemBackend ¶
func NewLocalFilesystemBackend(rootDirectory string) *LocalFilesystemBackend
NewLocalFilesystemBackend creates a new instance of LocalFilesystemBackend
func (LocalFilesystemBackend) DeleteObject ¶
func (b LocalFilesystemBackend) DeleteObject(path string) error
DeleteObject removes an object from root directory
func (LocalFilesystemBackend) GetObject ¶
func (b LocalFilesystemBackend) GetObject(path string) (Object, error)
GetObject retrieves an object from root directory
func (LocalFilesystemBackend) ListObjects ¶
func (b LocalFilesystemBackend) ListObjects(prefix string) ([]Object, error)
ListObjects lists all objects in root directory (depth 1)
type Metadata ¶ added in v0.10.0
Metadata represents the meta information of the object includes object name , object version , etc...
type MicrosoftBlobBackend ¶
type MicrosoftBlobBackend struct { Prefix string Container *microsoft_storage.Container }
MicrosoftBlobBackend is a storage backend for Microsoft Azure Blob Storage
func NewMicrosoftBlobBackend ¶
func NewMicrosoftBlobBackend(container string, prefix string) *MicrosoftBlobBackend
NewMicrosoftBlobBackend creates a new instance of MicrosoftBlobBackend
func (MicrosoftBlobBackend) DeleteObject ¶
func (b MicrosoftBlobBackend) DeleteObject(path string) error
DeleteObject removes an object from Microsoft Azure Blob Storage container, at path
func (MicrosoftBlobBackend) GetObject ¶
func (b MicrosoftBlobBackend) GetObject(path string) (Object, error)
GetObject retrieves an object from Microsoft Azure Blob Storage, at path
func (MicrosoftBlobBackend) ListObjects ¶
func (b MicrosoftBlobBackend) ListObjects(prefix string) ([]Object, error)
ListObjects lists all objects in Microsoft Azure Blob Storage container
type Object ¶
Object is a generic representation of a storage object
func (Object) HasExtension ¶
HasExtension determines whether or not an object contains a file extension
type ObjectSliceDiff ¶
ObjectSliceDiff provides information on what has changed since last calling ListObjects
func GetObjectSliceDiff ¶
func GetObjectSliceDiff(prev []Object, curr []Object, timestampTolerance time.Duration) ObjectSliceDiff
GetObjectSliceDiff takes two objects slices and returns an ObjectSliceDiff
type OpenstackOSBackend ¶
type OpenstackOSBackend struct { Container string Prefix string Region string CACert string Client *gophercloud.ServiceClient }
OpenstackOSBackend is a storage backend for Openstack Object Storage
func NewOpenstackOSBackend ¶
func NewOpenstackOSBackend(container string, prefix string, region string, caCert string) *OpenstackOSBackend
NewOpenstackOSBackend creates a new instance of OpenstackOSBackend
func NewOpenstackOSBackendV1Auth ¶ added in v0.9.0
func NewOpenstackOSBackendV1Auth(container string, prefix string, caCert string) *OpenstackOSBackend
NewOpenstackOSBackendV1Auth creates a new instance of OpenstackOSBackend using Swift V1 Auth
func (OpenstackOSBackend) DeleteObject ¶
func (b OpenstackOSBackend) DeleteObject(path string) error
DeleteObject removes an object from an Openstack container, at prefix
func (OpenstackOSBackend) GetObject ¶
func (b OpenstackOSBackend) GetObject(path string) (Object, error)
GetObject retrieves an object from an Openstack container, at prefix
func (OpenstackOSBackend) ListObjects ¶
func (b OpenstackOSBackend) ListObjects(prefix string) ([]Object, error)
ListObjects lists all objects in an Openstack container, at prefix
type OracleCSBackend ¶
type OracleCSBackend struct { Bucket string Prefix string Namespace string CompartmentId string Client objectstorage.ObjectStorageClient Context context.Context }
OracleCSBackend is a storage backend for Oracle Cloud Infrastructure Object Storage
func NewOracleCSBackend ¶
func NewOracleCSBackend(bucket string, prefix string, region string, compartmentId string) *OracleCSBackend
NewOracleCSBackend creates a new instance of OracleCSBackend
func (OracleCSBackend) DeleteObject ¶
func (b OracleCSBackend) DeleteObject(path string) error
DeleteObject removes an object from OCI Object Storage bucket, at prefix
func (OracleCSBackend) GetObject ¶
func (b OracleCSBackend) GetObject(path string) (Object, error)
GetObject retrieves an object from OCI Object Storage bucket, at prefix
func (OracleCSBackend) ListObjects ¶
func (b OracleCSBackend) ListObjects(prefix string) ([]Object, error)
ListObjects lists all objects in OCI Object Storage bucket, at prefix
type ReauthRoundTripper ¶
type ReauthRoundTripper struct {
// contains filtered or unexported fields
}
ReauthRoundTripper satisfies the http.RoundTripper interface and is used to limit the number of consecutive re-auth attempts (infinite by default)
type TencentCloudCOSBackend ¶ added in v0.4.0
type TencentCloudCOSBackend struct { Bucket *cos.BucketService Object *cos.ObjectService Client *cos.Client Prefix string }
TencentCloudCOSBackend is a storage backend for Tencent Cloud COS
func NewTencentCloudCOSBackend ¶ added in v0.4.0
func NewTencentCloudCOSBackend(bucket string, prefix string, endpoint string) *TencentCloudCOSBackend
NewTencentCloudCOSBackend creates a new instance of TencentCloudCOSBackend
func (TencentCloudCOSBackend) DeleteObject ¶ added in v0.4.0
func (t TencentCloudCOSBackend) DeleteObject(path string) error
DeleteObject removes an object from Tencent Cloud COS bucket, at prefix
func (TencentCloudCOSBackend) GetObject ¶ added in v0.4.0
func (t TencentCloudCOSBackend) GetObject(path string) (Object, error)
GetObject retrieves an object from Tencent Cloud COS bucket, at prefix
func (TencentCloudCOSBackend) ListObjects ¶ added in v0.4.0
func (t TencentCloudCOSBackend) ListObjects(prefix string) ([]Object, error)
ListObjects lists all objects in Tencent Cloud COS bucket, at prefix