Skip to content

Commit 1766a2e

Browse files
authored
Merge branch 'main' into yg/onboard-intake-waiters
2 parents d13aca7 + ce14ccb commit 1766a2e

File tree

144 files changed

+819
-261
lines changed

Some content is hidden

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

144 files changed

+819
-261
lines changed

CHANGELOG.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,27 @@
11
## Release (2025-xx-xx)
2-
- `core`: [v0.18.0](core/CHANGELOG.md#v0180)
3-
- **New:** Added duration utils
4-
- `stackitmarketplace`: [v1.16.0](services/stackitmarketplace/CHANGELOG.md#v1160)
5-
- **Breaking Change:** Remove unused `ProjectId` model struct
6-
- `iaas`: [v1.1.0](services/iaas/CHANGELOG.md#v110)
7-
- **Breaking Change:** Removal of unused model structs: `Area`, `AreaConfig`, `AreaPrefixConfigIPv4`, `UpdateAreaIPv4`, `NetworkAreaIPv4`, `CreateAreaAddressFamily`, `CreateAreaIPv4`, `CreateNetworkAddressFamily`, `CreateNetworkIPv4Body`, `CreateNetworkIPv6Body`, `CreateServerPayloadBootVolume`, `CreateServerPayloadNetworking`, `NullableUpdateAreaAddressFamily`, `CreateServerPayloadNetworking`, `UpdateNetworkAddressFamily`, `CreateServerPayloadNetworking`, `CreateServerPayloadNetworking`
2+
- `core`:
3+
- [v0.19.0](core/CHANGELOG.md#v0190)
4+
- **New:** Added new `EnumSliceToStringSlice ` util func
5+
- [v0.18.0](core/CHANGELOG.md#v0180)
6+
- **New:** Added duration utils
7+
- `stackitmarketplace`:
8+
- [v1.17.0](services/stackitmarketplace/CHANGELOG.md#v1170)
9+
- **Feature:** Add new field `Scope` in `CatalogProductPricingOption` model
10+
- **Deprecation:** Deprecated API methods `GetCatalogProduct`, `ListCatalogProducts` and `InquiriesCreateInquiry`
11+
- [v1.16.0](services/stackitmarketplace/CHANGELOG.md#v1160)
12+
- **Breaking Change:** Remove unused `ProjectId` model struct
13+
- `iaas`:
14+
- [v1.2.0](services/iaas/CHANGELOG.md#v120)
15+
- **Feature:** Add new field `Encrypted` to `Backup` model, which indicates if a backup is encrypted
16+
- **Feature:** Add new field `ImportProgress` to `Image` model, which indicates the import progress of an image
17+
- [v1.1.0](services/iaas/CHANGELOG.md#v110)
18+
- **Breaking Change:** Removal of unused model structs: `Area`, `AreaConfig`, `AreaPrefixConfigIPv4`, `UpdateAreaIPv4`, `NetworkAreaIPv4`, `CreateAreaAddressFamily`, `CreateAreaIPv4`, `CreateNetworkAddressFamily`, `CreateNetworkIPv4Body`, `CreateNetworkIPv6Body`, `CreateServerPayloadBootVolume`, `CreateServerPayloadNetworking`, `NullableUpdateAreaAddressFamily`, `CreateServerPayloadNetworking`, `UpdateNetworkAddressFamily`, `CreateServerPayloadNetworking`, `CreateServerPayloadNetworking`
819
- `cdn`: [v2.1.0](services/cdn/CHANGELOG.md#v210)
920
- **Breaking change:** Removal of unused model structs: `GetLogsSearchFiltersResponse`, `PatchLokiLogSink`
21+
- `kms`: [v1.1.0](services/kms/CHANGELOG.md#v110)
22+
- **Bugfix:** Ensure correct state checking in `DisableKeyVersionWaitHandler` and `EnableKeyVersionWaitHandler`
23+
- `alb`: [v0.7.1](services/alb/CHANGELOG.md#v071)
24+
- **Docs** Update description of field `WafConfigName` in `Listener` model
1025

1126
## Release (2025-10-29)
1227
- `stackitmarketplace`: [v1.15.0](services/stackitmarketplace/CHANGELOG.md#v1150)

core/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## v0.19.0
2+
- **New:** Added new `EnumSliceToStringSlice ` util func
3+
14
## v0.18.0
25
- **New:** Added duration utils
36

core/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.18.0
1+
v0.19.0

core/utils/utils.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,17 @@ func Contains[T comparable](slice []T, element T) bool {
1313
}
1414
return false
1515
}
16+
17+
// EnumSliceToStringSlice is a generic function to convert a slice of any type T
18+
// that has the underlying type 'string' to a slice of string.
19+
// The constraint ~string allows T to be any type whose
20+
// underlying type is string (like the enum types from the generated STACKIT SDK modules).
21+
func EnumSliceToStringSlice[T ~string](inputSlice []T) []string {
22+
result := make([]string, len(inputSlice))
23+
24+
for i, element := range inputSlice {
25+
result[i] = string(element)
26+
}
27+
28+
return result
29+
}

core/utils/utils_test.go

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package utils
22

33
import (
4+
"reflect"
45
"testing"
56
)
67

@@ -37,3 +38,51 @@ func TestContainsInt(t *testing.T) {
3738
t.Fatalf("Should not be contained")
3839
}
3940
}
41+
42+
func TestEnumSliceToStringSlice(t *testing.T) {
43+
type TestEnum string
44+
45+
const TESTENUM_CREATING TestEnum = "CREATING"
46+
const TESTENUM_ACTIVE TestEnum = "ACTIVE"
47+
const TESTENUM_UPDATING TestEnum = "UPDATING"
48+
const TESTENUM_DELETING TestEnum = "DELETING"
49+
const TESTENUM_ERROR TestEnum = "ERROR"
50+
51+
type args[T interface{ ~string }] struct {
52+
inputSlice []T
53+
}
54+
type test[T interface{ ~string }] struct {
55+
name string
56+
args args[T]
57+
want []string
58+
}
59+
tests := []test[TestEnum]{
60+
{
61+
name: "default",
62+
args: args[TestEnum]{
63+
inputSlice: []TestEnum{
64+
TESTENUM_CREATING,
65+
TESTENUM_ACTIVE,
66+
TESTENUM_UPDATING,
67+
TESTENUM_DELETING,
68+
TESTENUM_ERROR,
69+
},
70+
},
71+
want: []string{"CREATING", "ACTIVE", "UPDATING", "DELETING", "ERROR"},
72+
},
73+
{
74+
name: "empty input slice",
75+
args: args[TestEnum]{
76+
inputSlice: []TestEnum{},
77+
},
78+
want: []string{},
79+
},
80+
}
81+
for _, tt := range tests {
82+
t.Run(tt.name, func(t *testing.T) {
83+
if got := EnumSliceToStringSlice(tt.args.inputSlice); !reflect.DeepEqual(got, tt.want) {
84+
t.Errorf("EnumSliceToStringSlice() = %v, want %v", got, tt.want)
85+
}
86+
})
87+
}
88+
}

examples/auditlog/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module auditlog
33
go 1.21
44

55
require (
6-
github.com/stackitcloud/stackit-sdk-go/core v0.17.3
6+
github.com/stackitcloud/stackit-sdk-go/core v0.18.0
77
github.com/stackitcloud/stackit-sdk-go/services/auditlog v0.1.0
88
)
99

examples/auditlog/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
44
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
55
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
66
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
7-
github.com/stackitcloud/stackit-sdk-go/core v0.17.3 h1:GsZGmRRc/3GJLmCUnsZswirr5wfLRrwavbnL/renOqg=
8-
github.com/stackitcloud/stackit-sdk-go/core v0.17.3/go.mod h1:HBCXJGPgdRulplDzhrmwC+Dak9B/x0nzNtmOpu+1Ahg=
7+
github.com/stackitcloud/stackit-sdk-go/core v0.18.0 h1:+4v8sjQpQXPihO3crgTp0Kz/XRIi5p7oKV28dw6jsEQ=
8+
github.com/stackitcloud/stackit-sdk-go/core v0.18.0/go.mod h1:fqto7M82ynGhEnpZU6VkQKYWYoFG5goC076JWXTUPRQ=
99
github.com/stackitcloud/stackit-sdk-go/services/auditlog v0.1.0 h1:Y8qhIcp5gWlA0Tj58lSrS48lEB3gH2x56XCpCyHSVfc=
1010
github.com/stackitcloud/stackit-sdk-go/services/auditlog v0.1.0/go.mod h1:vwP9edf2elr3SLz3lH7y5vqhgKIdtfS/xN7wsPTxcwM=

examples/authentication/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/stackitcloud/stackit-sdk-go/examples/authentication
33
go 1.21
44

55
require (
6-
github.com/stackitcloud/stackit-sdk-go/core v0.17.3
6+
github.com/stackitcloud/stackit-sdk-go/core v0.18.0
77
github.com/stackitcloud/stackit-sdk-go/services/dns v0.17.1
88
)
99

examples/authentication/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
44
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
55
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
66
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
7-
github.com/stackitcloud/stackit-sdk-go/core v0.17.3 h1:GsZGmRRc/3GJLmCUnsZswirr5wfLRrwavbnL/renOqg=
8-
github.com/stackitcloud/stackit-sdk-go/core v0.17.3/go.mod h1:HBCXJGPgdRulplDzhrmwC+Dak9B/x0nzNtmOpu+1Ahg=
7+
github.com/stackitcloud/stackit-sdk-go/core v0.18.0 h1:+4v8sjQpQXPihO3crgTp0Kz/XRIi5p7oKV28dw6jsEQ=
8+
github.com/stackitcloud/stackit-sdk-go/core v0.18.0/go.mod h1:fqto7M82ynGhEnpZU6VkQKYWYoFG5goC076JWXTUPRQ=
99
github.com/stackitcloud/stackit-sdk-go/services/dns v0.17.1 h1:CnhAMLql0MNmAeq4roQKN8OpSKX4FSgTU6Eu6detB4I=
1010
github.com/stackitcloud/stackit-sdk-go/services/dns v0.17.1/go.mod h1:7Bx85knfNSBxulPdJUFuBePXNee3cO+sOTYnUG6M+iQ=

examples/authorization/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/stackitcloud/stackit-sdk-go/examples/authorization
33
go 1.21
44

55
require (
6-
github.com/stackitcloud/stackit-sdk-go/core v0.17.3
6+
github.com/stackitcloud/stackit-sdk-go/core v0.18.0
77
github.com/stackitcloud/stackit-sdk-go/services/authorization v0.9.0
88
)
99

0 commit comments

Comments
 (0)