oss

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: 19 Imported by: 0

Documentation

Overview

Package oss implements the Aliyun OSS Storage driver backend. Support can be enabled by including the "include_oss" build tag.

Package oss provides a storagedriver.StorageDriver implementation to store blobs in Aliyun OSS cloud storage.

This package leverages the denverdino/aliyungo client library for interfacing with oss.

Because OSS is a key, value store the Stat call does not support last modification time for directories (directories are an abstraction for key, value stores)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

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

Driver is a storagedriver.StorageDriver implementation backed by Aliyun OSS Objects are stored at absolute keys in the provided bucket.

func FromParameters

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

FromParameters constructs a new Driver with a given parameters map Required parameters: - accesskey - secretkey - region - bucket - encrypt

func New

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

New constructs a new Driver with the given Aliyun credentials, region, encryption flag, and bucketName

type DriverParameters

type DriverParameters struct {
	AccessKeyID           string
	AccessKeySecret       string
	Bucket                string
	Region                oss.Region
	Internal              bool
	Encrypt               bool
	Secure                bool
	ChunkSize             int64
	RootDirectory         string
	Endpoint              string
	EncryptionKeyID       string
	StorageManagerAddress string
	SkipBucketApi         bool
}

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

Jump to

Keyboard shortcuts

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