-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* support plugin keys * bump CI to go 1.18 * upgrade notation-go * update plugins branch * reduce plugin print verbosity * bump notation-go * make key and cert name required * simplify NewSignerFromFiles * Apply suggestions from code review * remove unused package * fix plugin aliases * return printkey errors Signed-off-by: qmuntal <qmuntaldiaz@microsoft.com> Co-authored-by: Shiwei Zhang <shizh@microsoft.com>
- Loading branch information
Showing
17 changed files
with
370 additions
and
266 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
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
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,35 @@ | ||
package main | ||
|
||
import ( | ||
"os" | ||
|
||
"github.com/notaryproject/notation-go/plugin/manager" | ||
"github.com/notaryproject/notation/internal/ioutil" | ||
"github.com/urfave/cli/v2" | ||
) | ||
|
||
var ( | ||
pluginCommand = &cli.Command{ | ||
Name: "plugin", | ||
Usage: "Manage plugins", | ||
Subcommands: []*cli.Command{ | ||
pluginListCommand, | ||
}, | ||
} | ||
|
||
pluginListCommand = &cli.Command{ | ||
Name: "list", | ||
Usage: "List registered plugins", | ||
Aliases: []string{"ls"}, | ||
Action: listPlugins, | ||
} | ||
) | ||
|
||
func listPlugins(ctx *cli.Context) error { | ||
mgr := manager.NewManager() | ||
plugins, err := mgr.List(ctx.Context) | ||
if err != nil { | ||
return err | ||
} | ||
return ioutil.PrintPlugins(os.Stdout, plugins) | ||
} |
Oops, something went wrong.