Documentation ¶
Index ¶
- Constants
- Variables
- func HTTPHeaderLastModifiedToTime(timeStr string) (time.Time, error)
- type AWSObjectStorageService
- func (service *AWSObjectStorageService) DeleteObject(ctx context.Context, key string) error
- func (service *AWSObjectStorageService) DeleteObjects(ctx context.Context, keys ...string) error
- func (service *AWSObjectStorageService) GetObject(ctx context.Context, key string) (Object, error)
- func (service *AWSObjectStorageService) GetSignedURL(key string, duration time.Duration) (string, error)
- func (service *AWSObjectStorageService) GetSignedURLForExistedKey(ctx context.Context, key string, duration time.Duration) (string, error)
- func (service *AWSObjectStorageService) HeadObject(ctx context.Context, key string) (Object, error)
- func (service *AWSObjectStorageService) ListObjects(ctx context.Context, prefix string, continueToken *string, maxObjects int) ([]Object, *string, error)
- func (service *AWSObjectStorageService) PutObject(ctx context.Context, key string, input *PutObjectInput) error
- type AliCloudObjectStorageService
- func (service *AliCloudObjectStorageService) DeleteObject(ctx context.Context, key string) error
- func (service *AliCloudObjectStorageService) DeleteObjects(ctx context.Context, keys ...string) error
- func (service *AliCloudObjectStorageService) GetObject(ctx context.Context, key string) (Object, error)
- func (service *AliCloudObjectStorageService) GetSignedURL(key string, duration time.Duration) (string, error)
- func (service *AliCloudObjectStorageService) GetSignedURLForExistedKey(ctx context.Context, key string, duration time.Duration) (string, error)
- func (service *AliCloudObjectStorageService) HeadObject(ctx context.Context, key string) (Object, error)
- func (service *AliCloudObjectStorageService) ListObjects(ctx context.Context, prefix string, continueToken *string, maxObjects int) ([]Object, *string, error)
- func (service *AliCloudObjectStorageService) PutObject(ctx context.Context, key string, input *PutObjectInput) error
- type AliCloudStorageOption
- func (option AliCloudStorageOption) CheckAWS() error
- func (option AliCloudStorageOption) CheckAliCloudStorage() error
- func (option AliCloudStorageOption) CheckClusterRedis() error
- func (option AliCloudStorageOption) CheckStandaloneRedis() error
- func (option AliCloudStorageOption) CheckTencentCloud() error
- func (option AliCloudStorageOption) GetAssumeRegion() string
- func (option AliCloudStorageOption) GetAssumeRoleArn() string
- func (option AliCloudStorageOption) GetProvider() cloud.Provider
- func (option AliCloudStorageOption) GetRegion() string
- func (option AliCloudStorageOption) GetSecretID() string
- func (option AliCloudStorageOption) GetSecretKey() string
- type Object
- type ObjectStorageService
- func GetAWSObjectService(bucketName string, option cloud.Option) (ObjectStorageService, error)
- func GetAliCloudObjectService(bucketName string, option cloud.Option) (ObjectStorageService, error)
- func GetObjectStorageService(bucketName string, option cloud.Option) (ObjectStorageService, error)
- func GetTencentCloudObjectService(bucketName string, option cloud.Option) (ObjectStorageService, error)
- type PutObjectInput
- type TencentCloudObjectStorageService
- func (service *TencentCloudObjectStorageService) DeleteObject(ctx context.Context, key string) error
- func (service *TencentCloudObjectStorageService) DeleteObjects(ctx context.Context, keys ...string) error
- func (service *TencentCloudObjectStorageService) GetObject(ctx context.Context, key string) (Object, error)
- func (service *TencentCloudObjectStorageService) GetSignedURL(key string, duration time.Duration) (string, error)
- func (service *TencentCloudObjectStorageService) GetSignedURLForExistedKey(ctx context.Context, key string, duration time.Duration) (string, error)
- func (service *TencentCloudObjectStorageService) HeadObject(ctx context.Context, key string) (Object, error)
- func (service *TencentCloudObjectStorageService) ListObjects(ctx context.Context, prefix string, continueToken *string, maxObjects int) ([]Object, *string, error)
- func (service *TencentCloudObjectStorageService) PutObject(ctx context.Context, key string, input *PutObjectInput) error
Constants ¶
View Source
const ( AliCloudEnvRoleArn = "ALIBABA_CLOUD_ROLE_ARN" AliCloudEnvOidcProviderArn = "ALIBABA_CLOUD_OIDC_PROVIDER_ARN" AliCloudEnvOidcTokenFile = "ALIBABA_CLOUD_OIDC_TOKEN_FILE" )
Variables ¶
View Source
var ( ErrAliCloudStorageServiceCredentialTypeEmpty = errors.New("credential_type for alicloud storage service is empty") ErrAliCloudStorageServiceEndPointEmpty = errors.New("endpoint for alicloud storage service is empty") ErrAliCloudStorageServiceSessionNameEmpty = errors.New("session_name for alicloud storage service is empty") )
Functions ¶
Types ¶
type AWSObjectStorageService ¶
type AWSObjectStorageService struct {
// contains filtered or unexported fields
}
func (*AWSObjectStorageService) DeleteObject ¶
func (service *AWSObjectStorageService) DeleteObject(ctx context.Context, key string) error
func (*AWSObjectStorageService) DeleteObjects ¶
func (service *AWSObjectStorageService) DeleteObjects(ctx context.Context, keys ...string) error
func (*AWSObjectStorageService) GetSignedURL ¶
func (*AWSObjectStorageService) GetSignedURLForExistedKey ¶ added in v1.1.1
func (*AWSObjectStorageService) HeadObject ¶ added in v1.1.1
func (*AWSObjectStorageService) ListObjects ¶
func (*AWSObjectStorageService) PutObject ¶
func (service *AWSObjectStorageService) PutObject(ctx context.Context, key string, input *PutObjectInput) error
type AliCloudObjectStorageService ¶ added in v1.3.0
type AliCloudObjectStorageService struct {
// contains filtered or unexported fields
}
func (*AliCloudObjectStorageService) DeleteObject ¶ added in v1.3.0
func (service *AliCloudObjectStorageService) DeleteObject(ctx context.Context, key string) error
func (*AliCloudObjectStorageService) DeleteObjects ¶ added in v1.3.0
func (service *AliCloudObjectStorageService) DeleteObjects(ctx context.Context, keys ...string) error
func (*AliCloudObjectStorageService) GetSignedURL ¶ added in v1.3.0
func (*AliCloudObjectStorageService) GetSignedURLForExistedKey ¶ added in v1.3.0
func (*AliCloudObjectStorageService) HeadObject ¶ added in v1.3.0
func (*AliCloudObjectStorageService) ListObjects ¶ added in v1.3.0
func (*AliCloudObjectStorageService) PutObject ¶ added in v1.3.0
func (service *AliCloudObjectStorageService) PutObject(ctx context.Context, key string, input *PutObjectInput) error
type AliCloudStorageOption ¶ added in v1.3.0
type AliCloudStorageOption struct { CredentialType string // eg: "oidc_role_arn" EndPoint string // eg: "oss-cn-zhangjiakou.aliyuncs.com" SessionName string // eg: "test-rrsa-oidc-token" }
func (AliCloudStorageOption) CheckAWS ¶ added in v1.3.0
func (option AliCloudStorageOption) CheckAWS() error
func (AliCloudStorageOption) CheckAliCloudStorage ¶ added in v1.3.0
func (option AliCloudStorageOption) CheckAliCloudStorage() error
func (AliCloudStorageOption) CheckClusterRedis ¶ added in v1.3.0
func (option AliCloudStorageOption) CheckClusterRedis() error
func (AliCloudStorageOption) CheckStandaloneRedis ¶ added in v1.3.0
func (option AliCloudStorageOption) CheckStandaloneRedis() error
func (AliCloudStorageOption) CheckTencentCloud ¶ added in v1.3.0
func (option AliCloudStorageOption) CheckTencentCloud() error
func (AliCloudStorageOption) GetAssumeRegion ¶ added in v1.3.0
func (option AliCloudStorageOption) GetAssumeRegion() string
func (AliCloudStorageOption) GetAssumeRoleArn ¶ added in v1.3.0
func (option AliCloudStorageOption) GetAssumeRoleArn() string
func (AliCloudStorageOption) GetProvider ¶ added in v1.3.0
func (option AliCloudStorageOption) GetProvider() cloud.Provider
func (AliCloudStorageOption) GetRegion ¶ added in v1.3.0
func (option AliCloudStorageOption) GetRegion() string
func (AliCloudStorageOption) GetSecretID ¶ added in v1.3.0
func (option AliCloudStorageOption) GetSecretID() string
func (AliCloudStorageOption) GetSecretKey ¶ added in v1.3.0
func (option AliCloudStorageOption) GetSecretKey() string
type Object ¶
type Object struct {
// contains filtered or unexported fields
}
func (Object) GetContent ¶
func (Object) GetContentType ¶ added in v1.1.2
func (Object) GetModifiedTime ¶
func (Object) GetObjectSize ¶ added in v1.1.1
type ObjectStorageService ¶
type ObjectStorageService interface { ListObjects(ctx context.Context, prefix string, continueToken *string, maxObjects int) ([]Object, *string, error) HeadObject(ctx context.Context, key string) (Object, error) GetObject(ctx context.Context, key string) (Object, error) PutObject(ctx context.Context, key string, input *PutObjectInput) error DeleteObject(ctx context.Context, key string) error DeleteObjects(ctx context.Context, keys ...string) error GetSignedURL(key string, duration time.Duration) (string, error) // GetSignedURLForExistedKey generates signed url if key exists. If key does not exist, return error GetSignedURLForExistedKey(ctx context.Context, key string, duration time.Duration) (string, error) }
func GetAWSObjectService ¶
func GetAWSObjectService(bucketName string, option cloud.Option) (ObjectStorageService, error)
func GetAliCloudObjectService ¶ added in v1.3.0
func GetAliCloudObjectService(bucketName string, option cloud.Option) (ObjectStorageService, error)
GetAliCloudObjectService option.credentialType Only Support "oidc_role_arn"
func GetObjectStorageService ¶
func GetObjectStorageService(bucketName string, option cloud.Option) (ObjectStorageService, error)
func GetTencentCloudObjectService ¶
func GetTencentCloudObjectService(bucketName string, option cloud.Option) (ObjectStorageService, error)
type PutObjectInput ¶ added in v1.1.2
type TencentCloudObjectStorageService ¶
type TencentCloudObjectStorageService struct {
// contains filtered or unexported fields
}
func (*TencentCloudObjectStorageService) DeleteObject ¶
func (service *TencentCloudObjectStorageService) DeleteObject(ctx context.Context, key string) error
func (*TencentCloudObjectStorageService) DeleteObjects ¶
func (service *TencentCloudObjectStorageService) DeleteObjects(ctx context.Context, keys ...string) error
func (*TencentCloudObjectStorageService) GetSignedURL ¶
func (*TencentCloudObjectStorageService) GetSignedURLForExistedKey ¶ added in v1.1.1
func (*TencentCloudObjectStorageService) HeadObject ¶ added in v1.1.1
func (*TencentCloudObjectStorageService) ListObjects ¶
func (*TencentCloudObjectStorageService) PutObject ¶
func (service *TencentCloudObjectStorageService) PutObject(ctx context.Context, key string, input *PutObjectInput) error
Click to show internal directories.
Click to hide internal directories.