Skip to content

Commit 712b30d

Browse files
authored
Merge branch 'main' into feat/STACKITSDK-375-intake-refactor-wait-handler
2 parents 3b4282c + 37793bc commit 712b30d

838 files changed

Lines changed: 39196 additions & 3788 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 100 additions & 1 deletion
Large diffs are not rendered by default.

core/clients/key_flow.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ func (c *KeyFlow) SetToken(accessToken, refreshToken string) error {
183183
c.tokenMutex.Lock()
184184
c.token = &TokenResponseBody{
185185
AccessToken: accessToken,
186-
ExpiresIn: int(exp.Time.Unix()),
186+
ExpiresIn: int(exp.Unix()),
187187
RefreshToken: refreshToken,
188188
Scope: defaultScope,
189189
TokenType: defaultTokenType,
@@ -334,6 +334,7 @@ func (c *KeyFlow) createAccessToken() (err error) {
334334

335335
// createAccessTokenWithRefreshToken creates an access token using
336336
// an existing pre-validated refresh token
337+
//
337338
// Deprecated: This method will be removed in future versions. Access tokens are going to be refreshed without refresh token.
338339
// This will be removed after 2026-07-01.
339340
func (c *KeyFlow) createAccessTokenWithRefreshToken() (err error) {

core/clients/key_flow_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ func TestKeyFlowInit(t *testing.T) {
104104
invalidPrivateKey: true,
105105
wantErr: true,
106106
},
107+
//nolint:gosec // G101: These are only test values
107108
{
108109
name: "ok-custom-token-endpoint",
109110
serviceAccountKey: fixtureServiceAccountKey(func(s *ServiceAccountKeyResponse) {

core/clients/workload_identity_flow_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ func TestWorkloadIdentityFlowRoundTrip(t *testing.T) {
181181
for _, tt := range tests {
182182
t.Run(tt.name, func(t *testing.T) {
183183
authServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
184-
err := r.ParseForm()
184+
err := r.ParseForm() //nolint:gosec // G120: Safe to bypass inside unit tests
185185
if err != nil {
186186
t.Fatalf("failed to parse form: %v", err)
187187
}

core/config/config.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -430,9 +430,9 @@ func (sc ServerConfigurations) URL(index int, variables map[string]string) (stri
430430
if !found {
431431
return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues)
432432
}
433-
serverUrl = strings.Replace(serverUrl, "{"+name+"}", value, -1)
433+
serverUrl = strings.ReplaceAll(serverUrl, "{"+name+"}", value)
434434
} else {
435-
serverUrl = strings.Replace(serverUrl, "{"+name+"}", variable.DefaultValue, -1)
435+
serverUrl = strings.ReplaceAll(serverUrl, "{"+name+"}", variable.DefaultValue)
436436
}
437437
}
438438
return serverUrl, nil
@@ -554,7 +554,7 @@ func ConfigureRegion(cfg *Configuration) error {
554554
}
555555
// API is regional (not global)
556556
if containsCaseSensitive(availableRegions, cfg.Region) {
557-
cfgUrl := strings.Replace(servers[0].URL, "{region}", fmt.Sprintf("%s.", cfg.Region), -1)
557+
cfgUrl := strings.ReplaceAll(servers[0].URL, "{region}", fmt.Sprintf("%s.", cfg.Region))
558558
cfg.Servers = ServerConfigurations{
559559
{
560560
URL: cfgUrl,
@@ -574,7 +574,7 @@ func ConfigureRegion(cfg *Configuration) error {
574574
}
575575
// If the url is a template, generated using deprecated config.json, the region variable is replaced
576576
// If the url is already configured, there is no region variable and it remains the same
577-
cfgUrl := strings.Replace(servers[0].URL, "{region}", "", -1)
577+
cfgUrl := strings.ReplaceAll(servers[0].URL, "{region}", "")
578578
cfg.Servers = ServerConfigurations{
579579
{
580580
URL: cfgUrl,

examples/auditlog/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ replace github.com/stackitcloud/stackit-sdk-go/services/auditlog => ../../servic
77

88
require (
99
github.com/stackitcloud/stackit-sdk-go/core v0.26.0
10-
github.com/stackitcloud/stackit-sdk-go/services/auditlog v0.4.2
10+
github.com/stackitcloud/stackit-sdk-go/services/auditlog v0.5.0
1111
)
1212

1313
require (

examples/authentication/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ replace github.com/stackitcloud/stackit-sdk-go/services/dns => ../../services/dn
77

88
require (
99
github.com/stackitcloud/stackit-sdk-go/core v0.26.0
10-
github.com/stackitcloud/stackit-sdk-go/services/dns v0.20.2
10+
github.com/stackitcloud/stackit-sdk-go/services/dns v0.21.0
1111
)
1212

1313
require (

examples/backgroundrefresh/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ replace github.com/stackitcloud/stackit-sdk-go/services/dns => ../../services/dn
77

88
require (
99
github.com/stackitcloud/stackit-sdk-go/core v0.26.0
10-
github.com/stackitcloud/stackit-sdk-go/services/dns v0.20.2
10+
github.com/stackitcloud/stackit-sdk-go/services/dns v0.21.0
1111
)
1212

1313
require (

examples/configuration/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ replace github.com/stackitcloud/stackit-sdk-go/services/dns => ../../services/dn
77

88
require (
99
github.com/stackitcloud/stackit-sdk-go/core v0.26.0
10-
github.com/stackitcloud/stackit-sdk-go/services/dns v0.20.2
10+
github.com/stackitcloud/stackit-sdk-go/services/dns v0.21.0
1111
github.com/stackitcloud/stackit-sdk-go/services/postgresql v0.12.1
1212
)
1313

examples/cost/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ replace github.com/stackitcloud/stackit-sdk-go/services/cost => ../../services/c
77

88
require (
99
github.com/stackitcloud/stackit-sdk-go/core v0.26.0
10-
github.com/stackitcloud/stackit-sdk-go/services/cost v0.3.2
10+
github.com/stackitcloud/stackit-sdk-go/services/cost v0.4.0
1111
)
1212

1313
require (

0 commit comments

Comments
 (0)