gsplugin

package module
v0.0.0-...-4862fd6 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitspacePlugin

type GitspacePlugin interface {
	Name() string
	Version() string
	Description() string
	Run(logger *log.Logger) error
	GetMenuOption() *huh.Option[string]
	Standalone(args []string) error
	SetConfig(config PluginConfig)
}

type PluginConfig

type PluginConfig struct {
	Metadata PluginMetadata `toml:"metadata"`
	Menu     struct {
		Title string `toml:"title"`
		Key   string `toml:"key"`
	} `toml:"menu"`
}

PluginConfig contains the configuration for the plugin

func ParsePluginConfig

func ParsePluginConfig(pluginDir string) (PluginConfig, error)

type PluginManifest

type PluginManifest struct {
	Plugin struct {
		Name        string `toml:"name"`
		Version     string `toml:"version"`
		Description string `toml:"description,omitempty"`
		Author      string `toml:"author,omitempty"`
		Sources     []struct {
			Path       string `toml:"path"`
			EntryPoint string `toml:"entry_point"`
			Repository struct {
				Type   string `toml:"type,omitempty"`
				URL    string `toml:"url,omitempty"`
				Branch string `toml:"branch,omitempty"`
			} `toml:"repository,omitempty"`
		} `toml:"sources"`
	} `toml:"plugin"`
}

type PluginMetadata

type PluginMetadata struct {
	Name        string   `toml:"name"`
	Version     string   `toml:"version"`
	Description string   `toml:"description"`
	Author      string   `toml:"author"`
	Tags        []string `toml:"tags"`
}

PluginMetadata contains additional information about the plugin

Jump to

Keyboard shortcuts

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