oss

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteObject

func DeleteObject(uri string) error

DeleteObject 删除对象

func GetObject

func GetObject(uri string) ([]byte, error)

GetObject 下载对象

func IsObjectExist

func IsObjectExist(uri string) (bool, error)

IsObjectExist 对象是否存在

func PutObject

func PutObject(uri string, content []byte) error

PutObject 上传简单对象

func PutObjectByReader

func PutObjectByReader(uri string, reader io.Reader) error

PutObjectByReader 上传流式对象

func Remove

func Remove(uri string) error

Remove 删除对象

func RemoveSubDir

func RemoveSubDir(dir string) error

RemoveSubDir 删除子目录

Types

type Instance

type Instance struct {
	Endpoint        string `yaml:"endpoint" json:"endpoint"`
	AccessKeyId     string `yaml:"access_key_id" json:"access_key_id"`
	AccessKeySecret string `yaml:"access_key_secret" json:"access_key_secret"`
	BucketName      string `yaml:"bucket_name" json:"bucket_name"`
	Domain          string `yaml:"domain" json:"domain"`
}

func (*Instance) GetName

func (i *Instance) GetName() string

func (*Instance) Load

func (i *Instance) Load() error

Jump to

Keyboard shortcuts

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