Documentation
¶
Index ¶
- func NewTestInputFormat(core.Context) (core.InputFormat, error)
- func NewTestOutputFormat(ctx core.Context) (core.OutputFormat, error)
- func NewTestOutputFormatNoErr(ctx core.Context) core.OutputFormat
- func NewTestSource(core.Context) (core.Source, error)
- type TestDoubleInputModifier
- type TestDoubleOutputModifier
- type TestErrInputModifier
- type TestErrOutputModifier
- type TestSink
- type TestSinkInt
- type TestSource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTestInputFormat ¶
func NewTestInputFormat(core.Context) (core.InputFormat, error)
NewTestInputFormat creates a new test input format.
func NewTestOutputFormat ¶
func NewTestOutputFormat(ctx core.Context) (core.OutputFormat, error)
NewTestOutputFormat creates a new test output format.
func NewTestOutputFormatNoErr ¶
func NewTestOutputFormatNoErr(ctx core.Context) core.OutputFormat
NewTestOutputFormatNoErr creates a new test output format and returns it as a single value so errors don't have to be tested.
Types ¶
type TestDoubleInputModifier ¶
type TestDoubleInputModifier struct {
OptCloseErr error
}
TestDoubleInputModifier doubles the input stream.
func (*TestDoubleInputModifier) Wrap ¶
func (m *TestDoubleInputModifier) Wrap(r core.InputReader) (core.InputReader, error)
Wrap wraps.
type TestDoubleOutputModifier ¶
type TestDoubleOutputModifier struct {
OptCloseErr error
}
TestDoubleOutputModifier doubles the output stream.
func (*TestDoubleOutputModifier) Wrap ¶
func (m *TestDoubleOutputModifier) Wrap(w core.OutputWriter) (core.OutputWriter, error)
Wrap wraps.
type TestErrInputModifier ¶
type TestErrInputModifier struct {
Err error
}
TestErrInputModifier is a test input modifier that returns an error on wrap.
func (*TestErrInputModifier) Wrap ¶
func (m *TestErrInputModifier) Wrap(core.InputReader) (core.InputReader, error)
Wrap returns an error.
type TestErrOutputModifier ¶
type TestErrOutputModifier struct {
Err error
}
TestErrOutputModifier is a test output modifier that returns an error on wrap.
func (*TestErrOutputModifier) Wrap ¶
func (m *TestErrOutputModifier) Wrap(w core.OutputWriter) (core.OutputWriter, error)
Wrap retuns an error.
type TestSink ¶
type TestSink struct {
OptCloseErr error
// contains filtered or unexported fields
}
TestSink is a test sink of bytes.
type TestSinkInt ¶
type TestSinkInt struct {
OptCloseErr error
// contains filtered or unexported fields
}
TestSinkInt is a test sink of ints.
type TestSource ¶
type TestSource struct {
Data []core.InputReader
// contains filtered or unexported fields
}
TestSource is a test source.
func NewTestSourceData ¶
func NewTestSourceData(data []core.InputReader) *TestSource
NewTestSourceData creates a new test source prefilled with a certain set of data.
func (*TestSource) Init ¶
func (s *TestSource) Init(ctx core.Context)
Init initializes the test source.
func (*TestSource) Streams ¶
func (s *TestSource) Streams() <-chan core.InputReader
Streams returns a channel of source streams.