Versions in this module Expand all Collapse all v0 v0.0.1 Oct 14, 2020 Changes in this version + func HttpDeleteForm(client *http.Client, reqUrl string, postData url.Values, ...) ([]byte, error) + func HttpGet(client *http.Client, reqUrl string) (map[string]interface{}, error) + func HttpGet2(client *http.Client, reqUrl string, headers map[string]string) (map[string]interface{}, error) + func HttpGet3(client *http.Client, reqUrl string, headers map[string]string) ([]interface{}, error) + func HttpGet4(client *http.Client, reqUrl string, headers map[string]string, ...) error + func HttpGet5(client *http.Client, reqUrl string, headers map[string]string) ([]byte, error) + func HttpPostForm(client *http.Client, reqUrl string, postData url.Values) ([]byte, error) + func HttpPostForm2(client *http.Client, reqUrl string, postData url.Values, ...) ([]byte, error) + func HttpPostForm3(client *http.Client, reqUrl string, postData string, headers map[string]string) ([]byte, error) + func HttpPostForm4(client *http.Client, reqUrl string, postData map[string]string, ...) ([]byte, error) + func HttpPut(client *http.Client, reqUrl string, postData url.Values, ...) ([]byte, error) + func NewHttpRequest(client *http.Client, reqType string, reqUrl string, postData string, ...) ([]byte, error) + func NewHttpRequestWithFasthttp(client *http.Client, reqMethod, reqUrl, postData string, ...) ([]byte, error) + type WsBuilder struct + func NewWsBuilder() *WsBuilder + func (b *WsBuilder) AutoReconnect() *WsBuilder + func (b *WsBuilder) Build() *WsConn + func (b *WsBuilder) ConnectSuccessAfterSendMessage(msg func() []byte) *WsBuilder + func (b *WsBuilder) DecompressFunc(f func([]byte) ([]byte, error)) *WsBuilder + func (b *WsBuilder) Dump() *WsBuilder + func (b *WsBuilder) ErrorHandleFunc(f func(err error)) *WsBuilder + func (b *WsBuilder) Heartbeat(heartbeat func() []byte, t time.Duration) *WsBuilder + func (b *WsBuilder) ProtoHandleFunc(f func([]byte) error) *WsBuilder + func (b *WsBuilder) ProxyUrl(proxyUrl string) *WsBuilder + func (b *WsBuilder) ReconnectInterval(t time.Duration) *WsBuilder + func (b *WsBuilder) ReqHeader(key, value string) *WsBuilder + func (b *WsBuilder) WsUrl(wsUrl string) *WsBuilder + type WsConfig struct + ConnectSuccessAfterSendMessage func() []byte + DecompressFunc func([]byte) ([]byte, error) + ErrorHandleFunc func(err error) + HeartbeatData func() []byte + HeartbeatIntervalTime time.Duration + IsAutoReconnect bool + IsDump bool + ProtoHandleFunc func([]byte) error + ProxyUrl string + ReqHeaders map[string][]string + WsUrl string + type WsConn struct + func (ws *WsConn) CloseWs() + func (ws *WsConn) NewWs() *WsConn + func (ws *WsConn) SendCloseMessage(msg []byte) + func (ws *WsConn) SendJsonMessage(m interface{}) error + func (ws *WsConn) SendMessage(msg []byte) + func (ws *WsConn) SendPingMessage(msg []byte) + func (ws *WsConn) SendPongMessage(msg []byte) + func (ws *WsConn) Subscribe(subEvent interface{}) error