mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-11 19:04:35 +00:00
* app deployment * add source to deployment * support without https prefix * add image * minor comment * fix deploy * further fixes * fix the error output * add account name * set limits * fix error handling * fix app handler * fix unmarshalling * remove http2 * set status * fix bug * . * add ability to specify branch * . * . * add better error handling * add app limit * add function limit * update app readme * log status error * update app to use the store * remove double e limit * switch to created/updated * update app handler * 5 bucks * 10 bucks * unique deployments * fix the sid * unique name handling * allow running where reservation expired * check for reservations * update readme * fix update check * update proto comment * add resolve endpoint * ship with domain * fix url * create unprivileged service account * add service account to update * . * . * update comment * . * update public api json
146 lines
2.7 KiB
Protocol Buffer
146 lines
2.7 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package app;
|
|
|
|
option go_package = "./proto;app";
|
|
|
|
service App {
|
|
rpc Reserve(ReserveRequest) returns (ReserveResponse) {}
|
|
rpc Regions(RegionsRequest) returns (RegionsResponse) {}
|
|
rpc Run(RunRequest) returns (RunResponse) {}
|
|
rpc Update(UpdateRequest) returns (UpdateResponse) {}
|
|
rpc Delete(DeleteRequest) returns (DeleteResponse) {}
|
|
rpc Status(StatusRequest) returns (StatusResponse) {}
|
|
rpc List(ListRequest) returns (ListResponse) {}
|
|
rpc Resolve(ResolveRequest) returns (ResolveResponse) {}
|
|
}
|
|
|
|
message Service {
|
|
// unique id
|
|
string id = 1;
|
|
// name of the app
|
|
string name = 2;
|
|
// source repository
|
|
string repo = 3;
|
|
// branch of code
|
|
string branch = 4;
|
|
// region running in
|
|
string region = 5;
|
|
// port running on
|
|
int32 port = 6;
|
|
// status of the app
|
|
string status = 7;
|
|
// app url
|
|
string url = 8;
|
|
// time of creation
|
|
string created = 9;
|
|
// last updated
|
|
string updated = 10;
|
|
// associated env vars
|
|
map<string,string> env_vars = 11;
|
|
// custom domains
|
|
repeated string custom_domains = 12;
|
|
}
|
|
|
|
// Delete an app
|
|
message DeleteRequest {
|
|
// name of the app
|
|
string name = 1;
|
|
}
|
|
|
|
message DeleteResponse {}
|
|
|
|
// List all the apps
|
|
message ListRequest {
|
|
}
|
|
|
|
message ListResponse {
|
|
// all the apps
|
|
repeated Service services = 1;
|
|
}
|
|
|
|
// Run an app
|
|
message RunRequest {
|
|
// name of the app
|
|
string name = 1;
|
|
// source repository
|
|
string repo = 2;
|
|
// branch. defaults to master
|
|
string branch = 3;
|
|
// region to run in
|
|
string region = 4;
|
|
// port to run on
|
|
int32 port = 5;
|
|
// associatede env vars to pass in
|
|
map<string,string> env_vars = 6;
|
|
}
|
|
|
|
message RunResponse {
|
|
// The running service
|
|
Service service = 1;
|
|
}
|
|
|
|
// Update the app
|
|
message UpdateRequest {
|
|
// name of the app
|
|
string name = 1;
|
|
}
|
|
|
|
message UpdateResponse {
|
|
}
|
|
|
|
|
|
// Return the support regions
|
|
message RegionsRequest {}
|
|
|
|
message RegionsResponse {
|
|
repeated string regions = 1;
|
|
}
|
|
|
|
// Reservation represents a reserved app instance
|
|
message Reservation {
|
|
// name of the app
|
|
string name = 1;
|
|
// owner id
|
|
string owner = 2;
|
|
// associated token
|
|
string token = 3;
|
|
// time of reservation
|
|
string created = 4;
|
|
// time reservation expires
|
|
string expires = 5;
|
|
}
|
|
|
|
// Reserve apps beyond the free quota. Call Run after.
|
|
message ReserveRequest {
|
|
// name of your app e.g helloworld
|
|
string name = 1;
|
|
}
|
|
|
|
message ReserveResponse {
|
|
// The app reservation
|
|
Reservation reservation = 1;
|
|
}
|
|
|
|
// Get the status of an app
|
|
message StatusRequest {
|
|
// name of the app
|
|
string name = 1;
|
|
}
|
|
|
|
message StatusResponse {
|
|
// running service info
|
|
Service service = 1;
|
|
}
|
|
|
|
// Resolve an app by id to its raw backend endpoint
|
|
message ResolveRequest {
|
|
// the service id
|
|
string id = 1;
|
|
}
|
|
|
|
message ResolveResponse {
|
|
// the end provider url
|
|
string url = 1;
|
|
}
|