Documentation
¶
Index ¶
- Variables
- func GenerateSchemaDefinitions(ctx *cue.Context, schemas []LoadSchema) (cue.Value, error)
- func GenerateSchemaDisjunction(ctx *cue.Context, schemas []LoadSchema) (cue.Value, error)
- func LoadModelSchema(schemaPath string) (string, *build.Instance, error)
- func LoadSchemaInstance(schemaPath string, pkg string) (*build.Instance, error)
- type LoadSchema
- type Schema
Constants ¶
This section is empty.
Variables ¶
View Source
var CueValidationOptions = []cue.Option{ cue.Concrete(true), cue.Attributes(true), cue.Definitions(true), cue.Hidden(true), }
CueValidationOptions is the options to run the final validation (e.g only concrete values allowed)
Functions ¶
func GenerateSchemaDefinitions ¶
Generates a single cue.Value composed of a list of cue definitions (prefixed by #)
func GenerateSchemaDisjunction ¶
Function generates a disjunction (OR join) of a list of LoadSchemas and returns it in a single cue.Value
Types ¶
type LoadSchema ¶
func Load ¶
func Load(pluginPath string, moduleSpec v1.ModuleSpec) ([]LoadSchema, error)
Load is loading the list of the schema associated with the given plugin module.
type Schema ¶
type Schema interface {
Load(pluginPath string, module v1.PluginModule) error
LoadDevPlugin(pluginPath string, module v1.PluginModule) error
UnloadDevPlugin(module v1.PluginModule)
ValidateDatasource(plugin plugin.Plugin, dtsName string) error
ValidatePanels(panels map[string]*dashboard.Panel) error
ValidatePanel(plugin plugin.Plugin, panelName string) error
ValidateGlobalVariable(v v1.VariableSpec) error
ValidateDashboardVariables([]dashboard.Variable) error
ValidateDashboardAnnotations([]dashboard.AnnotationSpec) error
ValidateVariable(plugin plugin.Plugin, varName string) error
GetAllSchemas() []LoadSchema
GetSchema(name, version, registry string) (LoadSchema, bool)
GetInstance(kind plugin.Kind, name string) (*build.Instance, error)
GenerateDashboardSchema() (cue.Value, error)
}
Click to show internal directories.
Click to hide internal directories.