Versions in this module Expand all Collapse all v3 v3.0.0 Apr 8, 2024 Changes in this version + func NewTrustedProfileCredentials(authEndpoint, trustedProfileName, trustedProfileID, crTokenFilePath string) *credentials.Credentials + type COSConfig struct + APIKey flagext.Secret + AccessKeyID string + AuthEndpoint string + BackoffConfig backoff.Config + BucketNames string + CRTokenFilePath string + Endpoint string + ForcePathStyle bool + HTTPConfig HTTPConfig + Region string + SecretAccessKey flagext.Secret + ServiceInstanceID string + TrustedProfileID string + TrustedProfileName string + func (cfg *COSConfig) RegisterFlags(f *flag.FlagSet) + func (cfg *COSConfig) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet) + type COSObjectClient struct + func NewCOSObjectClient(cfg COSConfig, hedgingCfg hedging.Config) (*COSObjectClient, error) + func (c *COSObjectClient) DeleteObject(ctx context.Context, objectKey string) error + func (c *COSObjectClient) GetObject(ctx context.Context, objectKey string) (io.ReadCloser, int64, error) + func (c *COSObjectClient) IsObjectNotFoundErr(err error) bool + func (c *COSObjectClient) IsRetryableErr(error) bool + func (c *COSObjectClient) List(ctx context.Context, prefix, delimiter string) ([]client.StorageObject, []client.StorageCommonPrefix, error) + func (c *COSObjectClient) ObjectExists(ctx context.Context, objectKey string) (bool, error) + func (c *COSObjectClient) PutObject(ctx context.Context, objectKey string, object io.ReadSeeker) error + func (c *COSObjectClient) Stop() + type HTTPConfig struct + IdleConnTimeout time.Duration + ResponseHeaderTimeout time.Duration + type InjectRequestMiddleware func(next http.RoundTripper) http.RoundTripper + type TrustedProfileProvider struct + ErrorStatus error + func NewTrustedProfileProvider(providerName string, ...) *TrustedProfileProvider + func (p *TrustedProfileProvider) IsExpired() bool + func (p *TrustedProfileProvider) IsValid() bool + func (p *TrustedProfileProvider) Retrieve() (credentials.Value, error)