io

package
v0.0.0-...-8f6b5bc Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2018 License: MIT Imports: 12 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 Put2

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

func PutWithoutKey2

func PutWithoutKey2(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