Documentation ¶
Overview ¶
Package redistest is used as a helper in tests that need mocked redis connection.
Index ¶
- type MockConn
- func (conn *MockConn) Close() error
- func (conn *MockConn) Do(commandName string, params ...interface{}) (interface{}, error)
- func (conn *MockConn) Err() error
- func (conn *MockConn) Flush() error
- func (conn *MockConn) Receive() (interface{}, error)
- func (conn *MockConn) Send(commandName string, params ...interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockConn ¶
MockConn structure provides mocked redis connection implementing redigo module's Conn interface.
func NewMockConn ¶
func NewMockConn() *MockConn
NewMockConn function creates mocked redis connection and applies default expectations.
func (*MockConn) Do ¶
Do method mocks sending command to the redis server and waiting for the reply.
Click to show internal directories.
Click to hide internal directories.