Versions in this module Expand all Collapse all v2 v2.6.0 Apr 26, 2021 Changes in this version + var UnknownMessage binding.Message = unknownMessage + func AssertTransformerInvokedOneTime(t *testing.T, m *MockTransformer) + func MustCreateMockBinaryMessage(e event.Event) binding.Message + func MustCreateMockStructuredMessage(t testing.TB, e event.Event) binding.Message + func RunTransformerTests(t *testing.T, ctx context.Context, tests []TransformerTestArgs) + type MockBinaryMessage struct + Body []byte + Extensions map[string]interface{} + Metadata map[spec.Attribute]interface{} + Version spec.Version + func (bm *MockBinaryMessage) End(ctx context.Context) error + func (bm *MockBinaryMessage) Finish(error) error + func (bm *MockBinaryMessage) GetAttribute(k spec.Kind) (spec.Attribute, interface{}) + func (bm *MockBinaryMessage) GetExtension(name string) interface{} + func (bm *MockBinaryMessage) ReadBinary(ctx context.Context, b binding.BinaryWriter) error + func (bm *MockBinaryMessage) ReadEncoding() binding.Encoding + func (bm *MockBinaryMessage) ReadStructured(context.Context, binding.StructuredWriter) error + func (bm *MockBinaryMessage) SetAttribute(attribute spec.Attribute, value interface{}) error + func (bm *MockBinaryMessage) SetData(data io.Reader) (err error) + func (bm *MockBinaryMessage) SetExtension(name string, value interface{}) error + func (bm *MockBinaryMessage) Start(ctx context.Context) error + type MockStructuredMessage struct + Bytes []byte + Format format.Format + func (s *MockStructuredMessage) Finish(error) error + func (s *MockStructuredMessage) ReadBinary(context.Context, binding.BinaryWriter) error + func (s *MockStructuredMessage) ReadEncoding() binding.Encoding + func (s *MockStructuredMessage) ReadStructured(ctx context.Context, b binding.StructuredWriter) error + func (s *MockStructuredMessage) SetStructuredEvent(ctx context.Context, format format.Format, event io.Reader) (err error) + type MockTransformer struct + Invoked int + func (m *MockTransformer) Transform(binding.MessageMetadataReader, binding.MessageMetadataWriter) error + type TransformerTestArgs struct + AssertFunc func(t *testing.T, event event.Event) + InputEvent event.Event + InputMessage binding.Message + Name string + Transformers []binding.Transformer + WantEvent event.Event