Skip to content

Commit d03ac8d

Browse files
feat(rabbitmq): add multi API version support (#5518)
relates to STACKITSDK-349 Co-authored-by: Ruben Hoenle <Ruben.Hoenle@stackit.cloud>
1 parent 8cc2462 commit d03ac8d

File tree

77 files changed

+13810
-41
lines changed

Some content is hidden

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

77 files changed

+13810
-41
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@
8383
- `v1api`: New package which should be used for communication with the STACKIT modelserving API in the future
8484
- **Deprecation:** The contents in the root of this SDK module including the `wait` package are marked as deprecated and will be removed after 2026-09-30. Switch to the new `v0api` package instead.
8585
- **Dependencies:** Bump STACKIT SDK core module from `v0.21.1` to `v0.22.0`
86+
- `rabbitmq`: [v0.27.0](services/rabbitmq/CHANGELOG.md#v0270)
87+
- **Feature:** Introduction of multi API version support for the rabbitmq SDK module. For more details please see the announcement on GitHub: https://github.com/stackitcloud/stackit-sdk-go/discussions/5062
88+
- `v1api`: New package which should be used for communication with the STACKIT rabbitmq API in the future
89+
- **Deprecation:** The contents in the root of this SDK module including the `wait` package are marked as deprecated and will be removed after 2026-09-30. Switch to the new `v0api` package instead.
90+
- **Dependencies:** Bump STACKIT SDK core module from `v0.21.1` to `v0.22.0`
8691

8792
## Release (2026-02-20)
8893
- `core`: [v0.21.1](core/CHANGELOG.md#v0211)

examples/rabbitmq/go.mod

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ module github.com/stackitcloud/stackit-sdk-go/examples/rabbitmq
22

33
go 1.21
44

5+
// This is not needed in production. This is only here to point the golangci linter to the local version instead of the last release on GitHub.
6+
replace github.com/stackitcloud/stackit-sdk-go/services/rabbitmq => ../../services/rabbitmq
7+
58
require (
6-
github.com/stackitcloud/stackit-sdk-go/core v0.21.1
9+
github.com/stackitcloud/stackit-sdk-go/core v0.22.0
710
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.26.0
811
)
912

examples/rabbitmq/go.sum

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,5 @@ 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.21.1 h1:Y/PcAgM7DPYMNqum0MLv4n1mF9ieuevzcCIZYQfm3Ts=
8-
github.com/stackitcloud/stackit-sdk-go/core v0.21.1/go.mod h1:osMglDby4csGZ5sIfhNyYq1bS1TxIdPY88+skE/kkmI=
9-
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.26.0 h1:/8lmviszgrB+0Cz7HdhFELyTiTeqIs7LfnI6sNX4rW8=
10-
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.26.0/go.mod h1:hnhvlLX1Y71R8KIQqLBeoSZqkU5ZJOG0J4wz0LeUdaw=
7+
github.com/stackitcloud/stackit-sdk-go/core v0.22.0 h1:6rViz7GnNwXSh51Lur5xuDzO8EWSZfN9J0HvEkBKq6c=
8+
github.com/stackitcloud/stackit-sdk-go/core v0.22.0/go.mod h1:osMglDby4csGZ5sIfhNyYq1bS1TxIdPY88+skE/kkmI=

examples/rabbitmq/rabbitmq.go

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import (
66
"os"
77

88
"github.com/stackitcloud/stackit-sdk-go/core/config"
9-
"github.com/stackitcloud/stackit-sdk-go/core/utils"
10-
"github.com/stackitcloud/stackit-sdk-go/services/rabbitmq"
9+
rabbitmq "github.com/stackitcloud/stackit-sdk-go/services/rabbitmq/v1api"
1110
)
1211

1312
func main() {
@@ -24,15 +23,15 @@ func main() {
2423
}
2524

2625
// Get the rabbitmq instances for your project
27-
getInstancesResp, err := rabbitmqClient.ListInstances(context.Background(), projectId).Execute()
26+
getInstancesResp, err := rabbitmqClient.DefaultAPI.ListInstances(context.Background(), projectId).Execute()
2827
if err != nil {
2928
fmt.Fprintf(os.Stderr, "Error when calling `GetInstances`: %v\n", err)
3029
} else {
31-
fmt.Printf("Number of instances: %v\n", len(*getInstancesResp.Instances))
30+
fmt.Printf("Number of instances: %v\n", len(getInstancesResp.Instances))
3231
}
3332

3433
// Get the rabbitmq offerings for your project
35-
getOfferingsResp, err := rabbitmqClient.ListOfferings(context.Background(), projectId).Execute()
34+
getOfferingsResp, err := rabbitmqClient.DefaultAPI.ListOfferings(context.Background(), projectId).Execute()
3635
if err != nil {
3736
fmt.Fprintf(os.Stderr, "Error when calling `GetOfferings`: %v\n", err)
3837
} else {
@@ -41,14 +40,14 @@ func main() {
4140

4241
// Create a rabbitmq Instance
4342
createInstancePayload := rabbitmq.CreateInstancePayload{
44-
InstanceName: utils.Ptr("exampleInstance"),
43+
InstanceName: "exampleInstance",
4544
Parameters: &rabbitmq.InstanceParameters{},
46-
PlanId: utils.Ptr(planId),
45+
PlanId: planId,
4746
}
48-
createInstanceResp, err := rabbitmqClient.CreateInstance(context.Background(), projectId).CreateInstancePayload(createInstancePayload).Execute()
47+
createInstanceResp, err := rabbitmqClient.DefaultAPI.CreateInstance(context.Background(), projectId).CreateInstancePayload(createInstancePayload).Execute()
4948
if err != nil {
5049
fmt.Fprintf(os.Stderr, "Error when calling `CreateInstance`: %v\n", err)
5150
} else {
52-
fmt.Printf("Created instance with instance id \"%s\".\n", *createInstanceResp.InstanceId)
51+
fmt.Printf("Created instance with instance id \"%s\".\n", createInstanceResp.InstanceId)
5352
}
5453
}

services/rabbitmq/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## v0.27.0
2+
- **Feature:** Introduction of multi API version support for the rabbitmq SDK module. For more details please see the announcement on GitHub: https://github.com/stackitcloud/stackit-sdk-go/discussions/5062
3+
- `v1api`: New package which should be used for communication with the STACKIT rabbitmq API in the future
4+
- **Deprecation:** The contents in the root of this SDK module including the `wait` package are marked as deprecated and will be removed after 2026-09-30. Switch to the new `v0api` package instead.
5+
- **Dependencies:** Bump STACKIT SDK core module from `v0.21.1` to `v0.22.0`
6+
17
## v0.26.0
28
- **Breaking change:** `SetTLSProtocols` now accepts a slice of strings instead of a single string
39

services/rabbitmq/VERSION

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

0 commit comments

Comments
 (0)