Skip to content

Event Data Structure #1

New issue

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

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

Already on GitHub? Sign in to your account

Closed
slinkydeveloper opened this issue Feb 18, 2020 · 1 comment · Fixed by #11
Closed

Event Data Structure #1

slinkydeveloper opened this issue Feb 18, 2020 · 1 comment · Fixed by #11
Assignees
Milestone

Comments

@slinkydeveloper
Copy link
Member

Data structures to represent CloudEvents that can be extended in future to support different cloudevents versions. Some examples:

We also need easy accessors to read cloudevents metadata, extensions and payload. An example to read and parse payload: https://github.com/slinkydeveloper/cloudevents-rust/blob/master/cloudevents-rust/src/event/payload.rs

Data structure could be immutable, so we builders to build them. For builders we can try to use https://docs.rs/crate/derive_builder/0.9.0

@slinkydeveloper slinkydeveloper added this to the 0.1 milestone Feb 18, 2020
@slinkydeveloper
Copy link
Member Author

Attributes should be represented as union type to support different spec versions.

The Event structure should have some simple accessors to read/write id, type, source & specversion. Event should look like:

struct Event {
    attribute: Attribute,
    data: Data
}

Extensions could be represented as https://github.com/kichristensen/rust-cloudevents/blob/master/cloudevents/src/v1_0/event.rs#L32

Accessors to read and write payload could be implemented like https://github.com/slinkydeveloper/cloudevents-rust/blob/master/cloudevents-rust/src/event/payload.rs#L56

@slinkydeveloper slinkydeveloper self-assigned this Feb 24, 2020
pranav-bhatt added a commit to pranav-bhatt/sdk-rust that referenced this issue Apr 29, 2020
pranav-bhatt added a commit to pranav-bhatt/sdk-rust that referenced this issue Apr 30, 2020
pranav-bhatt added a commit to pranav-bhatt/sdk-rust that referenced this issue Jun 4, 2020
Signed-off-by: Pranav Bhatt <adpranavb2000@gmail.com>
slinkydeveloper pushed a commit that referenced this issue Jun 5, 2020
* exposed iterator via enum

Signed-off-by: Pranav Bhatt <adpranavb2000@gmail.com>

* exposed iterator

Signed-off-by: Pranav Bhatt <adpranavb2000@gmail.com>

* exposed iterator(finalise#1)

Signed-off-by: Pranav Bhatt <adpranavb2000@gmail.com>

* resolving pull request issues #1

Signed-off-by: Pranav Bhatt <adpranavb2000@gmail.com>

* resolving pull request issues #2

Signed-off-by: Pranav Bhatt <adpranavb2000@gmail.com>

* resolving pull request issues #3

Signed-off-by: Pranav Bhatt <adpranavb2000@gmail.com>

* Copy trait issue

Signed-off-by: Pranav Bhatt <adpranavb2000@gmail.com>

* Attributes Iterator finalise #2

Signed-off-by: Pranav Bhatt <adpranavb2000@gmail.com>

* Attributes Iterator finalise #3

Signed-off-by: Pranav Bhatt <adpranavb2000@gmail.com>

* Attributes Iterator finalise #4

Signed-off-by: Pranav Bhatt <adpranavb2000@gmail.com>

* Attributes Iterator finalise #5

Signed-off-by: Pranav Bhatt <adpranavb2000@gmail.com>
pranav-bhatt added a commit to pranav-bhatt/sdk-rust that referenced this issue Oct 13, 2020
Signed-off-by: adpranavb2000@gmail.com <adpranavb2000@gmail.com>
pranav-bhatt added a commit to pranav-bhatt/sdk-rust that referenced this issue Oct 28, 2020
Signed-off-by: adpranavb2000@gmail.com <adpranavb2000@gmail.com>
pranav-bhatt added a commit to pranav-bhatt/sdk-rust that referenced this issue Nov 7, 2020
Signed-off-by: adpranavb2000@gmail.com <adpranavb2000@gmail.com>
pranav-bhatt added a commit to pranav-bhatt/sdk-rust that referenced this issue Jan 4, 2021
Signed-off-by: adpranavb2000@gmail.com <adpranavb2000@gmail.com>
pranav-bhatt added a commit to pranav-bhatt/sdk-rust that referenced this issue Jan 26, 2021
Signed-off-by: adpranavb2000@gmail.com <adpranavb2000@gmail.com>
pranav-bhatt added a commit to pranav-bhatt/sdk-rust that referenced this issue Jan 26, 2021
Signed-off-by: adpranavb2000@gmail.com <adpranavb2000@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant