module

package
v0.2.0-beta.6 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package module is here to define any struct necessary to build a plugin compatible with Perses. The definition of a plugin is different to the one you can find in the dashboard definition. The plugin definition in the dashboard is more about the configuration of a plugin, while the one in the module is more about the definition of a plugin. The module definition is stricter and is used to validate the plugin before it is loaded into Perses.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metadata

type Metadata struct {
	Name     string `json:"name" yaml:"name"`
	Version  string `json:"version" yaml:"version"`
	Registry string `json:"registry" yaml:"registry"`
}

type Module

type Module struct {
	Metadata    *Metadata `json:"metadata,omitempty" yaml:"metadata,omitempty"`
	SchemasPath string    `json:"schemasPath" yaml:"schemasPath"`
	// ModuleName is deprecated and will be removed in the future. It is recommended to use the Metadata.Name field instead.
	ModuleName string `json:"moduleName,omitempty" yaml:"moduleName,omitempty"`
	// ModuleOrg is deprecated and will be removed in the future. It is recommended to use the Metadata.Registry field instead.
	ModuleOrg string   `json:"moduleOrg,omitempty" yaml:"moduleOrg,omitempty"`
	Plugins   []Plugin `json:"plugins" yaml:"plugins"`
}

func (*Module) UnmarshalJSON

func (m *Module) UnmarshalJSON(data []byte) error

func (*Module) UnmarshalYAML

func (m *Module) UnmarshalYAML(unmarshal func(any) error) error

type Plugin

type Plugin struct {
	Kind plugin.Kind `json:"kind" yaml:"kind"`
	Spec PluginSpec  `json:"spec" yaml:"spec"`
}

func (*Plugin) UnmarshalJSON

func (p *Plugin) UnmarshalJSON(data []byte) error

func (*Plugin) UnmarshalYAML

func (p *Plugin) UnmarshalYAML(unmarshal func(any) error) error

type PluginSpec

type PluginSpec struct {
	Display *common.Display `json:"display" yaml:"display"`
	Name    string          `json:"name" yaml:"name"`
}

type Status

type Status struct {
	IsLoaded bool   `json:"isLoaded" yaml:"isLoaded"`
	InDev    bool   `json:"inDev" yaml:"inDev"`
	Error    string `json:"error,omitempty" yaml:"error,omitempty"`
}

Jump to

Keyboard shortcuts

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