Skip to content
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

Updated funnel schemas #4

Merged
merged 3 commits into from
Jul 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 6 additions & 11 deletions buda/entities/funnel.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,13 @@ syntax = "proto3";

package buda.entities;

import "buda/entities/uuid.proto";
import "google/protobuf/timestamp.proto";

message FunnelEvent {
string id = 1;
string user_id = 2;
message Funnel {
Uuid id = 1;
Uuid user_id = 2;
google.protobuf.Timestamp created_at = 3;
string funnel_id = 4;
string funnel_event_id = 5;
repeated FunnelTag tags = 6;
}

message FunnelTag {
string key = 1;
string value = 2;
string name = 4;
map<string, string> tags = 5;
}
18 changes: 18 additions & 0 deletions buda/entities/funnel_event.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
syntax = "proto3";

package buda.entities;

import "buda/entities/uuid.proto";
import "buda/entities/link.proto";
import "google/protobuf/timestamp.proto";

message FunnelEvent {
Uuid id = 1;
Uuid funnel_id = 2;
Uuid funnel_step_id = 3;
Uuid user_id = 4;
google.protobuf.Timestamp created_at = 5;
map<string, string> tags = 6;
bool funnel_end = 16;
repeated Link links = 17;
}
10 changes: 10 additions & 0 deletions buda/entities/link.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
syntax = "proto3";

package buda.entities;

import "buda/entities/uuid.proto";

message Link {
Copy link
Contributor

Choose a reason for hiding this comment

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

Curious if you see Link being used in other entities? Thinking it could be moved inside funnel_event.proto if not! 😊

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@davidgasquez Yeah, was kind of on the fence on that, but I thought 'maybe' it could be used by other entities. Reflecting on it now, I'm thinking perhaps I should stick to the current use case!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@davidgasquez still can't make up my mind on this one :D Maybe I could keep things as is (still want to validate if the whole Links idea is worth it) and come back to it later (before we go 'live')

string target = 1;
Uuid target_id = 2;
}
7 changes: 7 additions & 0 deletions buda/entities/uuid.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
syntax = "proto3";

package buda.entities;

message Uuid {
string id = 1;
}
2 changes: 2 additions & 0 deletions buda/services/events_collector.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ syntax = "proto3";
package buda.services;

import "buda/entities/funnel.proto";
import "buda/entities/funnel_event.proto";

service EventsCollector {
rpc CollectFunnel (buda.entities.Funnel) returns (Response) {}
rpc CollectFunnelEvent (buda.entities.FunnelEvent) returns (Response) {}
}

Expand Down