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