config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitHubConfig added in v0.1.0

type GitHubConfig struct {
	// Repository in format "owner/repo" (e.g., "Schumann-IT/dehydrated-api-metadata-plugin-netscaler")
	Repository string `yaml:"repository"`

	// Version tag to use (e.g., "v1.0.0", "latest")
	// If not specified, defaults to "latest"
	Version string `yaml:"version"`

	// Platform to download (e.g., "linux-amd64", "darwin-amd64")
	// If not specified, will be auto-detected
	Platform string `yaml:"platform"`
}

GitHubConfig holds configuration for GitHub-based plugins

type PluginConfig

type PluginConfig struct {
	// Enabled determines whether the plugin should be loaded and used.
	Enabled bool `yaml:"enabled"`

	// Path specifies the location of the plugin executable or library.
	// This is used for local plugins or to override GitHub repository settings.
	// DEPRECATED: Use Registry instead
	Path string `yaml:"path"`

	// GitHub repository information for remote plugins
	// DEPRECATED: Use Registry instead
	GitHub *GitHubConfig `yaml:"github"`

	// Registry configuration for plugin source
	Registry *RegistryConfig `yaml:"registry"`

	// Config contains plugin-specific configuration settings.
	// The structure of this map depends on the specific plugin implementation.
	Config map[string]any `yaml:"config"`
}

PluginConfig holds configuration for a plugin. It defines the basic settings needed to load and configure a plugin.

func (*PluginConfig) GetGitHubInfo added in v0.1.0

func (c *PluginConfig) GetGitHubInfo() *GitHubConfig

GetGitHubInfo returns GitHub configuration if available

func (*PluginConfig) GetPluginPath added in v0.1.0

func (c *PluginConfig) GetPluginPath() string

GetPluginPath returns the effective plugin path If Path is set, it takes precedence over GitHub configuration

func (*PluginConfig) IsGitHubPlugin added in v0.1.0

func (c *PluginConfig) IsGitHubPlugin() bool

IsGitHubPlugin returns true if this plugin should be loaded from GitHub

func (*PluginConfig) ToProto

func (c *PluginConfig) ToProto() (map[string]*structpb.Value, error)

ToProto converts the config to a proto InitializeRequest

func (*PluginConfig) Validate added in v0.1.0

func (c *PluginConfig) Validate() error

Validate checks if the plugin configuration is valid

type RegistryConfig added in v0.1.0

type RegistryConfig struct {
	Type   string         `yaml:"type"`
	Config map[string]any `yaml:"config"`
}

RegistryConfig represents the configuration for a plugin registry

Jump to

Keyboard shortcuts

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