goo_oss

package
v1.1.239 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bucket added in v1.1.149

func Bucket() *oss.Bucket

func Client added in v1.1.145

func Client() *oss.Client

func Init

func Init(conf Config)

func Upload

func Upload(filename string, r io.Reader) (string, error)

func UploadFile added in v1.1.135

func UploadFile(filename, filepath string) (string, error)

Types

type Config

type Config struct {
	AccessKeyId     string `json:"access_key_id" yaml:"access_key_id"`
	AccessKeySecret string `json:"access_key_secret" yaml:"access_key_secret"`
	Endpoint        string `json:"endpoint" yaml:"endpoint"`
	Bucket          string `json:"bucket" yaml:"bucket"`
	Domain          string `json:"domain" yaml:"domain"`
}

type Uploader added in v1.1.223

type Uploader struct {
	Client *oss.Client
	Bucket *oss.Bucket
	// contains filtered or unexported fields
}

func ContentType

func ContentType(value string) *Uploader

func New

func New(conf Config) (*Uploader, error)

func Options

func Options(opts ...oss.Option) *Uploader

func (*Uploader) ContentType added in v1.1.223

func (o *Uploader) ContentType(value string) *Uploader

func (*Uploader) Options added in v1.1.223

func (o *Uploader) Options(opts ...oss.Option) *Uploader

func (*Uploader) Upload added in v1.1.223

func (o *Uploader) Upload(filename string, r io.Reader) (string, error)

func (*Uploader) UploadFile added in v1.1.223

func (o *Uploader) UploadFile(filename, filepath string) (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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