goalioss

package
v1.2.38 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 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:"accessKeyId,optional" yaml:"AccessKeyId,optional"`
	AccessKeySecret string `json:"accessKeySecret,optional" yaml:"AccessKeySecret,optional"`
	Endpoint        string `json:"endpoint,optional" yaml:"Endpoint,optional"`
	Bucket          string `json:"bucket,optional" yaml:"Bucket,optional"`
	Domain          string `json:"domain,optional" yaml:"Domain,optional"`
}

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