goalioss

package
v1.2.49 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 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

func Init

func Init(configs ...Config) (err error)

Types

type Config

type Config struct {
	Name            string `json:"name,optional" yaml:"Name,optional"`
	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"`
	Open            bool   `json:"open,optional" yaml:"Open,optional"`
}

type Uploader

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

func Default added in v1.2.39

func Default() *Uploader

func GetClient added in v1.2.39

func GetClient(names ...string) *Uploader

func New

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

func (*Uploader) AliClient added in v1.2.42

func (g *Uploader) AliClient() *oss.Client

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