io

package
v0.0.0-...-a69649c Latest Latest
Warning

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

Go to latest
Published: May 26, 2014 License: GPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Put

func Put(l rpc.Logger, ret interface{}, uptoken, key string, data io.Reader, extra *PutExtra) error

func PutFile

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

func PutFileWithoutKey

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

func PutWithoutKey

func PutWithoutKey(l rpc.Logger, ret interface{}, uptoken string, data io.Reader, 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