Util

package
v0.0.0-...-08303f1 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2015 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Debug bool

Functions

This section is empty.

Types

type PutRets

type PutRets struct {
	qio.PutRet
	Bucket       string  `json:"bucket"`
	Fname        string  `json:"fname"`
	Fsize        float64 `json:"fsize"`
	MimeType     string  `json:"mimeType"`
	EndUser      string  `json:"endUser"`
	PersistentId string  `json:"persistentId"`
	//    Exif string `json:"exif"`
	//    ImageInfo string `json:"imageInfo"`
	Ext  string `json:"ext"`
	Uuid string `json:"uuid"`
}

定义返回值结构

type QiniuUploadManager

type QiniuUploadManager struct {
	AccessKey  string
	SecretKey  string
	BucketName string
}

func GetQiniuManager

func GetQiniuManager(accessKey string, secretKey string, bucketName string) *QiniuUploadManager

获取七牛管理

func (*QiniuUploadManager) UploadIoFile

func (qn *QiniuUploadManager) UploadIoFile(fileName string, r io.Reader, h *multipart.FileHeader) (PutRets, error)

func (*QiniuUploadManager) UploadLocalFile

func (qn *QiniuUploadManager) UploadLocalFile(fileName string, filePath string) (PutRets, error)

@Title 上传本地文件 @Name UploadLocalFile @Param fileName string 文件名 如果为空,那么则使用默认的格式 2014-01-01_md5.ext @Param filePath string 文件路径 @Return token string token

Jump to

Keyboard shortcuts

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