communityscripts

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GitHubRepo                 = core.GitHubRepo
	GitHubAPIRepo              = core.GitHubAPIRepo
	RawGitHubRepo              = core.RawGitHubRepo
	RawGitHubDevRepo           = core.RawGitHubDevRepo
	MetadataPocketBaseBase     = core.MetadataPocketBaseBase
	MetadataPocketBaseAPI      = core.MetadataPocketBaseAPI
	ScriptMetadataTTL          = core.ScriptMetadataTTL
	ScriptListTTL              = core.ScriptListTTL
	ScriptMetadataListCacheKey = core.ScriptMetadataListCacheKey
	ScriptListCacheKey         = core.ScriptListCacheKey
	ScriptCacheKeyPrefix       = core.ScriptCacheKeyPrefix
)
View Source
const PluginID = "community-scripts"

PluginID identifies the community scripts plugin when referencing it from configuration.

Variables

This section is empty.

Functions

func InstallScript

func InstallScript(user, nodeIP string, script Script, skipWait bool) (int, error)

func InstallScriptInLXC added in v1.0.14

func InstallScriptInLXC(user, nodeIP string, vmid int, script Script, skipWait bool) (int, error)

func ValidateConnection

func ValidateConnection(user, nodeIP string) error

Types

type GitHubContent

type GitHubContent = core.GitHubContent

func GetScriptMetadataFiles

func GetScriptMetadataFiles() ([]GitHubContent, error)

type Plugin

type Plugin struct {
	// contains filtered or unexported fields
}

Plugin implements the components.Plugin interface to provide community script functionality.

func New

func New() *Plugin

New returns a fresh plugin instance.

func (*Plugin) Description

func (p *Plugin) Description() string

Description describes the plugin's purpose.

func (*Plugin) ID

func (p *Plugin) ID() string

ID returns the stable plugin identifier.

func (*Plugin) Initialize

func (p *Plugin) Initialize(ctx context.Context, app *components.App, registrar components.PluginRegistrar) error

Initialize wires the plugin into the host application.

func (*Plugin) ModalPageNames added in v1.0.9

func (p *Plugin) ModalPageNames() []string

ModalPageNames returns the list of modal page names this plugin registers.

func (*Plugin) Name

func (p *Plugin) Name() string

Name returns a human-friendly plugin name.

func (*Plugin) Shutdown

func (p *Plugin) Shutdown(ctx context.Context) error

Shutdown releases resources held by the plugin.

type Script

type Script = core.Script

func FetchScripts

func FetchScripts() ([]Script, error)

func GetScriptMetadata

func GetScriptMetadata(metadataURL string) (*Script, error)

func GetScriptsByCategory

func GetScriptsByCategory(category string) ([]Script, error)

type ScriptCategory

type ScriptCategory = core.ScriptCategory

func GetScriptCategories

func GetScriptCategories() []ScriptCategory

type ScriptSelector

type ScriptSelector struct {
	*tview.Pages
	// contains filtered or unexported fields
}

ScriptSelector represents a page-based script selector for installing community scripts.

func NewScriptSelector

func NewScriptSelector(app *components.App, node *api.Node, vm *api.VM, user string) *ScriptSelector

NewScriptSelector creates a new script selector.

func (*ScriptSelector) Hide

func (s *ScriptSelector) Hide()

Hide hides the script selector.

func (*ScriptSelector) Show

func (s *ScriptSelector) Show()

Show displays the script selector.

Jump to

Keyboard shortcuts

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