internal

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Client = NewClient()

The default HTTP client instance.

Functions

func ForceClose

func ForceClose(c io.Closer)

ForceClose force close the given io.Closer ignore error.

func NewClient

func NewClient() *http.Client

NewClient returns a new *http.Client instance.

func NewTransport

func NewTransport() (t *http.Transport)

NewTransport returns a new *http.Transport instance.

func ShouldBeRegularFile

func ShouldBeRegularFile(info os.FileInfo, err error) error

ShouldBeRegularFile determines whether the given target is a regular file.

func ToString

func ToString(value interface{}) string

ToString converts the given parameter to a string.

func WriteFormDataFromFileHeader

func WriteFormDataFromFileHeader(key string, p *multipart.FileHeader, w *multipart.Writer) error

WriteFormDataFromFileHeader writes the downstream uploaded file to upload writer.

func WriteFormDataFromFilePath

func WriteFormDataFromFilePath(key, p string, w *multipart.Writer) error

WriteFormDataFromFilePath writes the contents of a given file to upload writer.

func WriteFormDataFromReader

func WriteFormDataFromReader(key, name string, w *multipart.Writer, src io.Reader) error

WriteFormDataFromReader writes the contents of a given io.Reader to upload writer.

Types

This section is empty.

Jump to

Keyboard shortcuts

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