Documentation
¶
Overview ¶
Package driver provides the default driver of zerobot
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectHook ¶
type ConnectHook func(id int64)
type HTTP ¶
func NewHTTPClient ¶
type HTTPCaller ¶
func (*HTTPCaller) CallAPI ¶
func (c *HTTPCaller) CallAPI(request zero.APIRequest) (zero.APIResponse, error)
type WSClient ¶
type WSClient struct {
URL string // ws连接地址
AccessToken string
// contains filtered or unexported fields
}
WSClient ...
func NewWebSocketClient ¶
NewWebSocketClient 默认Driver,使用正向WS通信
func (*WSClient) CallAPI ¶
func (ws *WSClient) CallAPI(req zero.APIRequest) (zero.APIResponse, error)
CallAPI 发送ws请求
type WSSCaller ¶
type WSSCaller struct {
// contains filtered or unexported fields
}
WSSCaller ...
func (*WSSCaller) CallAPI ¶
func (wssc *WSSCaller) CallAPI(req zero.APIRequest) (zero.APIResponse, error)
CallAPI 发送ws请求
type WSServer ¶
type WSServer struct {
URL string // ws连接地址
AccessToken string
json.Unmarshaler
// contains filtered or unexported fields
}
WSServer ...
func NewWebSocketServer ¶
func NewWebSocketServer(waitn int, url, accessToken string, hook ConnectHook) *WSServer
NewWebSocketServer 使用反向WS通信
func (*WSServer) UnmarshalJSON ¶
UnmarshalJSON init WSServer with waitn=16
Click to show internal directories.
Click to hide internal directories.