schema

package
v0.53.0-beta.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CueValidationOptions = []cue.Option{
	cue.Concrete(true),
	cue.Attributes(true),
	cue.Definitions(true),
	cue.Hidden(true),
}

Options to run the final validation (e.g only concrete values allowed)

Functions

func LoadModelSchema

func LoadModelSchema(schemaPath string) (string, *build.Instance, error)

func LoadSchemaInstance

func LoadSchemaInstance(schemaPath string, pkg string) (*build.Instance, error)

Types

type LoadSchema

type LoadSchema struct {
	Kind     plugin.Kind
	Name     string
	Instance *build.Instance
}

func Load

func Load(pluginPath string, moduleSpec plugin.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 common.Plugin, dtsName string) error
	ValidatePanels(panels map[string]*v1.Panel) error
	ValidatePanel(plugin common.Plugin, panelName string) error
	ValidateGlobalVariable(v v1.VariableSpec) error
	ValidateDashboardVariables([]dashboard.Variable) error
	ValidateVariable(plugin common.Plugin, varName string) error
	GetDatasourceSchema(pluginName string) (*build.Instance, error)
}

func New

func New() Schema

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL