encoding

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encoder

type Encoder interface {
	Decode(source io.Reader, target interface{}) error
	Encode(source interface{}, target io.Writer) error
}

func NewJSON

func NewJSON() Encoder

type MockEncoder

type MockEncoder struct {
	mock.Mock
}

MockEncoder is an autogenerated mock type for the Encoder type

func NewMockEncoder added in v0.3.0

func NewMockEncoder(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockEncoder

NewMockEncoder creates a new instance of MockEncoder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockEncoder) Decode

func (_m *MockEncoder) Decode(source io.Reader, target interface{}) error

Decode provides a mock function with given fields: source, target

func (*MockEncoder) Encode

func (_m *MockEncoder) Encode(source interface{}, target io.Writer) error

Encode provides a mock function with given fields: source, target

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL