aliyun

package
v0.10.3-0...-930112e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OSSAddressFeatureString = "aliyuncs.com"
	OSSDefaultAddress       = "oss.aliyuncs.com"
)

Variables

This section is empty.

Functions

func NewCredentialProvider

func NewCredentialProvider() (minioCred.Provider, error)

func NewMinioClient

func NewMinioClient(address string, opts *minio.Options) (*minio.Client, error)

NewMinioClient returns a minio.Client which is compatible for aliyun OSS

Types

type Credential

type Credential interface {
	credentials.Credential
}

Credential is defined to mock aliyun credential.Credentials

type CredentialProvider

type CredentialProvider struct {
	// contains filtered or unexported fields
}

CredentialProvider implements "github.com/minio/minio-go/v7/pkg/credentials".Provider also implements transport

func (CredentialProvider) IsExpired

func (c CredentialProvider) IsExpired() bool

IsExpired returns if the credentials are no longer valid, and need to be retrieved. according to the caller minioCred.Credentials.IsExpired(), it already has a lock, so we don't need to worry about concurrency

func (*CredentialProvider) Retrieve

func (c *CredentialProvider) Retrieve() (minioCred.Value, error)

Retrieve returns nil if it successfully retrieved the value. Error is returned if the value were not obtainable, or empty. according to the caller minioCred.Credentials.Get(), it already has a lock, so we don't need to worry about concurrency

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL