MCPcopy Create free account
hub / github.com/git-bug/git-bug / newBridgeAuthCommand

Function newBridgeAuthCommand

commands/bridge/bridge_auth.go:15–31  ·  view source on GitHub ↗
(env *execenv.Env)

Source from the content-addressed store, hash-verified

13)
14
15func 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
33func runBridgeAuth(env *execenv.Env) error {
34 creds, err := auth.List(env.Backend)

Callers 1

NewBridgeCommandFunction · 0.85

Calls 6

LoadBackendFunction · 0.92
CloseBackendFunction · 0.92
runBridgeAuthFunction · 0.85
newBridgeAuthRmFunction · 0.85
newBridgeAuthShowFunction · 0.85

Tested by

no test coverage detected