Skip to content

Commit

Permalink
refactor(entropy): remove resource.id field and make urn the only uni…
Browse files Browse the repository at this point in the history
…que identifier needed in requests

Co-authored-by: Abhishek <abhi.sah.97@gmail.com>
  • Loading branch information
rohilsurana and whoAbhishekSah committed Jan 20, 2022
1 parent 31aade5 commit 27b65e3
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions odpf/entropy/v1beta1/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package odpf.entropy.v1beta1;
import "google/api/annotations.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";

option go_package = "github.com/odpf/proton/entropy/v1beta1;entropyv1beta1";
option java_multiple_files = true;
Expand All @@ -15,7 +16,7 @@ option java_outer_classname = "EntropyServiceProto";
service ResourceService {
rpc ListResources(ListResourcesRequest) returns (ListResourcesResponse) {
option (google.api.http) = {
get: "/v1beta1/resources/"
get: "/v1beta1/resources"
};
}

Expand Down Expand Up @@ -47,14 +48,15 @@ service ResourceService {
}

message Resource {
string id = 1;
string urn = 2;
string name = 3;
string parent = 4;
string kind = 5;
google.protobuf.Value configs = 6;
string urn = 1;
string name = 2;
string parent = 3;
string kind = 4;
google.protobuf.Value configs = 5;
map<string, string> labels = 6;
string status = 7;
map<string, string> labels = 8;
google.protobuf.Timestamp created_at = 8;
google.protobuf.Timestamp updated_at = 9;
}

message ListResourcesRequest {
Expand All @@ -68,19 +70,18 @@ message ListResourcesResponse {

message GetResourceRequest {
string urn = 1;
string kind = 2;
}

message GetResourceResponse {
Resource resource = 1;
}

message CreateResourceRequest {
Resource resource = 3;
Resource resource = 1;
}

message CreateResourceResponse {
Resource resource = 3;
Resource resource = 1;
}

message UpdateResourceRequest {
Expand All @@ -94,7 +95,6 @@ message UpdateResourceResponse {

message DeleteResourceRequest {
string urn = 1;
string kind = 2;
}

message DeleteResourceResponse {}

0 comments on commit 27b65e3

Please sign in to comment.