-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add login and logout methods for convenience of use
- Loading branch information
1 parent
89e9999
commit f530382
Showing
5 changed files
with
42 additions
and
0 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,18 @@ | ||
package cmd | ||
|
||
import ( | ||
craneCmd "github.com/google/go-containerregistry/cmd/crane/cmd" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
func LoginCmd() *cobra.Command { | ||
|
||
// For simplicity, and because we use the library quite a bit, we'll just replicate the crane login CMD | ||
// and update the usage instructions to match the gooci style | ||
|
||
command := craneCmd.NewCmdAuthLogin() | ||
command.Short = "Login to a remote registry" | ||
command.Example = "" | ||
|
||
return command | ||
} |
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,17 @@ | ||
package cmd | ||
|
||
import ( | ||
craneCmd "github.com/google/go-containerregistry/cmd/crane/cmd" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
func LogoutCmd() *cobra.Command { | ||
|
||
// For simplicity, and because we use the library quite a bit, we'll just replicate the crane logout CMD | ||
// and update the usage instructions to match the gooci style | ||
|
||
command := craneCmd.NewCmdAuthLogout() | ||
command.Example = "" | ||
|
||
return command | ||
} |
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
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