Brijesh's Git Server — argus-core @ ad14ae9ef6df214964267107a8b29d85545baddb

Logging service

rpc/applications/service.proto (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
syntax = "proto3";

package applications;
option go_package = "argus-core/rpc/applications";

service ApplicationsService {
  rpc CreateApplication(CreateApplicationRequest) returns (CreateApplicationResponse);
  rpc ListApplications(ListApplicationsRequest) returns (ListApplicationsResponse);
  rpc GetApplication(GetApplicationRequest) returns (GetApplicationResponse);
  rpc UpdateApplication(UpdateApplicationRequest) returns (UpdateApplicationResponse);
  rpc DeleteApplication(DeleteApplicationRequest) returns (DeleteApplicationResponse);
  rpc RegenerateKey(RegenerateKeyRequest) returns (RegenerateKeyResponse);
}

message Application {
  string id = 1;
  string user_id = 2;
  string name = 3;
  string description = 4;
  string created_at = 5;
  string updated_at = 6;
}

message CreateApplicationRequest {
  string token = 1;
  string name = 2;
  string description = 3;
}

message CreateApplicationResponse {
  Application application = 1;
  string key = 2;  // The API key for the application
}

message ListApplicationsRequest {
  string token = 1;
}

message ListApplicationsResponse {
  repeated Application applications = 1;
}

message GetApplicationRequest {
  string token = 1;
  string application_id = 2;
}

message GetApplicationResponse {
  Application application = 1;
}

message UpdateApplicationRequest {
  string token = 1;
  string application_id = 2;
  string name = 3;
  string description = 4;
}

message UpdateApplicationResponse {
  Application application = 1;
}

message DeleteApplicationRequest {
  string token = 1;
  string application_id = 2;
}

message DeleteApplicationResponse {}

message RegenerateKeyRequest {
  string token = 1;
  string application_id = 2;
}

message RegenerateKeyResponse {
  string key = 1;  // The new API key
}