package common
import "github.com/purpleidea/mgmt/engine/resources/http_server_ui/common"
Package common contains some code that is shared between the wasm and the http:server:ui packages.
Index ¶
Constants ¶
const ( // HTTPServerUIInputType represents the field in the "Type" map that specifies // which input type we're using. HTTPServerUIInputType = "type" // HTTPServerUIInputTypeText is the representation of the html "text" // type. HTTPServerUIInputTypeText = "text" // HTTPServerUIInputTypeRange is the representation of the html "range" // type. HTTPServerUIInputTypeRange = "range" // HTTPServerUIInputTypeRangeMin is the html input "range" min field. HTTPServerUIInputTypeRangeMin = "min" // HTTPServerUIInputTypeRangeMax is the html input "range" max field. HTTPServerUIInputTypeRangeMax = "max" // HTTPServerUIInputTypeRangeStep is the html input "range" step field. HTTPServerUIInputTypeRangeStep = "step" )
Types ¶
type Form ¶
type Form struct { // Elements is a list of form elements in this form. // TODO: Maybe this should be an interface? Elements []*FormElement `json:"elements"` }
Form represents the entire form containing all the desired elements.
type FormElement ¶
type FormElement struct { // Kind is the kind of form element that this is. Kind string `json:"kind"` // ID is the unique public id for this form element. ID string `json:"id"` // Type is a map that you can use to build the input field in the ui. Type map[string]string `json:"type"` // Sort is a string that you can use to determine the global sorted // display order of all the elements in a ui. Sort string `json:"sort"` }
FormElement represents each form element.
type FormElementGeneric ¶
type FormElementGeneric struct { // Value holds the string value we're interested in. Value string `json:"value"` }
FormElementGeneric is a value store.
Source Files ¶
- Version
- v0.0.0-20250609011654-777ea6115b20 (latest)
- Published
- Jun 9, 2025
- Platform
- linux/amd64
- Last checked
- 1 day ago –
Tools for package owners.