mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: Add basic support for rich parameters to coderd and provisionerd (#5710)
This commit is contained in:
Generated
+692
-343
File diff suppressed because it is too large
Load Diff
@@ -52,6 +52,34 @@ message ParameterSchema {
|
||||
string validation_condition = 11;
|
||||
}
|
||||
|
||||
// RichParameterOption represents a singular option that a parameter may expose.
|
||||
message RichParameterOption {
|
||||
string name = 1;
|
||||
string description = 2;
|
||||
string value = 3;
|
||||
string icon = 4;
|
||||
}
|
||||
|
||||
// RichParameter represents a variable that is exposed.
|
||||
message RichParameter {
|
||||
string name = 1;
|
||||
string description = 2;
|
||||
string type = 3;
|
||||
bool mutable = 4;
|
||||
string default_value = 5;
|
||||
string icon = 6;
|
||||
repeated RichParameterOption options = 7;
|
||||
string validation_regex = 8;
|
||||
int32 validation_min = 9;
|
||||
int32 validation_max = 10;
|
||||
}
|
||||
|
||||
// RichParameterValue holds the key/value mapping of a parameter.
|
||||
message RichParameterValue {
|
||||
string name = 1;
|
||||
string value = 2;
|
||||
}
|
||||
|
||||
// LogLevel represents severity of the log.
|
||||
enum LogLevel {
|
||||
TRACE = 0;
|
||||
@@ -183,6 +211,7 @@ message Provision {
|
||||
message Plan {
|
||||
Config config = 1;
|
||||
repeated ParameterValue parameter_values = 2;
|
||||
repeated RichParameterValue rich_parameter_values = 3;
|
||||
}
|
||||
|
||||
message Apply {
|
||||
@@ -201,8 +230,9 @@ message Provision {
|
||||
message Complete {
|
||||
bytes state = 1;
|
||||
string error = 2;
|
||||
bytes plan = 4;
|
||||
repeated Resource resources = 3;
|
||||
repeated RichParameter parameters = 4;
|
||||
bytes plan = 5;
|
||||
}
|
||||
message Response {
|
||||
oneof type {
|
||||
|
||||
Reference in New Issue
Block a user