goalioss

package
v1.2.28 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

README

Aliyun oss 封装

基于库 github.com/aliyun/aliyun-oss-go-sdk/oss

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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 GoAliOss added in v1.2.23

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

func Init

func Init(conf Config) *GoAliOss

func (*GoAliOss) Client added in v1.2.23

func (g *GoAliOss) Client() *oss.Client

func (*GoAliOss) ContentType added in v1.2.23

func (g *GoAliOss) ContentType(value string) *Uploader

func (*GoAliOss) Options added in v1.2.23

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

func (*GoAliOss) Upload added in v1.2.23

func (g *GoAliOss) Upload(filename string, body []byte) (string, error)

type Uploader

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

func New

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

func (*Uploader) ContentType

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

func (*Uploader) Options

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

func (*Uploader) Upload

func (o *Uploader) Upload(filename string, body []byte) (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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