Documentation ¶
Index ¶
- Constants
- Variables
- func DealUploadFilePath(ctx context.Context, uploadFilepath string, postFileCh chan string)
- func ErrorIf(b bool, err1, err2 error) error
- func Gen(s string, mode StringMode) string
- func NetworkWrap(network string) networkWrapper
- func OpenFile(f string) *os.File
- func ParseBodyArg(body string, stream bool) (streamFileName string, bodyBytes []byte)
- func Quoted(s, open, close string) (string, bool)
- func ReadFileFromPos(f *os.File, pos int64) ([]byte, error)
- func ReadMultipartFile(nocache bool, fieldName, filePath string) (data []byte, contentType string, err error)
- func SetHeader(r *fasthttp.Request, header, value string)
- func ThroughputStatDial(wrap networkWrapper, dial fasthttp.DialFunc, r *int64, w *int64) fasthttp.DialFunc
- type Closers
- type Keep
- type LogFile
- type MyConn
- type Option
- type Profile
- type RangeValue
- type SingleValue
- type StringMode
- type Tag
- type TagValue
Constants ¶
View Source
const ( ContentTypeName = "Content-Type" ContentTypeJSON = "application/json;charset=utf-8" )
View Source
const DemoProfile = `` /* 1399-byte string literal not displayed */
Variables ¶
View Source
var Valuer jj.Substitute = &valuer{Map: make(map[Keep]interface{})}
Functions ¶
func DealUploadFilePath ¶
func Gen ¶
func Gen(s string, mode StringMode) string
func NetworkWrap ¶
func NetworkWrap(network string) networkWrapper
func ParseBodyArg ¶
func ReadMultipartFile ¶
func ReadMultipartFile(nocache bool, fieldName, filePath string) (data []byte, contentType string, err error)
ReadMultipartFile read file filePath for upload in multipart, return multipart content, form data content type and error.
Types ¶
type Profile ¶
type Profile struct { Method string URL string Query map[string]string RawJSON map[string]string Form map[string]string Header map[string]string Body string Option Comments []string // contains filtered or unexported fields }
func ParseProfileArg ¶
type RangeValue ¶
func (*RangeValue) Contains ¶
func (r *RangeValue) Contains(s string) bool
type SingleValue ¶
type SingleValue struct {
Value string
}
func (SingleValue) Contains ¶
func (v SingleValue) Contains(s string) bool
Click to show internal directories.
Click to hide internal directories.