vault: Index | Files

package alicloudoss

import ""


Package Files



const (
    AlibabaMetricKey = "alibaba"

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

func NewAliCloudOSSBackend Uses

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 Uses

type AliCloudOSSBackend struct {
    // contains filtered or unexported fields

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

func (*AliCloudOSSBackend) Delete Uses

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

Delete is used to permanently delete an entry

func (*AliCloudOSSBackend) Get Uses

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

Get is used to fetch an entry

func (*AliCloudOSSBackend) List Uses

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 Uses

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

Put is used to insert or update an entry

Package alicloudoss imports 15 packages (graph) and is imported by 4 packages. Updated 2020-03-28. Refresh now. Tools for package owners.