Skip to content

Commit cc6f6a5

Browse files
committed
chore(logme): migrate to new sdk versioning
1 parent 23b6292 commit cc6f6a5

25 files changed

Lines changed: 267 additions & 253 deletions

File tree

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ require (
3636
github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.12.0
3737
github.com/stackitcloud/stackit-sdk-go/services/serviceenablement v1.2.7
3838
github.com/stackitcloud/stackit-sdk-go/services/ske v1.11.0
39-
github.com/stackitcloud/stackit-sdk-go/services/vpn v0.14.0
4039
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.11.0
40+
github.com/stackitcloud/stackit-sdk-go/services/vpn v0.14.0
4141
github.com/zalando/go-keyring v0.2.6
4242
golang.org/x/mod v0.34.0
4343
golang.org/x/oauth2 v0.35.0
@@ -267,7 +267,7 @@ require (
267267
github.com/spf13/cast v1.10.0 // indirect
268268
github.com/stackitcloud/stackit-sdk-go/services/kms v1.3.2
269269
github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.14.0
270-
github.com/stackitcloud/stackit-sdk-go/services/logme v0.25.6
270+
github.com/stackitcloud/stackit-sdk-go/services/logme v0.30.0
271271
github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.25.6
272272
github.com/stackitcloud/stackit-sdk-go/services/objectstorage v1.7.0
273273
github.com/stackitcloud/stackit-sdk-go/services/observability v0.17.0

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -616,8 +616,8 @@ github.com/stackitcloud/stackit-sdk-go/services/kms v1.3.2 h1:2ulSL2IkIAKND59eAj
616616
github.com/stackitcloud/stackit-sdk-go/services/kms v1.3.2/go.mod h1:cuIaMMiHeHQsbvy7BOFMutoV3QtN+ZBx7Tg3GmYUw7s=
617617
github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.14.0 h1:1dvL7tX91ziklayQmOupniE3jM4D5Nbtc0auNcx2p18=
618618
github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.14.0/go.mod h1:+Ld3dn648I+YKcBV3fEkYpDSr3fel421+LurJGywSBs=
619-
github.com/stackitcloud/stackit-sdk-go/services/logme v0.25.6 h1:4x30lC+YBmo7XpsAzTn0W+C/oP5flnLVgIh5u3O/P0o=
620-
github.com/stackitcloud/stackit-sdk-go/services/logme v0.25.6/go.mod h1:ewaYUiZcBTSS6urE5zEJBPCqxu70w2IjnBHCvnKdFKE=
619+
github.com/stackitcloud/stackit-sdk-go/services/logme v0.30.0 h1:csZlzmvAB+klgUQo7AjoGO+YkpdxRFY3yE5Y7SDeB5w=
620+
github.com/stackitcloud/stackit-sdk-go/services/logme v0.30.0/go.mod h1:JDOOYaGgcBts2x52nKPRMFgSZe7qqOFmfz1xIXCQgRY=
621621
github.com/stackitcloud/stackit-sdk-go/services/logs v0.5.2 h1:vr4atxFRT+EL+DqONMT5R44f7AzEMbePa9U7PEE0THU=
622622
github.com/stackitcloud/stackit-sdk-go/services/logs v0.5.2/go.mod h1:CAPsiTX7osAImfrG5RnIjaJ/Iz3QpoBKuH2fS346wuQ=
623623
github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.25.6 h1:Y/byRjX2u/OZl0gKS/Rau6ob2bDyv26xnw6A6JNkKJk=
@@ -654,10 +654,10 @@ github.com/stackitcloud/stackit-sdk-go/services/sfs v0.9.0 h1:JWAFnskRbNKT8x62pZ
654654
github.com/stackitcloud/stackit-sdk-go/services/sfs v0.9.0/go.mod h1:jMlBoXqrPNX5nXbo6oT7exalqilw1jiLPoIp4Cn0CdI=
655655
github.com/stackitcloud/stackit-sdk-go/services/ske v1.11.0 h1:QoKyQPe8FqDqJLNgE5uRlZ/y1c1GUxjV1DDLu5QEBD8=
656656
github.com/stackitcloud/stackit-sdk-go/services/ske v1.11.0/go.mod h1:KhVYCR58wETqdI7Quwhe3OR3BhB2T/b7DzaMsfDnr8g=
657-
github.com/stackitcloud/stackit-sdk-go/services/vpn v0.14.0 h1:LMgbzhPunuelsIsfyEj/5O/aYfNcg/eGHsnZ7AZOhYg=
658-
github.com/stackitcloud/stackit-sdk-go/services/vpn v0.14.0/go.mod h1:toIjQk1dhxdUFVyCWJJja0w/0nFpDid8MWX0ukQfvfo=
659657
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.11.0 h1:PwjQeupEnXxhu+uWCUzO/hUfL4yqNblOcZbP2jvaQtU=
660658
github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.11.0/go.mod h1:AiUoMAqQcOlMgDtkVJlqI7P/VGD5xjN3dYjERGnwN/M=
659+
github.com/stackitcloud/stackit-sdk-go/services/vpn v0.14.0 h1:LMgbzhPunuelsIsfyEj/5O/aYfNcg/eGHsnZ7AZOhYg=
660+
github.com/stackitcloud/stackit-sdk-go/services/vpn v0.14.0/go.mod h1:toIjQk1dhxdUFVyCWJJja0w/0nFpDid8MWX0ukQfvfo=
661661
github.com/stbenjam/no-sprintf-host-port v0.3.1 h1:AyX7+dxI4IdLBPtDbsGAyqiTSLpCP9hWRrXQDU4Cm/g=
662662
github.com/stbenjam/no-sprintf-host-port v0.3.1/go.mod h1:ODbZesTCHMVKthBHskvUUexdcNHAQRXk9NpSsL8p/HQ=
663663
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=

internal/cmd/logme/credentials/create/create.go

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"github.com/stackitcloud/stackit-cli/internal/pkg/types"
88

99
"github.com/spf13/cobra"
10-
"github.com/stackitcloud/stackit-sdk-go/services/logme"
10+
logme "github.com/stackitcloud/stackit-sdk-go/services/logme/v1api"
1111

1212
"github.com/stackitcloud/stackit-cli/internal/pkg/args"
1313
"github.com/stackitcloud/stackit-cli/internal/pkg/errors"
@@ -51,14 +51,13 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
5151
if err != nil {
5252
return err
5353
}
54-
5554
// Configure API client
5655
apiClient, err := client.ConfigureClient(params.Printer, params.CliVersion)
5756
if err != nil {
5857
return err
5958
}
6059

61-
instanceLabel, err := logmeUtils.GetInstanceName(ctx, apiClient, model.ProjectId, model.InstanceId)
60+
instanceLabel, err := logmeUtils.GetInstanceName(ctx, apiClient.DefaultAPI, model.ProjectId, model.InstanceId)
6261
if err != nil {
6362
params.Printer.Debug(print.ErrorLevel, "get instance name: %v", err)
6463
instanceLabel = model.InstanceId
@@ -109,7 +108,7 @@ func parseInput(p *print.Printer, cmd *cobra.Command, _ []string) (*inputModel,
109108
}
110109

111110
func buildRequest(ctx context.Context, model *inputModel, apiClient *logme.APIClient) logme.ApiCreateCredentialsRequest {
112-
req := apiClient.CreateCredentials(ctx, model.ProjectId, model.InstanceId)
111+
req := apiClient.DefaultAPI.CreateCredentials(ctx, model.ProjectId, model.InstanceId)
113112
return req
114113
}
115114

@@ -118,26 +117,26 @@ func outputResult(p *print.Printer, outputFormat string, showPassword bool, inst
118117
return fmt.Errorf("credentials response is empty")
119118
}
120119

121-
if !showPassword && resp.HasRaw() && resp.Raw.Credentials != nil {
122-
resp.Raw.Credentials.Password = utils.Ptr("hidden")
120+
if !showPassword && resp.HasRaw() {
121+
resp.Raw.Credentials.Password = "hidden"
123122
}
124123

125124
return p.OutputResult(outputFormat, resp, func() error {
126-
p.Outputf("Created credentials for instance %q. Credentials ID: %s\n\n", instanceLabel, utils.PtrString(resp.Id))
125+
p.Outputf("Created credentials for instance %q. Credentials ID: %s\n\n", instanceLabel, resp.Id)
127126
// The username field cannot be set by the user so we only display it if it's not returned empty
128-
if resp.HasRaw() && resp.Raw.Credentials != nil {
129-
if username := resp.Raw.Credentials.Username; username != nil && *username != "" {
130-
p.Outputf("Username: %s\n", utils.PtrString(username))
127+
if resp.HasRaw() {
128+
if username := resp.Raw.Credentials.Username; username != "" {
129+
p.Outputf("Username: %s\n", username)
131130
}
132131
if !showPassword {
133132
p.Outputf("Password: <hidden>\n")
134133
} else {
135-
p.Outputf("Password: %s\n", utils.PtrString(resp.Raw.Credentials.Password))
134+
p.Outputf("Password: %s\n", resp.Raw.Credentials.Password)
136135
}
137-
p.Outputf("Host: %s\n", utils.PtrString(resp.Raw.Credentials.Host))
136+
p.Outputf("Host: %s\n", resp.Raw.Credentials.Host)
138137
p.Outputf("Port: %s\n", utils.PtrString(resp.Raw.Credentials.Port))
139138
}
140-
p.Outputf("URI: %s\n", utils.PtrString(resp.Uri))
139+
p.Outputf("URI: %s\n", resp.Uri)
141140
return nil
142141
})
143142
}

internal/cmd/logme/credentials/create/create_test.go

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,21 @@ import (
44
"context"
55
"testing"
66

7-
"github.com/stackitcloud/stackit-cli/internal/pkg/globalflags"
8-
"github.com/stackitcloud/stackit-cli/internal/pkg/testparams"
9-
"github.com/stackitcloud/stackit-cli/internal/pkg/testutils"
10-
117
"github.com/google/go-cmp/cmp"
128
"github.com/google/go-cmp/cmp/cmpopts"
139
"github.com/google/uuid"
14-
"github.com/stackitcloud/stackit-sdk-go/services/logme"
10+
"github.com/stackitcloud/stackit-cli/internal/pkg/globalflags"
11+
"github.com/stackitcloud/stackit-cli/internal/pkg/testparams"
12+
"github.com/stackitcloud/stackit-cli/internal/pkg/testutils"
13+
logme "github.com/stackitcloud/stackit-sdk-go/services/logme/v1api"
1514
)
1615

1716
var projectIdFlag = globalflags.ProjectIdFlag
1817

1918
type testCtxKey struct{}
2019

2120
var testCtx = context.WithValue(context.Background(), testCtxKey{}, "foo")
22-
var testClient = &logme.APIClient{}
21+
var testClient = &logme.APIClient{DefaultAPI: &logme.DefaultAPIService{}}
2322
var testProjectId = uuid.NewString()
2423
var testInstanceId = uuid.NewString()
2524

@@ -49,7 +48,7 @@ func fixtureInputModel(mods ...func(model *inputModel)) *inputModel {
4948
}
5049

5150
func fixtureRequest(mods ...func(request *logme.ApiCreateCredentialsRequest)) logme.ApiCreateCredentialsRequest {
52-
request := testClient.CreateCredentials(testCtx, testProjectId, testInstanceId)
51+
request := testClient.DefaultAPI.CreateCredentials(testCtx, testProjectId, testInstanceId)
5352
for _, mod := range mods {
5453
mod(&request)
5554
}
@@ -155,7 +154,7 @@ func TestBuildRequest(t *testing.T) {
155154

156155
diff := cmp.Diff(request, tt.expectedRequest,
157156
cmp.AllowUnexported(tt.expectedRequest),
158-
cmpopts.EquateComparable(testCtx),
157+
cmpopts.EquateComparable(testCtx, logme.ApiCreateCredentialsRequest{}),
159158
)
160159
if diff != "" {
161160
t.Fatalf("Data does not match: %s", diff)

internal/cmd/logme/credentials/delete/delete.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
"github.com/stackitcloud/stackit-cli/internal/pkg/utils"
1818

1919
"github.com/spf13/cobra"
20-
"github.com/stackitcloud/stackit-sdk-go/services/logme"
20+
logme "github.com/stackitcloud/stackit-sdk-go/services/logme/v1api"
2121
)
2222

2323
const (
@@ -56,13 +56,13 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
5656
return err
5757
}
5858

59-
instanceLabel, err := logmeUtils.GetInstanceName(ctx, apiClient, model.ProjectId, model.InstanceId)
59+
instanceLabel, err := logmeUtils.GetInstanceName(ctx, apiClient.DefaultAPI, model.ProjectId, model.InstanceId)
6060
if err != nil {
6161
params.Printer.Debug(print.ErrorLevel, "get instance name: %v", err)
6262
instanceLabel = model.InstanceId
6363
}
6464

65-
credentialsLabel, err := logmeUtils.GetCredentialsUsername(ctx, apiClient, model.ProjectId, model.InstanceId, model.CredentialsId)
65+
credentialsLabel, err := logmeUtils.GetCredentialsUsername(ctx, apiClient.DefaultAPI, model.ProjectId, model.InstanceId, model.CredentialsId)
6666
if err != nil {
6767
params.Printer.Debug(print.ErrorLevel, "get credentials username: %v", err)
6868
credentialsLabel = model.CredentialsId
@@ -115,6 +115,6 @@ func parseInput(p *print.Printer, cmd *cobra.Command, inputArgs []string) (*inpu
115115
}
116116

117117
func buildRequest(ctx context.Context, model *inputModel, apiClient *logme.APIClient) logme.ApiDeleteCredentialsRequest {
118-
req := apiClient.DeleteCredentials(ctx, model.ProjectId, model.InstanceId, model.CredentialsId)
118+
req := apiClient.DefaultAPI.DeleteCredentials(ctx, model.ProjectId, model.InstanceId, model.CredentialsId)
119119
return req
120120
}

internal/cmd/logme/credentials/delete/delete_test.go

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,19 @@ import (
1010
"github.com/google/go-cmp/cmp"
1111
"github.com/google/go-cmp/cmp/cmpopts"
1212
"github.com/google/uuid"
13-
"github.com/stackitcloud/stackit-sdk-go/services/logme"
13+
logme "github.com/stackitcloud/stackit-sdk-go/services/logme/v1api"
1414
)
1515

1616
var projectIdFlag = globalflags.ProjectIdFlag
1717

1818
type testCtxKey struct{}
1919

2020
var testCtx = context.WithValue(context.Background(), testCtxKey{}, "foo")
21-
var testClient = &logme.APIClient{}
21+
var testClient = &logme.APIClient{DefaultAPI: &logme.DefaultAPIService{}}
2222
var testProjectId = uuid.NewString()
2323
var testInstanceId = uuid.NewString()
2424
var testCredentialsId = uuid.NewString()
25+
var testRegion = "region"
2526

2627
func fixtureArgValues(mods ...func(argValues []string)) []string {
2728
argValues := []string{
@@ -35,8 +36,9 @@ func fixtureArgValues(mods ...func(argValues []string)) []string {
3536

3637
func fixtureFlagValues(mods ...func(flagValues map[string]string)) map[string]string {
3738
flagValues := map[string]string{
38-
projectIdFlag: testProjectId,
39-
instanceIdFlag: testInstanceId,
39+
projectIdFlag: testProjectId,
40+
instanceIdFlag: testInstanceId,
41+
globalflags.RegionFlag: testRegion,
4042
}
4143
for _, mod := range mods {
4244
mod(flagValues)
@@ -48,6 +50,7 @@ func fixtureInputModel(mods ...func(model *inputModel)) *inputModel {
4850
model := &inputModel{
4951
GlobalFlagModel: &globalflags.GlobalFlagModel{
5052
ProjectId: testProjectId,
53+
Region: testRegion,
5154
Verbosity: globalflags.VerbosityDefault,
5255
},
5356
InstanceId: testInstanceId,
@@ -60,7 +63,7 @@ func fixtureInputModel(mods ...func(model *inputModel)) *inputModel {
6063
}
6164

6265
func fixtureRequest(mods ...func(request *logme.ApiDeleteCredentialsRequest)) logme.ApiDeleteCredentialsRequest {
63-
request := testClient.DeleteCredentials(testCtx, testProjectId, testInstanceId, testCredentialsId)
66+
request := testClient.DefaultAPI.DeleteCredentials(testCtx, testProjectId, testInstanceId, testCredentialsId)
6467
for _, mod := range mods {
6568
mod(&request)
6669
}
@@ -188,7 +191,7 @@ func TestBuildRequest(t *testing.T) {
188191

189192
diff := cmp.Diff(request, tt.expectedRequest,
190193
cmp.AllowUnexported(tt.expectedRequest),
191-
cmpopts.EquateComparable(testCtx),
194+
cmpopts.EquateComparable(testCtx, logme.ApiDeleteCredentialsRequest{}),
192195
)
193196
if diff != "" {
194197
t.Fatalf("Data does not match: %s", diff)

internal/cmd/logme/credentials/describe/describe.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
"github.com/stackitcloud/stackit-cli/internal/pkg/utils"
1818

1919
"github.com/spf13/cobra"
20-
"github.com/stackitcloud/stackit-sdk-go/services/logme"
20+
logme "github.com/stackitcloud/stackit-sdk-go/services/logme/v1api"
2121
)
2222

2323
const (
@@ -99,7 +99,7 @@ func parseInput(p *print.Printer, cmd *cobra.Command, inputArgs []string) (*inpu
9999
}
100100

101101
func buildRequest(ctx context.Context, model *inputModel, apiClient *logme.APIClient) logme.ApiGetCredentialsRequest {
102-
req := apiClient.GetCredentials(ctx, model.ProjectId, model.InstanceId, model.CredentialsId)
102+
req := apiClient.DefaultAPI.GetCredentials(ctx, model.ProjectId, model.InstanceId, model.CredentialsId)
103103
return req
104104
}
105105

@@ -110,19 +110,19 @@ func outputResult(p *print.Printer, outputFormat string, credentials *logme.Cred
110110

111111
return p.OutputResult(outputFormat, credentials, func() error {
112112
table := tables.NewTable()
113-
table.AddRow("ID", utils.PtrString(credentials.Id))
113+
table.AddRow("ID", credentials.Id)
114114
table.AddSeparator()
115115
// The username field cannot be set by the user so we only display it if it's not returned empty
116116
if raw := credentials.Raw; raw != nil {
117-
if cred := raw.Credentials; cred != nil {
118-
if username := cred.Username; username != nil && *username != "" {
119-
table.AddRow("USERNAME", *username)
120-
table.AddSeparator()
121-
}
122-
table.AddRow("PASSWORD", utils.PtrString(cred.Password))
117+
cred := raw.Credentials
118+
119+
if username := cred.Username; username != "" {
120+
table.AddRow("USERNAME", username)
123121
table.AddSeparator()
124-
table.AddRow("URI", utils.PtrString(cred.Uri))
125122
}
123+
table.AddRow("PASSWORD", cred.Password)
124+
table.AddSeparator()
125+
table.AddRow("URI", utils.PtrString(cred.Uri))
126126
}
127127
err := table.Display(p)
128128
if err != nil {

internal/cmd/logme/credentials/describe/describe_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ import (
1111
"github.com/google/go-cmp/cmp"
1212
"github.com/google/go-cmp/cmp/cmpopts"
1313
"github.com/google/uuid"
14-
"github.com/stackitcloud/stackit-sdk-go/services/logme"
14+
logme "github.com/stackitcloud/stackit-sdk-go/services/logme/v1api"
1515
)
1616

1717
var projectIdFlag = globalflags.ProjectIdFlag
1818

1919
type testCtxKey struct{}
2020

2121
var testCtx = context.WithValue(context.Background(), testCtxKey{}, "foo")
22-
var testClient = &logme.APIClient{}
22+
var testClient = &logme.APIClient{DefaultAPI: &logme.DefaultAPIService{}}
2323
var testProjectId = uuid.NewString()
2424
var testInstanceId = uuid.NewString()
2525
var testCredentialsId = uuid.NewString()
@@ -61,7 +61,7 @@ func fixtureInputModel(mods ...func(model *inputModel)) *inputModel {
6161
}
6262

6363
func fixtureRequest(mods ...func(request *logme.ApiGetCredentialsRequest)) logme.ApiGetCredentialsRequest {
64-
request := testClient.GetCredentials(testCtx, testProjectId, testInstanceId, testCredentialsId)
64+
request := testClient.DefaultAPI.GetCredentials(testCtx, testProjectId, testInstanceId, testCredentialsId)
6565
for _, mod := range mods {
6666
mod(&request)
6767
}
@@ -189,7 +189,7 @@ func TestBuildRequest(t *testing.T) {
189189

190190
diff := cmp.Diff(request, tt.expectedRequest,
191191
cmp.AllowUnexported(tt.expectedRequest),
192-
cmpopts.EquateComparable(testCtx),
192+
cmpopts.EquateComparable(testCtx, logme.ApiGetCredentialsRequest{}),
193193
)
194194
if diff != "" {
195195
t.Fatalf("Data does not match: %s", diff)

internal/cmd/logme/credentials/list/list.go

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66

77
"github.com/stackitcloud/stackit-cli/internal/pkg/types"
88

9+
"github.com/spf13/cobra"
910
"github.com/stackitcloud/stackit-cli/internal/pkg/args"
1011
"github.com/stackitcloud/stackit-cli/internal/pkg/errors"
1112
"github.com/stackitcloud/stackit-cli/internal/pkg/examples"
@@ -15,10 +16,7 @@ import (
1516
"github.com/stackitcloud/stackit-cli/internal/pkg/services/logme/client"
1617
logmeUtils "github.com/stackitcloud/stackit-cli/internal/pkg/services/logme/utils"
1718
"github.com/stackitcloud/stackit-cli/internal/pkg/tables"
18-
"github.com/stackitcloud/stackit-cli/internal/pkg/utils"
19-
20-
"github.com/spf13/cobra"
21-
"github.com/stackitcloud/stackit-sdk-go/services/logme"
19+
logme "github.com/stackitcloud/stackit-sdk-go/services/logme/v1api"
2220
)
2321

2422
const (
@@ -70,7 +68,7 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
7068
}
7169
credentials := resp.GetCredentialsList()
7270

73-
instanceLabel, err := logmeUtils.GetInstanceName(ctx, apiClient, model.ProjectId, model.InstanceId)
71+
instanceLabel, err := logmeUtils.GetInstanceName(ctx, apiClient.DefaultAPI, model.ProjectId, model.InstanceId)
7472
if err != nil {
7573
params.Printer.Debug(print.ErrorLevel, "get instance name: %v", err)
7674
instanceLabel = model.InstanceId
@@ -120,7 +118,7 @@ func parseInput(p *print.Printer, cmd *cobra.Command, _ []string) (*inputModel,
120118
}
121119

122120
func buildRequest(ctx context.Context, model *inputModel, apiClient *logme.APIClient) logme.ApiListCredentialsRequest {
123-
req := apiClient.ListCredentials(ctx, model.ProjectId, model.InstanceId)
121+
req := apiClient.DefaultAPI.ListCredentials(ctx, model.ProjectId, model.InstanceId)
124122
return req
125123
}
126124

@@ -135,7 +133,7 @@ func outputResult(p *print.Printer, outputFormat, instanceLabel string, credenti
135133
table.SetHeader("ID")
136134
for i := range credentials {
137135
c := credentials[i]
138-
table.AddRow(utils.PtrString(c.Id))
136+
table.AddRow(c.Id)
139137
}
140138
err := table.Display(p)
141139
if err != nil {

0 commit comments

Comments
 (0)