Skip to content

Commit

Permalink
feat(compass): add filter to get all types (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
mabdh authored Jun 18, 2022
1 parent 4658a5f commit 6562958
Showing 1 changed file with 29 additions and 13 deletions.
42 changes: 29 additions & 13 deletions odpf/compass/v1beta1/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ service CompassService {
};
}


// Domain: Asset
rpc SearchAssets(SearchAssetsRequest) returns (SearchAssetsResponse) {
option (google.api.http) = {
Expand All @@ -215,7 +214,6 @@ service CompassService {
};
}


rpc SuggestAssets(SuggestAssetsRequest) returns (SuggestAssetsResponse) {
option (google.api.http) = {
get: "/v1beta1/search/suggest"
Expand All @@ -231,7 +229,6 @@ service CompassService {
};
}


rpc GetGraph(GetGraphRequest) returns (GetGraphResponse) {
option (google.api.http) = {
get: "/v1beta1/lineage/{urn=**}"
Expand All @@ -247,7 +244,6 @@ service CompassService {
};
}


rpc GetAllTypes(GetAllTypesRequest) returns (GetAllTypesResponse) {
option (google.api.http) = {
get: "/v1beta1/types"
Expand All @@ -262,7 +258,6 @@ service CompassService {
};
}


rpc GetAllAssets(GetAllAssetsRequest) returns (GetAllAssetsResponse) {
option (google.api.http) = {
get: "/v1beta1/assets"
Expand All @@ -277,7 +272,6 @@ service CompassService {
};
}


rpc GetAssetByID(GetAssetByIDRequest) returns (GetAssetByIDResponse) {
option (google.api.http) = {
get: "/v1beta1/assets/{id}"
Expand All @@ -292,7 +286,6 @@ service CompassService {
};
}


rpc UpsertPatchAsset(UpsertPatchAssetRequest) returns (UpsertPatchAssetResponse) {
option (google.api.http) = {
patch: "/v1beta1/assets"
Expand All @@ -308,7 +301,6 @@ service CompassService {
};
}


rpc DeleteAsset(DeleteAssetRequest) returns (DeleteAssetResponse) {
option (google.api.http) = {
delete: "/v1beta1/assets/{id}"
Expand All @@ -323,7 +315,6 @@ service CompassService {
};
}


rpc GetAssetStargazers(GetAssetStargazersRequest) returns (GetAssetStargazersResponse) {
option (google.api.http) = {
get: "/v1beta1/assets/{id}/stargazers"
Expand All @@ -338,7 +329,6 @@ service CompassService {
};
}


rpc GetAssetVersionHistory(GetAssetVersionHistoryRequest) returns (GetAssetVersionHistoryResponse) {
option (google.api.http) = {
get: "/v1beta1/assets/{id}/versions"
Expand All @@ -353,7 +343,6 @@ service CompassService {
};
}


rpc GetAssetByVersion(GetAssetByVersionRequest) returns (GetAssetByVersionResponse) {
option (google.api.http) = {
get: "/v1beta1/assets/{id}/versions/{version}"
Expand All @@ -368,7 +357,6 @@ service CompassService {
};
}


// Domain: User * Star
rpc GetUserStarredAssets(GetUserStarredAssetsRequest) returns (GetUserStarredAssetsResponse) {
option (google.api.http) = {
Expand Down Expand Up @@ -804,7 +792,35 @@ message GetGraphResponse {
repeated LineageEdge data = 1;
}

message GetAllTypesRequest {}
message GetAllTypesRequest {
string q = 1 [
(validate.rules).string.ignore_empty = true,
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "filter by specific query"
}
];
string q_fields = 2 [
(validate.rules).string.ignore_empty = true,
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "filter by multiple query fields"
}
];
string types = 3 [
(validate.rules).string.ignore_empty = true,
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "filter by multiple types"
}
];
string services = 4 [
(validate.rules).string.ignore_empty = true,
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "filter by multiple services"
}
];
map<string, string> data = 5 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "query result based on a (nested) field of the data asset. the nested field is written with period separated field name. eg, \"data[name.entity]\""
}];
}

message GetAllTypesResponse {
repeated Type data = 1;
Expand Down

0 comments on commit 6562958

Please sign in to comment.