alicloudoss

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: MPL-2.0 Imports: 15 Imported by: 11

Documentation

Index

Constants

View Source
const (
	AlibabaMetricKey = "alibaba"

	AlibabaCloudOSSEndpointEnv = "ALICLOUD_OSS_ENDPOINT"
	AlibabaCloudOSSBucketEnv   = "ALICLOUD_OSS_BUCKET"
	AlibabaCloudAccessKeyEnv   = "ALICLOUD_ACCESS_KEY"
	AlibabaCloudSecretKeyEnv   = "ALICLOUD_SECRET_KEY"
)

Variables

This section is empty.

Functions

func NewAliCloudOSSBackend

func NewAliCloudOSSBackend(conf map[string]string, logger log.Logger) (physical.Backend, error)

NewAliCloudOSSBackend constructs an OSS backend using a pre-existing bucket. Credentials can be provided to the backend, sourced from the environment.

Types

type AliCloudOSSBackend

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

AliCloudOSSBackend is a physical backend that stores data within an Alibaba OSS bucket.

func (*AliCloudOSSBackend) Delete

func (a *AliCloudOSSBackend) Delete(ctx context.Context, key string) error

Delete is used to permanently delete an entry

func (*AliCloudOSSBackend) Get

Get is used to fetch an entry

func (*AliCloudOSSBackend) List

func (a *AliCloudOSSBackend) List(ctx context.Context, prefix string) ([]string, error)

List is used to list all the keys under a given prefix, up to the next prefix.

func (*AliCloudOSSBackend) Put

func (a *AliCloudOSSBackend) Put(ctx context.Context, entry *physical.Entry) error

Put is used to insert or update an entry

Jump to

Keyboard shortcuts

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