oss

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Access

type Access struct {
	Endpoint string
	Key      string
	Secret   string
	Bucket   string
}

type OSS

type OSS interface {
	// 初始化
	Init(...Option) error
	// 上传到临时目录
	Upload(filename string, reader io.Reader) (string, error)
	// 保存到正式目录
	Save(from string, to string) (string, error)
}

type Option

type Option func(o *Options)

func WithAccess

func WithAccess(v Access) Option

func WithSchema

func WithSchema(schema string) Option

type Options

type Options struct {
	Access
	Schema  string
	Context context.Context
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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