Skip to content
Open
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
43 changes: 42 additions & 1 deletion gotocompany/optimus/core/v1beta1/resource.proto
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@ service ResourceService {
get: "/v1beta1/project/{project_name}/resource/{resource_name}/changelog"
};
}

// ValidateResource validates whether the resource specifications are valid
rpc ValidateResource(ValidateResourceRequest) returns (ValidateResourceResponse) {
option (google.api.http) = {
post: "/v1beta1/project/{project_name}/namespace/{namespace_name}/datastore/{datastore_name}/resource/validate"
body: "*"
};
}
}

message DeployResourceSpecificationRequest {
Expand Down Expand Up @@ -265,4 +273,37 @@ message ResourceChangelog {

message GetResourceChangelogsResponse {
repeated ResourceChangelog history = 1;
}
}

message ValidateResourceRequest {
message FromServer {
repeated string resource_names = 1;
}

message FromOutside {
repeated ResourceSpecification resources = 1;
}

string project_name = 1;
string namespace_name = 2;
string datastore_name = 3;

oneof payload {
FromServer from_server = 4;
FromOutside from_outside = 5;
}
}

message ValidateResourceResponse {
message Result {
string name = 1;
repeated string messages = 2;
bool success = 3;
}

message ResultList {
repeated Result results = 1;
}

map<string, ResultList> results_by_resource_name = 1;
}
Loading