syntax = "proto3";

package kubes;

service KubesService {
  rpc ListDeployments(ListDeploymentsRequest) returns (ListDeploymentsResponse);
  rpc NewDeployment(NewDeploymentRequest) returns (NewDeploymentResponse);
  rpc DeleteDeployment(DeleteDeploymentRequest) returns (DeleteDeploymentResponse);
}

message DeleteDeploymentRequest {
  string name = 1;
  string domain_name = 2;
}

message DeleteDeploymentResponse {
}

message ListDeploymentsRequest {
  string namespace = 1;
}

message ListDeploymentsResponse {
  repeated Deployment deployments = 1;
}

message NewDeploymentRequest {
  string name = 1;
  string domain_name = 2;
}

message NewDeploymentResponse {
  Deployment deployment = 1;
}

message Deployment {
  string name = 1;
  string namespace = 2;
  string image = 3;
  int32 replicas = 4;
  string status = 5;
  string id = 6;
}
