Documentation
¶
Index ¶
- Constants
- Variables
- func HasFeature(name string, commands []*cli.Command) (present bool)
- func ListFeatures(commands []*cli.Command) (names []string)
- type CCommand
- func (c *CCommand) Context() (ctx context.Context)
- func (s *CCommand) ExtraCommands(app *cli.App) (commands []*cli.Command)
- func (c *CCommand) Init(this interface{})
- func (c *CCommand) Name() (name string)
- func (s *CCommand) Prepare(ctx *cli.Context) (err error)
- func (c *CCommand) Setup(app *cli.App) (err error)
- func (c *CCommand) This() (self Command)
- type CSystem
- func (s *CSystem) Clean(ctx *cli.Context) (err error)
- func (s *CSystem) CleanAction(ctx *cli.Context) (err error)
- func (s *CSystem) Export(ctx *cli.Context) (err error)
- func (s *CSystem) ExportAction(ctx *cli.Context) (err error)
- func (s *CSystem) ExportPathVariable(export bool)
- func (s *CSystem) ExportString(ctx *cli.Context) (content string, err error)
- func (s *CSystem) GetDefaultVersion() (version string)
- func (s *CSystem) GetExportPaths() (list []string)
- func (s *CSystem) GetInstalledVersion() (version string, err error)
- func (s *CSystem) GetKnownSums() (sums map[string]string, err error)
- func (s *CSystem) IncludeCommands(app *cli.App) (commands []*cli.Command)
- func (s *CSystem) Init(this interface{})
- func (s *CSystem) InitAction(ctx *cli.Context) (err error)
- func (s *CSystem) InitSystem(ctx *cli.Context) (err error)
- func (s *CSystem) MakeDirs() (err error)
- func (s *CSystem) ParseFileName(path string) (version, osName, osArch string, err error)
- func (s *CSystem) ParseVersionString(ver string) (version string, err error)
- func (s *CSystem) PostInitSystem(ctx *cli.Context) (err error)
- func (s *CSystem) Self() (self System)
- func (s *CSystem) UnExport(ctx *cli.Context) (err error)
- func (s *CSystem) UnExportAction(ctx *cli.Context) (err error)
- func (s *CSystem) UnExportPathVariable(export bool)
- func (s *CSystem) UnExportString(ctx *cli.Context) (content string, err error)
- func (s *CSystem) VersionAction(ctx *cli.Context) (err error)
- type Command
- type System
- type SystemsManager
Constants ¶
View Source
const ( ShellCategory = "general shell" BuildCategory = "general build" SystemCategory = "system" GeneralCategory = "general" )
Variables ¶
View Source
var BashCompletionSource string
View Source
var BinName = path.Base(os.Args[0])
View Source
var ShellFunctionsSource string
View Source
var TmpDirName = "tmp"
Functions ¶
func ListFeatures ¶
Types ¶
type CCommand ¶
type CCommand struct {
TagName string
App *cli.App
Ctx context.Context
// contains filtered or unexported fields
}
func (*CCommand) ExtraCommands ¶
type CSystem ¶
type CSystem struct {
CCommand
Url string
Version string
Root string
TarGz string
TarGzPath string
TarGzUrl string
TarUnzip bool
}
func (*CSystem) ExportPathVariable ¶
func (*CSystem) ExportString ¶
func (*CSystem) GetDefaultVersion ¶
func (*CSystem) GetExportPaths ¶ added in v0.1.7
func (*CSystem) GetInstalledVersion ¶
func (*CSystem) IncludeCommands ¶
func (*CSystem) ParseFileName ¶
func (*CSystem) ParseVersionString ¶
func (*CSystem) UnExportPathVariable ¶
func (*CSystem) UnExportString ¶
type System ¶
type System interface {
Command
Self() (self System)
GetKnownSums() (sums map[string]string, err error)
ParseVersionString(ver string) (version string, err error)
ParseFileName(path string) (version, osName, osArch string, err error)
MakeDirs() (err error)
InitAction(ctx *cli.Context) (err error)
VersionAction(ctx *cli.Context) (err error)
CleanAction(ctx *cli.Context) (err error)
ExportPathVariable(export bool)
GetExportPaths() []string
ExportAction(ctx *cli.Context) (err error)
UnExportPathVariable(export bool)
UnExportAction(ctx *cli.Context) (err error)
InitSystem(ctx *cli.Context) (err error)
PostInitSystem(ctx *cli.Context) (err error)
Clean(ctx *cli.Context) (err error)
Export(ctx *cli.Context) (err error)
ExportString(ctx *cli.Context) (content string, err error)
UnExport(ctx *cli.Context) (err error)
UnExportString(ctx *cli.Context) (content string, err error)
GetInstalledVersion() (version string, err error)
GetDefaultVersion() (version string)
IncludeCommands(app *cli.App) (commands []*cli.Command)
}
type SystemsManager ¶
type SystemsManager struct {
// contains filtered or unexported fields
}
func Manager ¶
func Manager() (m *SystemsManager)
func (*SystemsManager) AddCommand ¶
func (m *SystemsManager) AddCommand(c Command) *SystemsManager
func (*SystemsManager) AddSystem ¶
func (m *SystemsManager) AddSystem(s System) *SystemsManager
func (*SystemsManager) Shutdown ¶
func (m *SystemsManager) Shutdown()
Click to show internal directories.
Click to hide internal directories.