Skip to content

Commit

Permalink
feat(optimus): add get project proto & get namespace proto (#117)
Browse files Browse the repository at this point in the history
* feat: get project by project_name

* feat: get namespace by project_name and namespace_name
  • Loading branch information
deryrahman authored Apr 14, 2022
1 parent 712a5a1 commit 0e3ef79
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
16 changes: 16 additions & 0 deletions odpf/optimus/core/v1beta1/namespace.proto
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ service NamespaceService {
get: "/v1beta1/project/{project_name}/namespace"
};
}

// GetNamespace returns namespace details based on project_name and namespace_name
rpc GetNamespace(GetNamespaceRequest) returns(GetNamespaceResponse) {
option (google.api.http) = {
get: "/v1beta1/project/{project_name}/namespace/{namespace_name}"
};
}
}

message RegisterProjectNamespaceRequest {
Expand All @@ -57,6 +64,15 @@ message ListProjectNamespacesResponse {
repeated NamespaceSpecification namespaces = 1;
}

message GetNamespaceRequest {
string project_name = 1;
string namespace_name = 2;
}

message GetNamespaceResponse {
NamespaceSpecification namespace = 1;
}

message NamespaceSpecification {
string name = 1;
map<string, string> config = 2;
Expand Down
14 changes: 14 additions & 0 deletions odpf/optimus/core/v1beta1/project.proto
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ service ProjectService {
get: "/v1beta1/project"
};
}
// GetProject returns project details based on project_name
rpc GetProject(GetProjectRequest) returns (GetProjectResponse) {
option (google.api.http) = {
get: "/v1beta1/project/{project_name}"
};
}
}

message RegisterProjectRequest {
Expand All @@ -55,6 +61,14 @@ message ListProjectsResponse {
repeated ProjectSpecification projects = 1;
}

message GetProjectRequest {
string project_name = 1;
}

message GetProjectResponse {
ProjectSpecification project = 1;
}

message ProjectSpecification {
string name = 1;
map<string, string> config = 2;
Expand Down

0 comments on commit 0e3ef79

Please sign in to comment.