MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / communityScriptToOutput

Function communityScriptToOutput

internal/cli/community_scripts.go:590–616  ·  view source on GitHub ↗
(script core.Script)

Source from the content-addressed store, hash-verified

588}
589
590func communityScriptToOutput(script core.Script) communityScriptOutput {
591 sourceRepo := "community-scripts/ProxmoxVE"
592 if script.IsDev {
593 sourceRepo = "community-scripts/ProxmoxVED"
594 }
595
596 return communityScriptOutput{
597 Name: script.Name,
598 Slug: script.Slug,
599 Description: script.Description,
600 Categories: append([]string(nil), script.Categories...),
601 Type: script.Type,
602 ScriptPath: script.ScriptPath,
603 SourceRepo: sourceRepo,
604 ScriptURL: core.RawScriptURL(script),
605 Website: script.Website,
606 Documentation: script.Documentation,
607 ConfigPath: script.ConfigPath,
608 InterfacePort: script.InterfacePort,
609 Updateable: script.Updateable,
610 Privileged: script.Privileged,
611 IsDev: script.IsDev,
612 IsDisabled: script.IsDisabled,
613 IsDeleted: script.IsDeleted,
614 DateCreated: script.DateCreated,
615 }
616}
617
618func printCommunityScriptDetailsTable(script communityScriptOutput) {
619 printTable([]string{"FIELD", "VALUE"}, [][]string{

Callers 5

runCommunityScriptsShowFunction · 0.85
buildCommunityScriptPlanFunction · 0.85
communityScriptsToOutputFunction · 0.85

Calls

no outgoing calls

Tested by 1