aliyunblob

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const Scheme = "aliyun"

Scheme is the URL scheme aliyunblob registers its URLOpener under on blob.DefaultMux.

Variables

This section is empty.

Functions

func OpenBucket

func OpenBucket(ctx context.Context, cfg *Config, opts *Options) (*blob.Bucket, error)

OpenBucket returns a *blob.Bucket.

Types

type AuthProxy

type AuthProxy struct {
	Host     string
	User     string
	Password string
}

type Config

type Config struct {
	Endpoint        string // OSS endpoint
	AccessKeyID     string // AccessId
	AccessKeySecret string // AccessKey
	BucketName      string // BucketName
}

type Options

type Options struct {
	UseCname         bool
	ConnectTimeout   time.Duration
	ReadWriteTimeout time.Duration
	SecurityToken    string
	EnableMD5        bool
	EnableCRC        bool
	Proxy            string
	AuthProxy        *AuthProxy
}

type URLOpener

type URLOpener struct{}

URLOpener opens Azure URLs like "aliyun://my-bucket".

func (*URLOpener) OpenBucketURL

func (o *URLOpener) OpenBucketURL(ctx context.Context, u *url.URL) (*blob.Bucket, error)

OpenBucketURL opens a blob.Bucket based on u.

Jump to

Keyboard shortcuts

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