Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: pass extension into the constructor. #214

Merged

Conversation

lholmquist
Copy link
Contributor

  • This allows someone to pass an extension/extensions into the CloudEvent contructor when creating a CloudEvent.

fixes #209

Signed-off-by: Lucas Holmquist lholmqui@redhat.com

@lance lance added the type/enhancement New feature or request label Jun 8, 2020
Copy link
Member

@lance lance left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that the extensions should be represented in the CloudEventV1Attributes and CloudEventV03Attributes interfaces as an optional attribute. The interfaces already have a k/v property which is meant to represent the extensions, but I don't think that is correct.

* This allows someone to pass an extension/extensions into the CloudEvent contructor when creating a CloudEvent.

fixes cloudevents#209

Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
@lholmquist lholmquist force-pushed the 209-add-extension-in-contructor branch from bfa8cdd to 768469e Compare June 9, 2020 19:16
@lholmquist
Copy link
Contributor Author

Added an Extension interface as well as tests

Copy link
Member

@lance lance left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lance lance merged commit 0378f4c into cloudevents:master Jun 9, 2020
@lance lance mentioned this pull request Jul 7, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
type/enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CloudEvent constructor should accept inline extensions
2 participants