Documentation ¶
Overview ¶
Code generated by counterfeiter. DO NOT EDIT.
Code generated by counterfeiter. DO NOT EDIT.
Code generated by counterfeiter. DO NOT EDIT.
Index ¶
- type Conn
- type Dialer
- type FakeConn
- func (fake *FakeConn) Close() error
- func (fake *FakeConn) CloseCallCount() int
- func (fake *FakeConn) CloseCalls(stub func() error)
- func (fake *FakeConn) CloseReturns(result1 error)
- func (fake *FakeConn) CloseReturnsOnCall(i int, result1 error)
- func (fake *FakeConn) Invocations() map[string][][]interface{}
- type FakeDialer
- func (fake *FakeDialer) Dial(arg1 string, arg2 http.Header) (*websocket.Conn, *http.Response, error)
- func (fake *FakeDialer) DialArgsForCall(i int) (string, http.Header)
- func (fake *FakeDialer) DialCallCount() int
- func (fake *FakeDialer) DialCalls(stub func(string, http.Header) (*websocket.Conn, *http.Response, error))
- func (fake *FakeDialer) DialContext(arg1 context.Context, arg2 string, arg3 http.Header) (*websocket.Conn, *http.Response, error)
- func (fake *FakeDialer) DialContextArgsForCall(i int) (context.Context, string, http.Header)
- func (fake *FakeDialer) DialContextCallCount() int
- func (fake *FakeDialer) DialContextCalls(...)
- func (fake *FakeDialer) DialContextReturns(result1 *websocket.Conn, result2 *http.Response, result3 error)
- func (fake *FakeDialer) DialContextReturnsOnCall(i int, result1 *websocket.Conn, result2 *http.Response, result3 error)
- func (fake *FakeDialer) DialReturns(result1 *websocket.Conn, result2 *http.Response, result3 error)
- func (fake *FakeDialer) DialReturnsOnCall(i int, result1 *websocket.Conn, result2 *http.Response, result3 error)
- func (fake *FakeDialer) Invocations() map[string][][]interface{}
- type FakeUpgrader
- func (fake *FakeUpgrader) Invocations() map[string][][]interface{}
- func (fake *FakeUpgrader) Upgrade(arg1 http.ResponseWriter, arg2 *http.Request, arg3 http.Header) (*websocket.Conn, error)
- func (fake *FakeUpgrader) UpgradeArgsForCall(i int) (http.ResponseWriter, *http.Request, http.Header)
- func (fake *FakeUpgrader) UpgradeCallCount() int
- func (fake *FakeUpgrader) UpgradeCalls(...)
- func (fake *FakeUpgrader) UpgradeReturns(result1 *websocket.Conn, result2 error)
- func (fake *FakeUpgrader) UpgradeReturnsOnCall(i int, result1 *websocket.Conn, result2 error)
- type Upgrader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn interface { // Close closes the underlying network connection without sending or waiting for a close frame. Close() error }
Conn is implemented by websocket.Conn
type Dialer ¶
type Dialer interface { // Dial creates a new client connection. Use requestHeader to specify the // origin (Origin), subprotocols (Sec-WebSocket-Protocol) and cookies (Cookie). // Use the response.Header to get the selected subprotocol // (Sec-WebSocket-Protocol) and cookies (Set-Cookie). // // If the WebSocket handshake fails, ErrBadHandshake is returned along with a // non-nil *http.Response so that callers can handle redirects, authentication, // etcetera. The response body may not contain the entire response and does not // need to be closed by the application. Dial(urlStr string, requestHeader http.Header) (*websocket.Conn, *http.Response, error) // DialContext creates a new client connection. Use requestHeader to specify the // origin (Origin), subprotocols (Sec-WebSocket-Protocol) and cookies (Cookie). // Use the response.Header to get the selected subprotocol // (Sec-WebSocket-Protocol) and cookies (Set-Cookie). // // The context will be used in the request and in the Dialer. // // If the WebSocket handshake fails, ErrBadHandshake is returned along with a // non-nil *http.Response so that callers can handle redirects, authentication, // etcetera. The response body may not contain the entire response and does not // need to be closed by the application. DialContext(ctx context.Context, urlStr string, requestHeader http.Header) (*websocket.Conn, *http.Response, error) }
Dialer is implemented by websocket.Dialer
type FakeConn ¶
type FakeConn struct { CloseStub func() error // contains filtered or unexported fields }
func (*FakeConn) CloseCallCount ¶
func (*FakeConn) CloseCalls ¶
func (*FakeConn) CloseReturns ¶
func (*FakeConn) CloseReturnsOnCall ¶
func (*FakeConn) Invocations ¶
type FakeDialer ¶
type FakeDialer struct { DialStub func(string, http.Header) (*websocket.Conn, *http.Response, error) DialContextStub func(context.Context, string, http.Header) (*websocket.Conn, *http.Response, error) // contains filtered or unexported fields }
func (*FakeDialer) DialArgsForCall ¶
func (fake *FakeDialer) DialArgsForCall(i int) (string, http.Header)
func (*FakeDialer) DialCallCount ¶
func (fake *FakeDialer) DialCallCount() int
func (*FakeDialer) DialContext ¶
func (*FakeDialer) DialContextArgsForCall ¶
func (*FakeDialer) DialContextCallCount ¶
func (fake *FakeDialer) DialContextCallCount() int
func (*FakeDialer) DialContextCalls ¶
func (*FakeDialer) DialContextReturns ¶
func (*FakeDialer) DialContextReturnsOnCall ¶
func (*FakeDialer) DialReturns ¶
func (*FakeDialer) DialReturnsOnCall ¶
func (*FakeDialer) Invocations ¶
func (fake *FakeDialer) Invocations() map[string][][]interface{}
type FakeUpgrader ¶
type FakeUpgrader struct { UpgradeStub func(http.ResponseWriter, *http.Request, http.Header) (*websocket.Conn, error) // contains filtered or unexported fields }
func (*FakeUpgrader) Invocations ¶
func (fake *FakeUpgrader) Invocations() map[string][][]interface{}
func (*FakeUpgrader) Upgrade ¶
func (fake *FakeUpgrader) Upgrade(arg1 http.ResponseWriter, arg2 *http.Request, arg3 http.Header) (*websocket.Conn, error)
func (*FakeUpgrader) UpgradeArgsForCall ¶
func (fake *FakeUpgrader) UpgradeArgsForCall(i int) (http.ResponseWriter, *http.Request, http.Header)
func (*FakeUpgrader) UpgradeCallCount ¶
func (fake *FakeUpgrader) UpgradeCallCount() int
func (*FakeUpgrader) UpgradeCalls ¶
func (fake *FakeUpgrader) UpgradeCalls(stub func(http.ResponseWriter, *http.Request, http.Header) (*websocket.Conn, error))
func (*FakeUpgrader) UpgradeReturns ¶
func (fake *FakeUpgrader) UpgradeReturns(result1 *websocket.Conn, result2 error)
func (*FakeUpgrader) UpgradeReturnsOnCall ¶
func (fake *FakeUpgrader) UpgradeReturnsOnCall(i int, result1 *websocket.Conn, result2 error)
type Upgrader ¶
type Upgrader interface { // Upgrade upgrades the HTTP server connection to the WebSocket protocol. // // The responseHeader is included in the response to the client's upgrade // request. Use the responseHeader to specify cookies (Set-Cookie) and the // application negotiated subprotocol (Sec-Websocket-Protocol). // // If the upgrade fails, then Upgrade replies to the client with an HTTP error // response. Upgrade(w http.ResponseWriter, r *http.Request, responseHeader http.Header) (*websocket.Conn, error) }
Upgrader is implemented by websocket.Upgrader
Click to show internal directories.
Click to hide internal directories.