shuttle-proto 0.49.0

Library for all the gRPC definitions used by shuttle
Documentation
syntax = "proto3";
package provisioner;

service Provisioner {
  rpc ProvisionDatabase(DatabaseRequest) returns (DatabaseResponse);
  rpc DeleteDatabase(DatabaseRequest) returns (DatabaseDeletionResponse);
  rpc DumpDatabase(DatabaseDumpRequest) returns (DatabaseDumpResponse);
  rpc HealthCheck(Ping) returns (Pong);
}

message DatabaseRequest {
  string project_name = 1;
  oneof db_type {
    Shared Shared = 10;
    AwsRds AwsRds = 11;
  };
  // Override the default db name. Only applies to RDS.
  optional string db_name = 2;
}

message DatabaseDumpRequest {
  string project_name = 1;
}

message Shared {
  oneof engine {
    string postgres = 1;
    string mongodb = 50;
  }
}

message AwsRds {
  oneof engine {
    RdsConfig postgres = 1;
    RdsConfig mysql = 2;
    RdsConfig mariadb = 3;
  }
}

message RdsConfig {}

message DatabaseResponse {
  string username = 1;
  string password = 2;
  string database_name = 3;
  string engine = 4;
  string address_private = 5;
  string address_public = 6;
  string port = 7;
}

message DatabaseDeletionResponse {}

message DatabaseDumpResponse {
  bytes sql = 1;
}

message Ping {}
message Pong {}