aliyun_oss

package
v0.0.0-...-3f885d8 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(cfg *Config) (*Client, error)

func (*Client) Bucket

func (f *Client) Bucket() (*oss.Bucket, error)

func (*Client) Client

func (f *Client) Client() (*oss.Client, error)

func (*Client) GetObject

func (f *Client) GetObject(path string) ([]byte, error)

func (*Client) GetObjectToFile

func (f *Client) GetObjectToFile(remotePath, localPath string) error

func (*Client) ParseConfig

func (f *Client) ParseConfig(t config.ParserType, cfg interface{}) error

func (*Client) PutObject

func (f *Client) PutObject(objectKey, data string) error

func (*Client) PutObjectFromFile

func (f *Client) PutObjectFromFile(remotePath, localPath string) error

type Config

type Config struct {
	AccessKey string `env:"ALIYUN_AK"`
	SecretKey string `env:"ALIYUN_SK"`
	Endpoint  string `env:"ALIYUN_ENDPOINT"`
	Bucket    string `env:"ALIYUN_BUCKET"`
	Path      string `env:"ALIYUN_PATH"`
}

Jump to

Keyboard shortcuts

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