osswrap

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OssErrorInit = 1 + iota
	OssErrorUse
	OssErrorPut
	OssErrorGet
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Endpoint, AccessKeyId, AccessKeySecret string
	ConnectTimeoutSec, ReadWriteTimeout    int64
}

type Oss

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

func New

func New(options Options, bucketName string) *Oss

func (*Oss) Bucket

func (o *Oss) Bucket() *oss.Bucket

func (*Oss) Client

func (o *Oss) Client() *oss.Client

func (*Oss) Get

func (o *Oss) Get(src string) io.ReadCloser

func (*Oss) GetFile

func (o *Oss) GetFile(src, dst string)

func (*Oss) Proxy

func (o *Oss) Proxy() string

func (*Oss) Put

func (o *Oss) Put(src io.Reader, dst string, filename ...string)

func (*Oss) PutDir

func (o *Oss) PutDir(src, dst string, filter func(path string))

PutDir copy src/* -> dst/*

func (*Oss) PutFile

func (o *Oss) PutFile(src, dst string, filename ...string)

func (*Oss) Use

func (o *Oss) Use(bucketName string)

Jump to

Keyboard shortcuts

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