Documentation
¶
Index ¶
- Constants
- func InstallScript(user, nodeIP string, script Script, skipWait bool) (int, error)
- func InstallScriptInLXC(user, nodeIP string, vmid int, script Script, skipWait bool) (int, error)
- func ValidateConnection(user, nodeIP string) error
- type GitHubContent
- type Plugin
- func (p *Plugin) Description() string
- func (p *Plugin) ID() string
- func (p *Plugin) Initialize(ctx context.Context, app *components.App, registrar components.PluginRegistrar) error
- func (p *Plugin) ModalPageNames() []string
- func (p *Plugin) Name() string
- func (p *Plugin) Shutdown(ctx context.Context) error
- type Script
- type ScriptCategory
- type ScriptSelector
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 InstallScriptInLXC ¶ added in v1.0.14
func ValidateConnection ¶
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 (*Plugin) Description ¶
Description describes the plugin's purpose.
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
ModalPageNames returns the list of modal page names this plugin registers.
type ScriptCategory ¶
type ScriptCategory = core.ScriptCategory
func GetScriptCategories ¶
func GetScriptCategories() []ScriptCategory
type ScriptSelector ¶
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.
Click to show internal directories.
Click to hide internal directories.