Documentation ¶
Index ¶
- func ProgressRead(r io.Reader, total int64, progress ...ProgressFunc) io.Reader
- type JSONObject
- type JSONValue
- type ProcessFunc
- func Process(process ProcessFunc) ProcessFunc
- func ProcessBytes(process func(data []byte) error) ProcessFunc
- func ProcessCSV(read func(reader *csv.Reader) error, skip ...int) ProcessFunc
- func ProcessJSON(v interface{}) ProcessFunc
- func ProcessJSONDocument(process func(jv *JSONValue) error) ProcessFunc
- func ProcessProgress(read ReadFunc, progress ...ProgressFunc) ProcessFunc
- func ProcessTSV(read func(reader *csv.Reader) error, skip ...int) ProcessFunc
- func Read(readFn ReadFunc) ProcessFunc
- type ProgressFunc
- type ReadFunc
- type X
- func (x *X) Client(cli *http.Client) *X
- func (x *X) Debug(yes ...bool) *X
- func (x *X) Do() error
- func (x *X) Err() error
- func (x *X) Exec(ctx context.Context) error
- func (x *X) Process(pFn ProcessFunc) *X
- func (x *X) Request(method string, url string, body io.Reader) *X
- func (x *X) SetRequest(req *http.Request) *X
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProgressRead ¶
Types ¶
type JSONObject ¶
type ProcessFunc ¶
func ProcessBytes ¶
func ProcessBytes(process func(data []byte) error) ProcessFunc
ProcessBytes 以字节方式处理下载流
func ProcessCSV ¶
func ProcessCSV(read func(reader *csv.Reader) error, skip ...int) ProcessFunc
func ProcessJSONDocument ¶
func ProcessJSONDocument(process func(jv *JSONValue) error) ProcessFunc
ProcessJSONDocument 以JSON格式处理下载流
func ProcessProgress ¶
func ProcessProgress(read ReadFunc, progress ...ProgressFunc) ProcessFunc
ProcessProgress 带进度处理下载流
func ProcessTSV ¶
func ProcessTSV(read func(reader *csv.Reader) error, skip ...int) ProcessFunc
type ProgressFunc ¶
type ProgressFunc = func(cur, total, pct int64)
Click to show internal directories.
Click to hide internal directories.