Documentation ¶
Index ¶
- Variables
- func AddDepRun(r *cmd.Root, c *cmd.Sub)
- func AddRun(r *cmd.Root, c *cmd.Sub)
- func ImportRun(r *cmd.Root, c *cmd.Sub)
- func InfoRun(r *cmd.Root, c *cmd.Sub)
- func ListRun(r *cmd.Root, c *cmd.Sub)
- func RemoveDepRun(r *cmd.Root, c *cmd.Sub)
- func RemoveRun(r *cmd.Root, c *cmd.Sub)
- func RunFull(r *cmd.Root, c *cmd.Sub)
- func SpinnerWait(done chan int, message string, wg *sync.WaitGroup)
- func UpdateRun(r *cmd.Root, c *cmd.Sub)
- func UpgradeRun(r *cmd.Root, c *cmd.Sub)
- type AddArgs
- type AddDepArgs
- type GlobalFlags
- type ImportArgs
- type InfoArgs
- type ListArgs
- type RemoveArgs
- type RemoveDepArgs
- type RunArgs
- type SelfUpdateArgs
- type SelfUpdateFlags
- type UpgradeArgs
Constants ¶
This section is empty.
Variables ¶
var Add = cmd.Sub{ Name: "add", Alias: "a", Short: "Add an entry to the database", Args: &AddArgs{}, Run: AddRun, }
Add imports a new app entry into the database.
var AddDep = cmd.Sub{ Name: "add-dependency", Alias: "ad", Short: "Add an entry, dependency relationship to the database", Args: &AddDepArgs{}, Run: AddDepRun, }
AddDep imports a new app, dependency relationship into the database.
var Import = cmd.Sub{ Name: "import", Alias: "im", Short: "Import a package in .yml format to the database.", Args: &ImportArgs{}, Run: ImportRun, }
Import adds a new app to the database.
var Info = cmd.Sub{ Name: "info", Alias: "in", Short: "Displays the information for a package in the database", Args: &InfoArgs{}, Run: InfoRun, }
Info gets an entry from the database and displays the relevant information.
var List = cmd.Sub{ Name: "list", Alias: "ls", Short: "List all of the applications in the database.", Args: &ListArgs{}, Run: ListRun, }
List shows all the apps in the database.
var Remove = cmd.Sub{ Name: "remove", Alias: "rm", Short: "Remove an entry from the database.", Args: &RemoveArgs{}, Run: RemoveRun, }
Remove deletes an entry from the application database.
var RemoveDep = cmd.Sub{ Name: "remove-dependency", Alias: "rd", Short: "Remove an entry, dependency relationship from the database.", Args: &RemoveDepArgs{}, Run: RemoveDepRun, }
RemoveDep deletes an app, dependency relationship from the database.
var Root *cmd.Root
Root is the main command.
var Run = cmd.Sub{ Name: "run", Alias: "r", Short: "Run a full scan of the database to check for updates.", Args: &RunArgs{}, Run: RunFull, }
Run executes a full database scan to see if any applictions are out of date.
var SelfUpdate = cmd.Sub{ Name: "self-update", Alias: "ups", Short: "Have lookout update itself to the lastest version.", Args: &SelfUpdateArgs{}, Flags: &SelfUpdateFlags{}, Run: UpdateRun, }
SelfUpdate checks for a new version of Lookout and updates itself if a newer version is found and the user agrees to update.
var Spinner = []string{"|", "/", "-", "\\"}
Spinner is an array of the progression of the spinner.
var Upgrade = cmd.Sub{ Name: "upgrade", Alias: "up", Short: "Set an entry to the latest version possible.", Args: &UpgradeArgs{}, Run: UpgradeRun, }
Upgrade modifies an entry in the database to make it the latest version.
Functions ¶
func AddDepRun ¶
AddDepRun imports a new app, dependency relationship. It will also check for duplicate dependencies before continuing.
func AddRun ¶
AddRun imports a new app entry into the database. Will also check if the application is up-to-date before entering into the database.
func ImportRun ¶
ImportRun adds a new app entry to the database by parsing a YAML file. Import like the add command will check if the app is up to date before adding to the database.
func RemoveDepRun ¶
RemoveDepRun deletes an app, dependency relationship from the database.
func SpinnerWait ¶ added in v1.2.0
SpinnerWait displays the actual spinner
Types ¶
type AddDepArgs ¶
AddDepArgs handles the specific arguments for the AddDep command.
type ImportArgs ¶
type ImportArgs struct {
Filename string
}
ImportArgs handles the specific arguments for the import command.
type InfoArgs ¶
type InfoArgs struct {
ID string
}
InfoArgs handles the search specific arguments passed to the command.
type ListArgs ¶
type ListArgs struct { }
ListArgs handles the specific arguments passed to list. For real though its a place holder.
type RemoveArgs ¶
type RemoveArgs struct {
ID string
}
RemoveArgs handles the arguments passed to the remove command.
type RemoveDepArgs ¶
RemoveDepArgs handles the specific arguments for the RemoveDep command.
type SelfUpdateArgs ¶ added in v1.2.0
type SelfUpdateArgs struct { }
SelfUpdateArgs handles the specific arguments for the update command.
type SelfUpdateFlags ¶ added in v1.2.0
type SelfUpdateFlags struct {
Yes bool `short:"y" long:"yes" desc:"If a newer version is found update without prompting the user."`
}
SelfUpdateFlags handles the specific flags for the update command.
type UpgradeArgs ¶
type UpgradeArgs struct {
ID string
}
UpgradeArgs handles the specific arguments for the upgrade command.