softplayer-proto/proto/environments/environments_v1.proto

51 lines
1.2 KiB
Protocol Buffer

/// This file has messages for describing environments
syntax = "proto3";
package environments;
import "google/protobuf/empty.proto";
option go_package = "git.badhouseplants.net/softplayer/softplayer-go-proto/pkg/environments";
/**
* Service for handling environments
*/
service Environments {
rpc Create(EnvironmentData) 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) {}
}
/**
* Represents a environment UUID only
* I don't think we need it
*/
message EnvironmentName {
string name = 1; // Contour ID: UUID
}
message EnvironmentData {
Provider provider = 2; // Provide
Kubernetes kubernetes = 3;
HetznerOptions hetzner_options = 4;
}
enum Provider {
PROVIDER_UNSPECIFIED = 0;
PROVIDER_HETZNER = 1;
}
enum Kubernetes {
KUBERNETES_UNSPECIFIED = 0;
KUBERNETES_K3S = 1;
}
message HetznerOptions {
string server_type = 1;
string server_location = 2;
}
message EnvironmentFull {
EnvironmentName name = 1;
EnvironmentData data = 2;
}