Documentation ¶
Index ¶
- func CompareErrors(t *testing.T, message string, actualError, wantedError error) bool
- func CompareEvents(t *testing.T, message string, actualEvent, wantedEvent cloudevents.Event) bool
- func CompareResponses(t *testing.T, message string, actualResponse, wantedResponse http.Response) bool
- func EventToMap(event *cloudevents.Event) map[string]interface{}
- func NewEventWithJSONStringData(jsonData string, st ...string) cloudevents.Event
- func NewEventWithMapData(payload map[string]interface{}, st ...string) cloudevents.Event
- func NewGETRequest(url string) *http.Request
- func NewReq(method string, header http.Header, url, body string) *http.Request
- func TransformBytesToEvent(eventMarshalled []byte, context cloudevents.EventContext) (*cloudevents.Event, error)
- func Unmarshal(source []byte, event *cloudevents.Event) error
- type CeClientMock
- type CloudEventTransformer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareErrors ¶ added in v0.4.0
CompareErrors true if events are "equal"
func CompareEvents ¶ added in v0.4.0
CompareEvents true if events are "equal"
func CompareResponses ¶ added in v0.4.0
func CompareResponses(t *testing.T, message string, actualResponse, wantedResponse http.Response) bool
CompareResponses true if events are "equal"
func EventToMap ¶ added in v0.4.0
func EventToMap(event *cloudevents.Event) map[string]interface{}
EventToMap Transform a cloudevent to input data
func NewEventWithJSONStringData ¶ added in v0.4.0
func NewEventWithJSONStringData(jsonData string, st ...string) cloudevents.Event
NewEventWithJSONStringData jsonDataString, source,type,id
func NewEventWithMapData ¶ added in v0.4.0
func NewEventWithMapData(payload map[string]interface{}, st ...string) cloudevents.Event
NewEventWithMapData payload, source,type,id
func TransformBytesToEvent ¶ added in v0.4.0
func TransformBytesToEvent(eventMarshalled []byte, context cloudevents.EventContext) (*cloudevents.Event, error)
TransformBytesToEvent bla
Types ¶
type CeClientMock ¶ added in v0.4.0
type CeClientMock struct { T *testing.T WantSend bool WantSendEvent cloudevents.Event ShouldThrowErrorOnStart error ShouldThrowErrorOnSend error }
CeClientMock mock ce client
func (*CeClientMock) Request ¶ added in v0.4.0
func (mm *CeClientMock) Request(ctx context.Context, event cloudevents.Event) (*cloudevents.Event, protocol.Result)
Request bla
func (*CeClientMock) Send ¶ added in v0.4.0
func (mm *CeClientMock) Send(ctx context.Context, event cloudevents.Event) protocol.Result
Send bla
func (*CeClientMock) StartReceiver ¶ added in v0.4.0
func (mm *CeClientMock) StartReceiver(ctx context.Context, fn interface{}) error
StartReceiver bla
type CloudEventTransformer ¶
type CloudEventTransformer struct {
// contains filtered or unexported fields
}
CloudEventTransformer bla
func NewCloudEventTransformer ¶ added in v0.4.0
func NewCloudEventTransformer(ceTemplate, resultSource, resultType string, debug bool) (*CloudEventTransformer, error)
NewCloudEventTransformer new instance of CloudEventTransformer ceTemplate,source, type, debug
func (*CloudEventTransformer) CreateEvent ¶ added in v0.4.0
func (ct *CloudEventTransformer) CreateEvent(input interface{}) (*cloudevents.Event, error)
CreateEvent bla
func (*CloudEventTransformer) PredicateEvent ¶ added in v0.3.0
func (ct *CloudEventTransformer) PredicateEvent(sourceEvent *cloudevents.Event) (bool, error)
PredicateEvent bla
func (*CloudEventTransformer) TransformEvent ¶
func (ct *CloudEventTransformer) TransformEvent(sourceEvent *cloudevents.Event) (*cloudevents.Event, error)
TransformEvent bla
Click to show internal directories.
Click to hide internal directories.