Update the env proto
This commit is contained in:
parent
1ee96fbfd5
commit
1c1bb4672b
@ -8,19 +8,66 @@ option go_package = "git.badhouseplants.net/softplayer/softplayer-go-proto/pkg/e
|
|||||||
* Service for handling environments
|
* Service for handling environments
|
||||||
*/
|
*/
|
||||||
service Environments {
|
service Environments {
|
||||||
rpc Create(EnvironmentFull) returns (EnvironmentFull) {}
|
rpc Create(CreateOptions) returns (EnvironmentFull) {}
|
||||||
rpc Update(EnvironmentFull) returns (EnvironmentFull) {}
|
rpc Update(UpdateOptions) returns (EnvironmentFull) {}
|
||||||
rpc Delete(EnvironmentFull) returns (google.protobuf.Empty) {}
|
rpc Delete(DeleteOptions) returns (google.protobuf.Empty) {}
|
||||||
rpc Get(EnvironmentName) returns (EnvironmentFull) {}
|
rpc Get(GetOptions) returns (EnvironmentFull) {}
|
||||||
rpc List(google.protobuf.Empty) returns (stream EnvironmentName) {}
|
rpc List(ListOptions) returns (stream EnvironmentFull) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a environment UUID only
|
User related messages
|
||||||
* I don't think we need it
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
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 {
|
||||||
|
EnvironmentName name = 1;
|
||||||
|
EnvironmentData data = 2;
|
||||||
|
OwnerId owner_id = 3;
|
||||||
|
Token token = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message UpdateOptions {
|
||||||
|
EnvironmentName name = 1;
|
||||||
|
EnvironmentData data = 2;
|
||||||
|
OwnerId owner_id = 3;
|
||||||
|
Token token = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DeleteOptions {
|
||||||
|
EnvironmentName name = 1;
|
||||||
|
OwnerId owner_id = 3;
|
||||||
|
Token token = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetOptions {
|
||||||
|
EnvironmentName name = 1;
|
||||||
|
OwnerId owner_id = 3;
|
||||||
|
Token token = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ListOptions {
|
||||||
|
EnvironmentName name = 1;
|
||||||
|
OwnerId owner_id = 3;
|
||||||
|
Token token = 4;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
Environment related messages
|
||||||
|
*/
|
||||||
|
|
||||||
message EnvironmentName {
|
message EnvironmentName {
|
||||||
string name = 1; // Contour ID: UUID
|
string name = 1; // A name of the environment
|
||||||
}
|
}
|
||||||
|
|
||||||
message EnvironmentData {
|
message EnvironmentData {
|
||||||
@ -29,6 +76,15 @@ message EnvironmentData {
|
|||||||
HetznerOptions hetzner_options = 4;
|
HetznerOptions hetzner_options = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message EnvironmentFull {
|
||||||
|
EnvironmentName name = 1;
|
||||||
|
EnvironmentData data = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Helpers and other messages
|
||||||
|
*/
|
||||||
enum Provider {
|
enum Provider {
|
||||||
PROVIDER_UNSPECIFIED = 0;
|
PROVIDER_UNSPECIFIED = 0;
|
||||||
PROVIDER_HETZNER = 1;
|
PROVIDER_HETZNER = 1;
|
||||||
@ -43,8 +99,3 @@ message HetznerOptions {
|
|||||||
string server_type = 1;
|
string server_type = 1;
|
||||||
string server_location = 2;
|
string server_location = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message EnvironmentFull {
|
|
||||||
EnvironmentName name = 1;
|
|
||||||
EnvironmentData data = 2;
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user