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

Function newWorkflowContractListCmd

app/cli/cmd/workflow_contract_list.go:27–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25)
26
27func newWorkflowContractListCmd() *cobra.Command {
28 cmd := &cobra.Command{
29 Use: "list",
30 Aliases: []string{"ls"},
31 Short: "List contracts",
32 RunE: func(cmd *cobra.Command, args []string) error {
33 res, err := action.NewWorkflowContractList(ActionOpts).Run()
34 if err != nil {
35 return err
36 }
37
38 return output.EncodeOutput(flagOutputFormat, res, contractListTableOutput)
39 },
40 }
41
42 return cmd
43}
44
45func contractItemTableOutput(contract *action.WorkflowContractItem) error {
46 return contractListTableOutput([]*action.WorkflowContractItem{contract})

Callers 1

newWorkflowContractCmdFunction · 0.85

Calls 3

NewWorkflowContractListFunction · 0.92
EncodeOutputFunction · 0.92
RunMethod · 0.45

Tested by

no test coverage detected