fix: query side (#257)

* fix: project by id return projectview

* fix: return always view model on query side

* fix: return always view model on query side
This commit is contained in:
Fabi
2020-06-23 07:06:07 +02:00
committed by GitHub
parent 6556d053b2
commit 1de574df42
15 changed files with 3621 additions and 3438 deletions

View File

@@ -485,7 +485,7 @@ service ManagementService {
}
//ORG
rpc GetOrgByID(OrgID) returns (Org) {
rpc GetOrgByID(OrgID) returns (OrgView) {
option (google.api.http) = {
get: "/orgs/{id}"
};
@@ -495,7 +495,7 @@ service ManagementService {
};
}
rpc GetOrgByDomainGlobal(OrgDomain) returns (Org) {
rpc GetOrgByDomainGlobal(OrgDomain) returns (OrgView) {
option (google.api.http) = {
get: "/global/orgs/domain/{domain}"
};
@@ -527,7 +527,6 @@ service ManagementService {
};
}
rpc SearchMyOrgDomains(OrgDomainSearchRequest) returns (OrgDomainSearchResponse) {
option (google.api.http) = {
post: "/orgs/me/domains/_search"
@@ -637,7 +636,7 @@ service ManagementService {
};
}
rpc ProjectByID(ProjectID) returns (Project) {
rpc ProjectByID(ProjectID) returns (ProjectView) {
option (google.api.http) = {
get: "/projects/{id}"
};
@@ -850,7 +849,7 @@ service ManagementService {
};
}
rpc ApplicationByID(ApplicationID) returns (Application) {
rpc ApplicationByID(ApplicationID) returns (ApplicationView) {
option (google.api.http) = {
get: "/projects/{project_id}/applications/{id}"
};
@@ -957,7 +956,7 @@ service ManagementService {
};
}
rpc ProjectGrantByID(ProjectGrantID) returns (ProjectGrant) {
rpc ProjectGrantByID(ProjectGrantID) returns (ProjectGrantView) {
option (google.api.http) = {
get: "/projects/{project_id}/grants/{id}"
};
@@ -1086,7 +1085,7 @@ service ManagementService {
};
}
rpc UserGrantByID(UserGrantID) returns (UserGrant) {
rpc UserGrantByID(UserGrantID) returns (UserGrantView) {
option (google.api.http) = {
get: "/users/{user_id}/grants/{id}"
};
@@ -1196,7 +1195,7 @@ service ManagementService {
};
}
rpc ProjectUserGrantByID(ProjectUserGrantID) returns (UserGrant) {
rpc ProjectUserGrantByID(ProjectUserGrantID) returns (UserGrantView) {
option (google.api.http) = {
get: "/projects/{project_id}/users/{user_id}/grants/{id}"
};
@@ -1267,7 +1266,7 @@ service ManagementService {
};
}
rpc ProjectGrantUserGrantByID(ProjectGrantUserGrantID) returns (UserGrant) {
rpc ProjectGrantUserGrantByID(ProjectGrantUserGrantID) returns (UserGrantView) {
option (google.api.http) = {
get: "/projectgrants/{project_grant_id}/users/{user_id}/grants/{id}"
};
@@ -1812,6 +1811,15 @@ message Org {
uint64 sequence = 6;
}
message OrgView {
string id = 1;
OrgState state = 2;
google.protobuf.Timestamp creation_date = 3;
google.protobuf.Timestamp change_date = 4;
string name = 5;
uint64 sequence = 6;
}
enum OrgState {
ORGSTATE_UNSPECIFIED = 0;
ORGSTATE_ACTIVE = 1;