aliyun

package
v0.0.0-...-9bd63dd Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: MIT Imports: 5 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 {
	Bucket *oss.Bucket
	Config *Config
}

func New

func New(config *Config) (*Client, error)

func (*Client) DeleteObject

func (c *Client) DeleteObject(objectKey string) error

func (*Client) DeleteObjects

func (c *Client) DeleteObjects(objectKeys []string) error

func (Client) GetBucket

func (c Client) GetBucket() string

func (Client) GetEndpoint

func (c Client) GetEndpoint() string

func (*Client) GetObject

func (c *Client) GetObject(objectKey string) (io.ReadCloser, error)

func (*Client) GetObjectToFile

func (c *Client) GetObjectToFile(objectKey, filePath string) error

func (*Client) GetObjectURL

func (c *Client) GetObjectURL(objectKey string, expires int64) (url string, err error)

func (*Client) IsObjectExist

func (c *Client) IsObjectExist(objectKey string) (isExist bool, err error)

func (*Client) ListObjects

func (c *Client) ListObjects(prefix string) ([]*gooss.Object, error)

func (*Client) PutObject

func (c *Client) PutObject(objectName string, filePath string) (err error)

type Config

type Config struct {
	AccessKeyId     string
	AccessKeySecret string
	SessionToken    string
	Region          string
	Bucket          string
	Endpoint        string
	UseCname        bool
	ACL             oss.ACLType
	ClientOptions   []oss.ClientOption
}

Jump to

Keyboard shortcuts

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