(env *execenv.Env)
| 13 | ) |
| 14 | |
| 15 | func newBridgeAuthCommand(env *execenv.Env) *cobra.Command { |
| 16 | cmd := &cobra.Command{ |
| 17 | Use: "auth", |
| 18 | Short: "List all known bridge authentication credentials", |
| 19 | PreRunE: execenv.LoadBackend(env), |
| 20 | RunE: execenv.CloseBackend(env, func(cmd *cobra.Command, args []string) error { |
| 21 | return runBridgeAuth(env) |
| 22 | }), |
| 23 | Args: cobra.NoArgs, |
| 24 | } |
| 25 | |
| 26 | cmd.AddCommand(newBridgeAuthAddTokenCommand(env)) |
| 27 | cmd.AddCommand(newBridgeAuthRm(env)) |
| 28 | cmd.AddCommand(newBridgeAuthShow(env)) |
| 29 | |
| 30 | return cmd |
| 31 | } |
| 32 | |
| 33 | func runBridgeAuth(env *execenv.Env) error { |
| 34 | creds, err := auth.List(env.Backend) |
no test coverage detected