cos

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBucketURL

func NewBucketURL(bucketName, region, domain string, secure bool) *url.URL

Types

type Driver

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

Driver is a storagedriver.StorageDriver implementation backed by tencentyun cos

func FromParameters

func FromParameters(parameters map[string]interface{}) (*Driver, error)

FromParameters constructs a new Driver with a given parameters map Required parameters: - SecretID - SecretKey - Bucket - Region

func New

func New(params DriverParameters) (*Driver, error)

New constructs a new Driver with the given params

type DriverParameters

type DriverParameters struct {
	SecretID              string
	SecretKey             string
	Bucket                string
	AppId                 string
	Region                string
	CosDomain             string
	Secure                bool
	ChunkSize             int64
	RootDirectory         string
	StorageManagerAddress string
	RedirectDarwin        bool
	CdnEnable             bool
	CdnDomain             string
	CdnKey                string
	CdnExcludeCIDRs       string
	CciAddress            string
	CheckCvmIp            bool
	// 是否开启了 COS 的全球加速
	AccelerateEnabled bool
}

DriverParameters A struct that encapsulates all of the driver parameters after all values have been set

Directories

Path Synopsis
cci

Jump to

Keyboard shortcuts

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