@@ -8,14 +8,14 @@ import (
88 "github.com/spf13/cobra"
99 "github.com/stackitcloud/stackit-sdk-go/services/intake"
1010
11- "github.com/stackitcloud/stackit-cli/internal/cmd/params"
1211 "github.com/stackitcloud/stackit-cli/internal/pkg/args"
1312 cliErr "github.com/stackitcloud/stackit-cli/internal/pkg/errors"
1413 "github.com/stackitcloud/stackit-cli/internal/pkg/examples"
1514 "github.com/stackitcloud/stackit-cli/internal/pkg/globalflags"
1615 "github.com/stackitcloud/stackit-cli/internal/pkg/print"
1716 "github.com/stackitcloud/stackit-cli/internal/pkg/services/intake/client"
1817 "github.com/stackitcloud/stackit-cli/internal/pkg/tables"
18+ "github.com/stackitcloud/stackit-cli/internal/pkg/types"
1919 "github.com/stackitcloud/stackit-cli/internal/pkg/utils"
2020)
2121
@@ -28,7 +28,7 @@ type inputModel struct {
2828 IntakeId string
2929}
3030
31- func NewCmd (p * params .CmdParams ) * cobra.Command {
31+ func NewCmd (p * types .CmdParams ) * cobra.Command {
3232 cmd := & cobra.Command {
3333 Use : fmt .Sprintf ("describe %s" , intakeIdArg ),
3434 Short : "Shows details of an Intake" ,
@@ -90,38 +90,38 @@ func buildRequest(ctx context.Context, model *inputModel, apiClient *intake.APIC
9090 return req
9191}
9292
93- func outputResult (p * print.Printer , outputFormat string , intake * intake.IntakeResponse ) error {
94- if intake == nil {
93+ func outputResult (p * print.Printer , outputFormat string , intk * intake.IntakeResponse ) error {
94+ if intk == nil {
9595 return fmt .Errorf ("received nil response, could not display details" )
9696 }
9797
98- return p .OutputResult (outputFormat , intake , func () error {
98+ return p .OutputResult (outputFormat , intk , func () error {
9999 table := tables .NewTable ()
100100 table .SetHeader ("Attribute" , "Value" )
101101
102- table .AddRow ("ID" , intake .GetId ())
103- table .AddRow ("Name" , intake .GetDisplayName ())
104- table .AddRow ("State" , intake .GetState ())
105- table .AddRow ("Runner ID" , intake .GetIntakeRunnerId ())
106- table .AddRow ("Created" , intake .GetCreateTime ())
107- table .AddRow ("Labels" , intake .GetLabels ())
102+ table .AddRow ("ID" , intk .GetId ())
103+ table .AddRow ("Name" , intk .GetDisplayName ())
104+ table .AddRow ("State" , intk .GetState ())
105+ table .AddRow ("Runner ID" , intk .GetIntakeRunnerId ())
106+ table .AddRow ("Created" , intk .GetCreateTime ())
107+ table .AddRow ("Labels" , intk .GetLabels ())
108108
109- if description := intake .GetDescription (); description != "" {
109+ if description := intk .GetDescription (); description != "" {
110110 table .AddRow ("Description" , description )
111111 }
112112
113- if failureMessage := intake .GetFailureMessage (); failureMessage != "" {
113+ if failureMessage := intk .GetFailureMessage (); failureMessage != "" {
114114 table .AddRow ("Failure Message" , failureMessage )
115115 }
116116
117117 table .AddSeparator ()
118- table .AddRow ("Ingestion URI" , intake .GetUri ())
119- table .AddRow ("Topic" , intake .GetTopic ())
120- table .AddRow ("Dead Letter Topic" , intake .GetDeadLetterTopic ())
121- table .AddRow ("Undelivered Messages" , intake .GetUndeliveredMessageCount ())
118+ table .AddRow ("Ingestion URI" , intk .GetUri ())
119+ table .AddRow ("Topic" , intk .GetTopic ())
120+ table .AddRow ("Dead Letter Topic" , intk .GetDeadLetterTopic ())
121+ table .AddRow ("Undelivered Messages" , intk .GetUndeliveredMessageCount ())
122122
123123 table .AddSeparator ()
124- catalog := intake .GetCatalog ()
124+ catalog := intk .GetCatalog ()
125125 table .AddRow ("Catalog URI" , catalog .GetUri ())
126126 table .AddRow ("Catalog Warehouse" , catalog .GetWarehouse ())
127127 if namespace := catalog .GetNamespace (); namespace != "" {
0 commit comments