94 lines
1.9 KiB
Protocol Buffer
94 lines
1.9 KiB
Protocol Buffer
/// This file has messages for describing applications
|
|
syntax = "proto3";
|
|
package applications;
|
|
import "google/protobuf/empty.proto";
|
|
option go_package = "git.badhouseplants.net/softplayer/softplayer-go-proto/pkg/applications";
|
|
|
|
/**
|
|
* Service for handling applications
|
|
*/
|
|
service Applications {
|
|
rpc Create(CreateOptions) returns (ApplicationFull) {}
|
|
rpc Update(UpdateOptions) returns (ApplicationFull) {}
|
|
rpc Delete(DeleteOptions) returns (google.protobuf.Empty) {}
|
|
rpc Get(GetOptions) returns (ApplicationFull) {}
|
|
rpc List(ListOptions) returns (stream ApplicationFull) {}
|
|
}
|
|
|
|
/**
|
|
User related messages
|
|
*/
|
|
|
|
message OwnerId {
|
|
string uuid = 1; // UUID of a user that is creating an environemnt
|
|
}
|
|
|
|
message Token {
|
|
string token = 1; // Token that should be used to create an environment
|
|
}
|
|
|
|
/**
|
|
Services options
|
|
*/
|
|
|
|
message CreateOptions {
|
|
ApplicationMetadata metadata = 1;
|
|
ApplicationSpec spec = 2;
|
|
OwnerId owner_id = 3;
|
|
Token token = 4;
|
|
}
|
|
|
|
message UpdateOptions {
|
|
ApplicationId id = 1;
|
|
ApplicationMetadata metadata = 2;
|
|
ApplicationSpec spec = 3;
|
|
OwnerId owner_id = 4;
|
|
Token token = 5;
|
|
}
|
|
|
|
message DeleteOptions {
|
|
ApplicationId id = 1;
|
|
ApplicationMetadata metadata = 2;
|
|
OwnerId owner_id = 3;
|
|
Token token = 4;
|
|
}
|
|
|
|
message GetOptions {
|
|
ApplicationId id = 1;
|
|
ApplicationMetadata metadata = 2;
|
|
OwnerId owner_id = 3;
|
|
Token token = 4;
|
|
}
|
|
|
|
message ListOptions {
|
|
ApplicationMetadata metadata = 1;
|
|
OwnerId owner_id = 2;
|
|
Token token = 3;
|
|
}
|
|
/**
|
|
Environment related messages
|
|
*/
|
|
|
|
message ApplicationId {
|
|
string uuid = 1;
|
|
}
|
|
|
|
message ApplicationMetadata {
|
|
string name = 1;
|
|
string description = 2;
|
|
}
|
|
|
|
message ApplicationSpec {
|
|
string application = 1;
|
|
string version = 2;
|
|
string environemnt_id = 3;
|
|
map<string, string> config = 4;
|
|
string raw_config = 5;
|
|
}
|
|
|
|
message ApplicationFull {
|
|
ApplicationMetadata metadata = 1;
|
|
ApplicationSpec spec = 2;
|
|
ApplicationId id = 3;
|
|
}
|