Back to / physical / alicloudoss

package alicloudoss

Latest Go to latest
Published: Jul 2, 2020 | License: MPL-2.0 | Module:



const (
	AlibabaMetricKey = "alibaba"

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

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.

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

func (a *AliCloudOSSBackend) Get(ctx context.Context, key string) (*physical.Entry, error)

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

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier