-
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
107 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var inspectCmd = &cobra.Command{ | ||
Use: "inspect", | ||
Short: "Return low-level information on Docker objects", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(inspectCmd).Standalone() | ||
|
||
inspectCmd.Flags().StringP("format", "f", "", "Format the output using the given Go template") | ||
inspectCmd.Flags().BoolP("size", "s", false, "Display total file sizes if the type is container") | ||
inspectCmd.Flags().String("type", "", "Return JSON for specified type") | ||
rootCmd.AddCommand(inspectCmd) | ||
|
||
// TODO complete positiona parameters | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var loginCmd = &cobra.Command{ | ||
Use: "login", | ||
Short: "Log in to a Docker registry", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(loginCmd).Standalone() | ||
|
||
loginCmd.Flags().StringP("password", "p", "", "Password") | ||
loginCmd.Flags().Bool("password-stdin", false, "Take the password from stdin") | ||
loginCmd.Flags().StringP("username", "u", "", "Username") | ||
rootCmd.AddCommand(loginCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var logoutCmd = &cobra.Command{ | ||
Use: "logout", | ||
Short: "Log out from a Docker registry", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(logoutCmd).Standalone() | ||
|
||
rootCmd.AddCommand(logoutCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var searchCmd = &cobra.Command{ | ||
Use: "search", | ||
Short: "Search the Docker Hub for images", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(searchCmd).Standalone() | ||
|
||
searchCmd.Flags().StringP("filter", "f", "", "Filter output based on conditions provided") | ||
searchCmd.Flags().String("format", "", "Pretty-print search using a Go template") | ||
searchCmd.Flags().String("limit", "", "Max number of search results (default 25)") | ||
searchCmd.Flags().Bool("no-trunc", false, "Don't truncate output") | ||
rootCmd.AddCommand(searchCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var versionCmd = &cobra.Command{ | ||
Use: "version", | ||
Short: "Show the Docker version information", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(versionCmd).Standalone() | ||
|
||
versionCmd.Flags().StringP("format", "f", "", "Format the output using the given Go template") | ||
versionCmd.Flags().String("kubeconfig", "", "Kubernetes config file") | ||
rootCmd.AddCommand(versionCmd) | ||
} |