Documentation ¶
Overview ¶
Package jsonx is a generated GoMock package.
Index ¶
- func Marshal(v interface{}) ([]byte, error)
- func Unmarshal(data []byte, v interface{}) error
- type DecoderItf
- type EncoderItf
- type JSONIterator
- type MockDecoderItf
- type MockDecoderItfMockRecorder
- type MockEncoderItf
- type MockEncoderItfMockRecorder
- type MockOperatorItf
- func (m *MockOperatorItf) EXPECT() *MockOperatorItfMockRecorder
- func (m *MockOperatorItf) Marshal(v interface{}) ([]byte, error)
- func (m *MockOperatorItf) NewDecoder(r io.Reader) DecoderItf
- func (m *MockOperatorItf) NewEncoder(w io.Writer) EncoderItf
- func (m *MockOperatorItf) Unmarshal(data []byte, v interface{}) error
- type MockOperatorItfMockRecorder
- func (mr *MockOperatorItfMockRecorder) Marshal(v interface{}) *gomock.Call
- func (mr *MockOperatorItfMockRecorder) NewDecoder(r interface{}) *gomock.Call
- func (mr *MockOperatorItfMockRecorder) NewEncoder(w interface{}) *gomock.Call
- func (mr *MockOperatorItfMockRecorder) Unmarshal(data, v interface{}) *gomock.Call
- type OperatorItf
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DecoderItf ¶
type DecoderItf interface {
Decode(v interface{}) error
}
DecoderItf interface for json library decoder.
func NewDecoder ¶
func NewDecoder(r io.Reader) DecoderItf
NewDecoder returns decoder to decode data to buffer.
type EncoderItf ¶
type EncoderItf interface {
Encode(v interface{}) error
}
EncoderItf interface for json library encoder.
func NewEncoder ¶
func NewEncoder(w io.Writer) EncoderItf
NewEncoder returns encoder to encode data to buffer.
type JSONIterator ¶
type JSONIterator struct {
// contains filtered or unexported fields
}
JSONIterator is a json operator using json-iterator library.
func NewJSONIterator ¶
func NewJSONIterator() *JSONIterator
NewJSONIterator constructs new json operator using json-iterator library.
func (*JSONIterator) Marshal ¶
func (j *JSONIterator) Marshal(v interface{}) ([]byte, error)
Marshal returns bytes of interface.
func (*JSONIterator) NewDecoder ¶
func (j *JSONIterator) NewDecoder(r io.Reader) DecoderItf
NewDecoder returns decoder to decode data to buffer.
func (*JSONIterator) NewEncoder ¶
func (j *JSONIterator) NewEncoder(w io.Writer) EncoderItf
NewEncoder returns encoder to encode data to buffer.
func (*JSONIterator) Unmarshal ¶
func (j *JSONIterator) Unmarshal(data []byte, v interface{}) error
Unmarshal copy input data to interface.
type MockDecoderItf ¶
type MockDecoderItf struct {
// contains filtered or unexported fields
}
MockDecoderItf is a mock of DecoderItf interface.
func NewMockDecoderItf ¶
func NewMockDecoderItf(ctrl *gomock.Controller) *MockDecoderItf
NewMockDecoderItf creates a new mock instance.
func (*MockDecoderItf) Decode ¶
func (m *MockDecoderItf) Decode(v interface{}) error
Decode mocks base method.
func (*MockDecoderItf) EXPECT ¶
func (m *MockDecoderItf) EXPECT() *MockDecoderItfMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockDecoderItfMockRecorder ¶
type MockDecoderItfMockRecorder struct {
// contains filtered or unexported fields
}
MockDecoderItfMockRecorder is the mock recorder for MockDecoderItf.
func (*MockDecoderItfMockRecorder) Decode ¶
func (mr *MockDecoderItfMockRecorder) Decode(v interface{}) *gomock.Call
Decode indicates an expected call of Decode.
type MockEncoderItf ¶
type MockEncoderItf struct {
// contains filtered or unexported fields
}
MockEncoderItf is a mock of EncoderItf interface.
func NewMockEncoderItf ¶
func NewMockEncoderItf(ctrl *gomock.Controller) *MockEncoderItf
NewMockEncoderItf creates a new mock instance.
func (*MockEncoderItf) EXPECT ¶
func (m *MockEncoderItf) EXPECT() *MockEncoderItfMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockEncoderItf) Encode ¶
func (m *MockEncoderItf) Encode(v interface{}) error
Encode mocks base method.
type MockEncoderItfMockRecorder ¶
type MockEncoderItfMockRecorder struct {
// contains filtered or unexported fields
}
MockEncoderItfMockRecorder is the mock recorder for MockEncoderItf.
func (*MockEncoderItfMockRecorder) Encode ¶
func (mr *MockEncoderItfMockRecorder) Encode(v interface{}) *gomock.Call
Encode indicates an expected call of Encode.
type MockOperatorItf ¶
type MockOperatorItf struct {
// contains filtered or unexported fields
}
MockOperatorItf is a mock of OperatorItf interface.
func NewMockOperatorItf ¶
func NewMockOperatorItf(ctrl *gomock.Controller) *MockOperatorItf
NewMockOperatorItf creates a new mock instance.
func (*MockOperatorItf) EXPECT ¶
func (m *MockOperatorItf) EXPECT() *MockOperatorItfMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockOperatorItf) Marshal ¶
func (m *MockOperatorItf) Marshal(v interface{}) ([]byte, error)
Marshal mocks base method.
func (*MockOperatorItf) NewDecoder ¶
func (m *MockOperatorItf) NewDecoder(r io.Reader) DecoderItf
NewDecoder mocks base method.
func (*MockOperatorItf) NewEncoder ¶
func (m *MockOperatorItf) NewEncoder(w io.Writer) EncoderItf
NewEncoder mocks base method.
func (*MockOperatorItf) Unmarshal ¶
func (m *MockOperatorItf) Unmarshal(data []byte, v interface{}) error
Unmarshal mocks base method.
type MockOperatorItfMockRecorder ¶
type MockOperatorItfMockRecorder struct {
// contains filtered or unexported fields
}
MockOperatorItfMockRecorder is the mock recorder for MockOperatorItf.
func (*MockOperatorItfMockRecorder) Marshal ¶
func (mr *MockOperatorItfMockRecorder) Marshal(v interface{}) *gomock.Call
Marshal indicates an expected call of Marshal.
func (*MockOperatorItfMockRecorder) NewDecoder ¶
func (mr *MockOperatorItfMockRecorder) NewDecoder(r interface{}) *gomock.Call
NewDecoder indicates an expected call of NewDecoder.
func (*MockOperatorItfMockRecorder) NewEncoder ¶
func (mr *MockOperatorItfMockRecorder) NewEncoder(w interface{}) *gomock.Call
NewEncoder indicates an expected call of NewEncoder.
func (*MockOperatorItfMockRecorder) Unmarshal ¶
func (mr *MockOperatorItfMockRecorder) Unmarshal(data, v interface{}) *gomock.Call
Unmarshal indicates an expected call of Unmarshal.
type OperatorItf ¶
type OperatorItf interface { Unmarshal(data []byte, v interface{}) error Marshal(v interface{}) ([]byte, error) NewEncoder(w io.Writer) EncoderItf NewDecoder(r io.Reader) DecoderItf }
OperatorItf interface for json library.