Documentation ¶
Overview ¶
Package codec is a generated GoMock package.
Index ¶
- Variables
- type Codec
- type DecodeFunc
- type DefaultCodec
- func (c *DefaultCodec) Decode(ctx context.Context, st stream.Type, payloadType string, bytes []byte) (payload interface{}, err error)
- func (c *DefaultCodec) Encode(ctx context.Context, st stream.Type, payloadType string, payload interface{}) (bytes []byte, err error)
- func (c *DefaultCodec) Merge(in ...*DefaultCodec)
- func (c *DefaultCodec) Stream(st stream.Type) *Stream
- type EncodeFunc
- type MockCodec
- type MockCodecMockRecorder
- type Stream
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("codec not found")
Functions ¶
This section is empty.
Types ¶
type DecodeFunc ¶
type DefaultCodec ¶
type DefaultCodec struct {
// contains filtered or unexported fields
}
func New ¶
func New() *DefaultCodec
func (*DefaultCodec) Merge ¶
func (c *DefaultCodec) Merge(in ...*DefaultCodec)
type EncodeFunc ¶
type MockCodec ¶
type MockCodec struct {
// contains filtered or unexported fields
}
MockCodec is a mock of Codec interface
func NewMockCodec ¶
func NewMockCodec(ctrl *gomock.Controller) *MockCodec
NewMockCodec creates a new mock instance
func (*MockCodec) Decode ¶
func (m *MockCodec) Decode(ctx context.Context, st stream.Type, payloadType string, bytes []byte) (interface{}, error)
Decode mocks base method
func (*MockCodec) EXPECT ¶
func (m *MockCodec) EXPECT() *MockCodecMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockCodecMockRecorder ¶
type MockCodecMockRecorder struct {
// contains filtered or unexported fields
}
MockCodecMockRecorder is the mock recorder for MockCodec
func (*MockCodecMockRecorder) Decode ¶
func (mr *MockCodecMockRecorder) Decode(ctx, st, payloadType, bytes interface{}) *gomock.Call
Decode indicates an expected call of Decode
func (*MockCodecMockRecorder) Encode ¶
func (mr *MockCodecMockRecorder) Encode(ctx, st, payloadType, payload interface{}) *gomock.Call
Encode indicates an expected call of Encode
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
func (*Stream) Payload ¶
func (s *Stream) Payload(name string, enc EncodeFunc, dec DecodeFunc) *Stream
Click to show internal directories.
Click to hide internal directories.