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

feat(kay): add cluster and topic apis #177

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions odpf/assets/common/v1beta1/event.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ syntax = "proto3";

package odpf.assets.common.v1beta1;

option java_package = "io.odpf.assets.common";
option java_outer_classname = "EventProto";
option go_package = "github.com/odpf/proton/assets/common/v1beta1;commonv1beta1";

import "google/protobuf/timestamp.proto";

option go_package = "github.com/odpf/proton/assets/common/v1beta1;commonv1beta1";
option java_outer_classname = "EventProto";
option java_package = "io.odpf.assets.common";

// Event represents an event in the system.
// Event is majorly used to represent the state of the system in the form of events.
// It can be used in any schema which intend to produce events to message bus.
message Event {
// The timestamp of the event.
// Example: `2018-01-01T00:00:00Z`.
google.protobuf.Timestamp timestamp = 1;
// The activity that created the event.

// The activity that created the event.
// Example: `create`, `update`.
string action = 2;

Expand Down
11 changes: 5 additions & 6 deletions odpf/assets/common/v1beta1/resource.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ syntax = "proto3";

package odpf.assets.common.v1beta1;

option java_package = "io.odpf.assets.common";
option java_outer_classname = "ResourceProto";
option go_package = "github.com/odpf/proton/assets/common/v1beta1;commonv1beta1";

option java_outer_classname = "ResourceProto";
option java_package = "io.odpf.assets.common";

// Resource is a generic resource that represents a file or other resource.
// It can be a table, job, user or group.
message Resource {
// The unique identifier of the resource.
// The unique identifier of the resource.
// Example: `user:jdoe` or `group:accounting`.
string urn = 1;

Expand All @@ -26,11 +25,11 @@ message Resource {
// Example: `user` or `group`.
string type = 4;

// The REST URL for accessing the resource. URL returns the resource itself.
// The REST URL for accessing the resource. URL returns the resource itself.
// Example: `https://xyz.com/v1/users/user-123`
string url = 5;

// The description of the resource.
// The description of the resource.
// Example: `This resource is being used for storing important number`
string description = 6;
}
10 changes: 5 additions & 5 deletions odpf/assets/common/v1beta1/timestamp.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ syntax = "proto3";

package odpf.assets.common.v1beta1;

option java_package = "io.odpf.assets.common";
option java_outer_classname = "TimestampProto";
option go_package = "github.com/odpf/proton/assets/common/v1beta1;commonv1beta1";

import "google/protobuf/timestamp.proto";

option go_package = "github.com/odpf/proton/assets/common/v1beta1;commonv1beta1";
option java_outer_classname = "TimestampProto";
option java_package = "io.odpf.assets.common";

// Timestamp represents created and modified timestamps.
message Timestamp {
// The timestamp when the object was created.
Expand All @@ -25,4 +25,4 @@ message TimeWindow {
// End time of the time window (inclusive). If not specified, the current
// timestamp is used instead.
google.protobuf.Timestamp end_time = 2;
}
}
8 changes: 4 additions & 4 deletions odpf/assets/facets/v1beta1/lineage.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ syntax = "proto3";

package odpf.assets.facets.v1beta1;

option java_package = "io.odpf.assets.facets";
option java_outer_classname = "LineageProto";
option go_package = "github.com/odpf/proton/assets/facets/v1beta1;facetsv1beta1";

import "odpf/assets/common/v1beta1/resource.proto";

option go_package = "github.com/odpf/proton/assets/facets/v1beta1;facetsv1beta1";
option java_outer_classname = "LineageProto";
option java_package = "io.odpf.assets.facets";

// Linage reprsents the relationship of resource to other resources.
// Relation is way of describing the relationship between two resources.
message Lineage {
Expand Down
8 changes: 4 additions & 4 deletions odpf/assets/facets/v1beta1/ownership.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ syntax = "proto3";

package odpf.assets.facets.v1beta1;

option java_package = "io.odpf.assets.facets";
option java_outer_classname = "OwnershipProto";
option go_package = "github.com/odpf/proton/assets/facets/v1beta1;facetsv1beta1";
option java_outer_classname = "OwnershipProto";
option java_package = "io.odpf.assets.facets";

// Ownership is a facet that describes the ownership of a resource.
message Ownership {
Expand All @@ -22,12 +22,12 @@ message Owner {
// The name of the owner.
// Example: `John Doe`.
string name = 2;

// The role of the owner.
// Example: `admin`, `steward`.
string role = 3;

// The email of the owner.
// Example: `[email protected]`
string email = 4;
}
}
10 changes: 5 additions & 5 deletions odpf/assets/facets/v1beta1/preview.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ syntax = "proto3";

package odpf.assets.facets.v1beta1;

option java_package = "io.odpf.assets.facets";
option java_outer_classname = "PreviewProto";
option go_package = "github.com/odpf/proton/assets/facets/v1beta1;facetsv1beta1";

import "google/protobuf/struct.proto";

option go_package = "github.com/odpf/proton/assets/facets/v1beta1;facetsv1beta1";
option java_outer_classname = "PreviewProto";
option java_package = "io.odpf.assets.facets";

// Preview contains samples of the metadata.
message Preview {
// fields is a list of fields.
repeated string fields = 1;

// rows is a multidimensional array containing
// rows is a multidimensional array containing
// Optional: List of properties the user has.
google.protobuf.ListValue rows = 2;
}
14 changes: 6 additions & 8 deletions odpf/assets/facets/v1beta1/properties.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,19 @@ syntax = "proto3";

package odpf.assets.facets.v1beta1;

option java_package = "io.odpf.assets.facets";
option java_outer_classname = "PropertiesProto";
option go_package = "github.com/odpf/proton/assets/facets/v1beta1;facetsv1beta1";

import "google/protobuf/struct.proto";

message Properties {
option go_package = "github.com/odpf/proton/assets/facets/v1beta1;facetsv1beta1";
option java_outer_classname = "PropertiesProto";
option java_package = "io.odpf.assets.facets";

message Properties {
// Optional: List of tags the user has.
repeated string tags = 1;

//Optional. List of labels the user has.
map<string,string> labels = 2;
map<string, string> labels = 2;

// Optional: List of properties the user has.
google.protobuf.Struct attributes = 3;

}
}
9 changes: 4 additions & 5 deletions odpf/assets/facets/v1beta1/schema.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ syntax = "proto3";

package odpf.assets.facets.v1beta1;

option java_package = "io.odpf.assets.facets";
option java_outer_classname = "SchemaProto";
option go_package = "github.com/odpf/proton/assets/facets/v1beta1;facetsv1beta1";


import "odpf/assets/facets/v1beta1/properties.proto";

option go_package = "github.com/odpf/proton/assets/facets/v1beta1;facetsv1beta1";
option java_outer_classname = "SchemaProto";
option java_package = "io.odpf.assets.facets";

// Columns represents a list of columns.
// It is facet used to specify the schema of a table or a file.
message Columns {
Expand Down
17 changes: 7 additions & 10 deletions odpf/assets/v1beta1/bucket.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,16 @@ syntax = "proto3";

package odpf.assets.v1beta1;

option java_package = "io.odpf.assets";
option java_outer_classname = "BucketProto";
option go_package = "github.com/odpf/proton/assets/v1beta1;assetsv1beta1";

import "google/protobuf/timestamp.proto";

import "odpf/assets/common/v1beta1/event.proto";
import "odpf/assets/common/v1beta1/resource.proto";
import "odpf/assets/common/v1beta1/timestamp.proto";
import "odpf/assets/facets/v1beta1/ownership.proto";
import "odpf/assets/facets/v1beta1/properties.proto";

import "odpf/assets/common/v1beta1/resource.proto";
import "odpf/assets/common/v1beta1/timestamp.proto";
import "odpf/assets/common/v1beta1/event.proto";
option go_package = "github.com/odpf/proton/assets/v1beta1;assetsv1beta1";
option java_outer_classname = "BucketProto";
option java_package = "io.odpf.assets";

message Bucket {
// Representation of the resource
Expand Down Expand Up @@ -49,7 +47,6 @@ message Bucket {
// The timestamp of the generated event.
// Event schemas is defined in the common event schema.
odpf.assets.common.v1beta1.Event event = 100;

}

message Blob {
Expand Down Expand Up @@ -86,4 +83,4 @@ message Blob {
// The timestamp of the blob's creation.
// Timstamp facet can be used to set the creation and updation timestamp of a blob.
odpf.assets.common.v1beta1.Timestamp timestamps = 33;
}
}
19 changes: 8 additions & 11 deletions odpf/assets/v1beta1/dashboard.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,20 @@ syntax = "proto3";

package odpf.assets.v1beta1;

option java_package = "io.odpf.assets";
option java_outer_classname = "DashboardProto";
option go_package = "github.com/odpf/proton/assets/v1beta1;assetsv1beta1";

import "odpf/assets/facets/v1beta1/ownership.proto";
import "odpf/assets/common/v1beta1/event.proto";
import "odpf/assets/common/v1beta1/resource.proto";
import "odpf/assets/common/v1beta1/timestamp.proto";
import "odpf/assets/facets/v1beta1/lineage.proto";
import "odpf/assets/facets/v1beta1/ownership.proto";
import "odpf/assets/facets/v1beta1/properties.proto";

import "odpf/assets/common/v1beta1/resource.proto";
import "odpf/assets/common/v1beta1/timestamp.proto";
import "odpf/assets/common/v1beta1/event.proto";
option go_package = "github.com/odpf/proton/assets/v1beta1;assetsv1beta1";
option java_outer_classname = "DashboardProto";
option java_package = "io.odpf.assets";

// Dashboard is a resource that represents a dashboard.
message Dashboard {
// Representation of the resource
// Representation of the resource
odpf.assets.common.v1beta1.Resource resource = 1;

// The list of the charts in the dashboard.
Expand All @@ -42,7 +41,6 @@ message Dashboard {
// The timestamp of the generated event.
// Event schemas is defined in the common event schema.
odpf.assets.common.v1beta1.Event event = 100;

}

message Chart {
Expand Down Expand Up @@ -105,5 +103,4 @@ message Chart {
// The timestamp of the generated event.
// Event schemas is defined in the common event schema.
odpf.assets.common.v1beta1.Event event = 100;

}
14 changes: 6 additions & 8 deletions odpf/assets/v1beta1/group.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@ syntax = "proto3";

package odpf.assets.v1beta1;

option java_package = "io.odpf.assets";
option java_outer_classname = "GroupProto";
option go_package = "github.com/odpf/proton/assets/v1beta1;assetsv1beta1";


import "odpf/assets/common/v1beta1/timestamp.proto";
import "odpf/assets/common/v1beta1/event.proto";
import "odpf/assets/common/v1beta1/resource.proto";

import "odpf/assets/common/v1beta1/timestamp.proto";
import "odpf/assets/facets/v1beta1/properties.proto";

option go_package = "github.com/odpf/proton/assets/v1beta1;assetsv1beta1";
option java_outer_classname = "GroupProto";
option java_package = "io.odpf.assets";

// Group represents a group of users and resources.
message Group {
// Representation of the resource
Expand Down Expand Up @@ -47,4 +45,4 @@ message Member {
// The role of the user.
// Example: `owner`.
string role = 2;
}
}
17 changes: 8 additions & 9 deletions odpf/assets/v1beta1/job.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@ syntax = "proto3";

package odpf.assets.v1beta1;

option java_package = "io.odpf.assets";
option java_outer_classname = "JobProto";
option go_package = "github.com/odpf/proton/assets/v1beta1;assetsv1beta1";

import "odpf/assets/facets/v1beta1/ownership.proto";
import "odpf/assets/common/v1beta1/event.proto";
import "odpf/assets/common/v1beta1/resource.proto";
import "odpf/assets/common/v1beta1/timestamp.proto";
import "odpf/assets/facets/v1beta1/lineage.proto";
import "odpf/assets/facets/v1beta1/ownership.proto";
import "odpf/assets/facets/v1beta1/properties.proto";

import "odpf/assets/common/v1beta1/resource.proto";
import "odpf/assets/common/v1beta1/timestamp.proto";
import "odpf/assets/common/v1beta1/event.proto";
option go_package = "github.com/odpf/proton/assets/v1beta1;assetsv1beta1";
option java_outer_classname = "JobProto";
option java_package = "io.odpf.assets";

// Job is a resource that represents a job.
message Job {
Expand All @@ -38,4 +37,4 @@ message Job {
// The timestamp of the generated event.
// Event schemas is defined in the common event schema.
odpf.assets.common.v1beta1.Event event = 100;
}
}
23 changes: 11 additions & 12 deletions odpf/assets/v1beta1/table.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,18 @@ syntax = "proto3";

package odpf.assets.v1beta1;

option java_package = "io.odpf.assets";
option java_outer_classname = "TableProto";
option go_package = "github.com/odpf/proton/assets/v1beta1;assetsv1beta1";

import "odpf/assets/facets/v1beta1/schema.proto";
import "odpf/assets/facets/v1beta1/preview.proto";
import "odpf/assets/facets/v1beta1/ownership.proto";
import "odpf/assets/common/v1beta1/event.proto";
import "odpf/assets/common/v1beta1/resource.proto";
import "odpf/assets/common/v1beta1/timestamp.proto";
import "odpf/assets/facets/v1beta1/lineage.proto";
import "odpf/assets/facets/v1beta1/ownership.proto";
import "odpf/assets/facets/v1beta1/preview.proto";
import "odpf/assets/facets/v1beta1/properties.proto";
import "odpf/assets/facets/v1beta1/schema.proto";

import "odpf/assets/common/v1beta1/resource.proto";
import "odpf/assets/common/v1beta1/timestamp.proto";
import "odpf/assets/common/v1beta1/event.proto";
option go_package = "github.com/odpf/proton/assets/v1beta1;assetsv1beta1";
option java_outer_classname = "TableProto";
option java_package = "io.odpf.assets";

// Table is a table in a database.
// It can be a file, a table, a view, a materialized view, a temporary table, or a virtual table.
Expand Down Expand Up @@ -69,7 +68,7 @@ message TableProfile {

// The number of how many times table is being used
int64 usage_count = 4;

// The information of `join` applied to the table
repeated Join joins = 5;

Expand All @@ -86,4 +85,4 @@ message Join {

// The information of `join conditions` applied to the table
repeated string conditions = 3;
}
}
Loading