advoss

package
v0.0.0-...-575c38c Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyPrefix = "aliyun-oss"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Bucket

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

func (*Bucket) GetObject

func (b *Bucket) GetObject(ctx context.Context, key string, options ...oss.Option) (rc io.ReadCloser, err error)

func (*Bucket) PutObject

func (b *Bucket) PutObject(ctx context.Context, key string, reader io.Reader, options ...oss.Option) (err error)

type Client

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

func Load

func Load(ctx context.Context, ld advconf.Loader, keys ...string) (client *Client, err error)

func (*Client) Bucket

func (c *Client) Bucket(name string) (bucket *Bucket, err error)

func (*Client) DefaultBucket

func (c *Client) DefaultBucket() (*Bucket, error)

type Options

type Options struct {
	Endpoint        string `json:"endpoint" validate:"nonzero"`
	AccessKeyID     string `json:"access-key-id" validate:"nonzero"`
	AccessKeySecret string `json:"access-key-secret" validate:"nonzero"`
	Bucket          string `json:"bucket"`
}

Jump to

Keyboard shortcuts

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