MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / newCASBackendListCmd

Function newCASBackendListCmd

app/cli/cmd/casbackend_list.go:31–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29)
30
31func newCASBackendListCmd() *cobra.Command {
32 cmd := &cobra.Command{
33 Use: "list",
34 Aliases: []string{"ls"},
35 Short: "List CAS Backends from your organization",
36 RunE: func(cmd *cobra.Command, args []string) error {
37 res, err := action.NewCASBackendList(ActionOpts).Run()
38 if err != nil {
39 return err
40 }
41
42 return output.EncodeOutput(flagOutputFormat, res, casBackendListTableOutput)
43 },
44 }
45
46 cmd.Flags().BoolVar(&full, "full", false, "show the full output")
47 return cmd
48}
49
50func casBackendItemTableOutput(backend *action.CASBackendItem) error {
51 return casBackendListTableOutput([]*action.CASBackendItem{backend})

Callers 1

newCASBackendCmdFunction · 0.85

Calls 3

NewCASBackendListFunction · 0.92
EncodeOutputFunction · 0.92
RunMethod · 0.45

Tested by

no test coverage detected