io

package
v2.0.7+incompatible Latest Latest
Warning

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

Go to latest
Published: May 17, 2017 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Put2

func Put2(c rpc.Client, l rpc.Logger, ret interface{}, uptoken, key string, data io.Reader, size int64, extra *PutExtra) error

func PutFile

func PutFile(c rpc.Client, l rpc.Logger, ret interface{}, uptoken, key, localFile string, extra *PutExtra) (err error)

func PutFileWithoutKey

func PutFileWithoutKey(c rpc.Client, l rpc.Logger, ret interface{}, uptoken, localFile string, extra *PutExtra) (err error)

func PutWithoutKey2

func PutWithoutKey2(c rpc.Client, l rpc.Logger, ret interface{}, uptoken string, data io.Reader, size int64, extra *PutExtra) error

Types

type PutExtra

type PutExtra struct {
	Params map[string]string //可选,用户自定义参数,必须以 "x:" 开头
	//若不以x:开头,则忽略
	MimeType string //可选,当为 "" 时候,服务端自动判断
	Crc32    uint32
	CheckCrc uint32
}

@gist PutExtra

type PutRet

type PutRet struct {
	Hash string `json:"hash"` // 如果 uptoken 没有指定 ReturnBody,那么返回值是标准的 PutRet 结构
	Key  string `json:"key"`
}

Jump to

Keyboard shortcuts

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