mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
feat: Expose managed variables via API (#6134)
* WIP * hcl * useManagedVariables * fix * Fix * Fix * fix * go:build * Fix * fix: bool flag * Insert template variables * API * fix * Expose via API * More wiring * CLI for testing purposes * WIP * Delete FIXME * planVars * WIP * WIP * UserVariableValues * no dry run * Dry run * Done FIXME * Fix * Fix: CLI * Fix: migration * API tests * Test info * Tests * More tests * fix: lint * Fix: authz * Address PR comments * Fix * fix * fix
This commit is contained in:
@ -1463,6 +1463,24 @@ type TemplateVersionParameter struct {
|
||||
ValidationMonotonic string `db:"validation_monotonic" json:"validation_monotonic"`
|
||||
}
|
||||
|
||||
type TemplateVersionVariable struct {
|
||||
TemplateVersionID uuid.UUID `db:"template_version_id" json:"template_version_id"`
|
||||
// Variable name
|
||||
Name string `db:"name" json:"name"`
|
||||
// Variable description
|
||||
Description string `db:"description" json:"description"`
|
||||
// Variable type
|
||||
Type string `db:"type" json:"type"`
|
||||
// Variable value
|
||||
Value string `db:"value" json:"value"`
|
||||
// Variable default value
|
||||
DefaultValue string `db:"default_value" json:"default_value"`
|
||||
// Required variables needs a default value or a value provided by template admin
|
||||
Required bool `db:"required" json:"required"`
|
||||
// Sensitive variables have their values redacted in logs or site UI
|
||||
Sensitive bool `db:"sensitive" json:"sensitive"`
|
||||
}
|
||||
|
||||
type User struct {
|
||||
ID uuid.UUID `db:"id" json:"id"`
|
||||
Email string `db:"email" json:"email"`
|
||||
|
Reference in New Issue
Block a user