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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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