Documentation
¶
Overview ¶
Package internal contains mock objects for testing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockFrame ¶
MockFrame implements BinaryUnmarshaler.
func (*MockFrame) UnmarshalBinary ¶
UnmarshalBinary stores data into Buf.
type MockReader ¶
type MockReader struct {
Buf *bytes.Buffer
DiscardCount int
PeekCount int
ReadCount int
UnreadCount int
DiscardErr error
PeekErr error
ReadErr error
UnreadErr error
}
MockReader implements decoderReader.
func (*MockReader) Buffered ¶
func (r *MockReader) Buffered() int
Buffered returns the number of bytes in Buf.
func (*MockReader) Discard ¶
func (r *MockReader) Discard(n int) (int, error)
Discard the specified number of bytes from Buf.
func (*MockReader) Peek ¶
func (r *MockReader) Peek(n int) ([]byte, error)
Peek returns the specified number of bytes from Buf without discarding.
func (*MockReader) ReadByte ¶
func (r *MockReader) ReadByte() (byte, error)
ReadByte returns the next available byte from Buf.
func (*MockReader) UnreadByte ¶
func (r *MockReader) UnreadByte() error
UnreadByte places the last read byte back into Buf.
Click to show internal directories.
Click to hide internal directories.