servis

Discover and publish VIS APIs

View readme on GitLab

registry.proto

syntax = "proto3";
package servis;

service Registry {
  // To call RPCs marked "requires key", you must path an "authorization" header in metadata

  rpc SubmitLatestVersion(ServiceDefinition) returns (Empty); // requires key
  rpc GetLatestVersion(GetLatestVersionRequest) returns (ServiceDefinition);

  // CLI clients call this and display the returned message
  // This lets us notify users that they have an outdated version of the CLI
  rpc GetCLINotification(CLINotificationRequest) returns (CLINotificationResponse);
}

message Empty {}

message GetLatestVersionRequest {
  string service_name = 1;
}

message ServiceDefinition {
  string name = 1;
  string description = 4;
  string gitlab_page = 3;
  map<string, string> protos = 2;
}

message CLINotificationRequest {
  int32 cli_version = 1;
}

message CLINotificationResponse {
  string message = 1;
  bool fatal = 2; // prevent the CLI from running, to draw attention
}