Documentation ¶
Index ¶
- Variables
- func CheckServer(address string, timeout time.Duration) (ok bool, err error)
- func CheckServerByInterface(interfaceName, address string, timeout time.Duration) (ok bool, err error)
- func CheckServerByLocalAddr(ipv4LocalAddr *util.Address, address string, timeout time.Duration) (ok bool, err error)
- func HttpContentTypeByExt(filePath string) string
- func HttpGetFromIP(url, ipv4Addr string) (*http.Response, error)
- func HttpResponseBodyToStruct(response *http.Response, resultPtr interface{}) error
- func NewFileUploadRequest(url, filedName string, path string, params map[string]string) (*http.Request, error)
- type CommonResp
Constants ¶
This section is empty.
Variables ¶
View Source
var HttpContentType = map[string]string{
".avi": "video/avi",
".mp3": "audio/mp3",
".mp4": "video/mp4",
".wmv": "video/x-ms-wmv",
".asf": "video/x-ms-asf",
".rm": "application/vnd.rn-realmedia",
".rmvb": "application/vnd.rn-realmedia-vbr",
".mov": "video/quicktime",
".m4v": "video/mp4",
".flv": "video/x-flv",
".jpg": "image/jpeg",
".png": "image/png",
}
Functions ¶
func CheckServerByInterface ¶
func CheckServerByLocalAddr ¶
func HttpContentTypeByExt ¶
Types ¶
type CommonResp ¶
Click to show internal directories.
Click to hide internal directories.