Skip to content

Commit

Permalink
release: 0.1.0-alpha.16 (#64)
Browse files Browse the repository at this point in the history
* feat(api): api update (#63)

* feat(api): api update (#65)

* chore: refactor client tests (#66)

* feat(api): api update (#67)

* release: 0.1.0-alpha.16

---------

Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
  • Loading branch information
stainless-app[bot] authored Jan 29, 2025
1 parent 2ee3943 commit 172ea20
Show file tree
Hide file tree
Showing 16 changed files with 141 additions and 179 deletions.
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.1.0-alpha.15"
".": "0.1.0-alpha.16"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/nirvana-labs%2Fnirvana-d8b14b02cc12fe3d02746b57785b25e6bf1aa4ee26c9148e519a467ca6dfd838.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/nirvana-labs%2Fnirvana-fd4009b8ae32cedd4b3c01020851fe7216717cbdd2a11f003758dc4a0caef76c.yml
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## 0.1.0-alpha.16 (2025-01-29)

Full Changelog: [v0.1.0-alpha.15...v0.1.0-alpha.16](https://github.com/nirvana-labs/nirvana-go/compare/v0.1.0-alpha.15...v0.1.0-alpha.16)

### Features

* **api:** api update ([#63](https://github.com/nirvana-labs/nirvana-go/issues/63)) ([c72e477](https://github.com/nirvana-labs/nirvana-go/commit/c72e477047dbcc7f98a29d4225eb7f4d89b452dd))
* **api:** api update ([#65](https://github.com/nirvana-labs/nirvana-go/issues/65)) ([018ea8e](https://github.com/nirvana-labs/nirvana-go/commit/018ea8e7aafbb986465011cdb5a099077f8d137b))
* **api:** api update ([#67](https://github.com/nirvana-labs/nirvana-go/issues/67)) ([de2bdc6](https://github.com/nirvana-labs/nirvana-go/commit/de2bdc6283877af8d496158e910988c13b6ac977))


### Chores

* refactor client tests ([#66](https://github.com/nirvana-labs/nirvana-go/issues/66)) ([99ad192](https://github.com/nirvana-labs/nirvana-go/commit/99ad1923f00863290310ede2fdcf5d13adc767f1))

## 0.1.0-alpha.15 (2025-01-27)

Full Changelog: [v0.1.0-alpha.14...v0.1.0-alpha.15](https://github.com/nirvana-labs/nirvana-go/compare/v0.1.0-alpha.14...v0.1.0-alpha.15)
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Or to pin the version:
<!-- x-release-please-start-version -->

```sh
go get -u 'github.com/nirvana-labs/nirvana-go@v0.1.0-alpha.15'
go get -u 'github.com/nirvana-labs/nirvana-go@v0.1.0-alpha.16'
```

<!-- x-release-please-end -->
Expand Down Expand Up @@ -66,7 +66,7 @@ func main() {
Ram: nirvana.F(compute.RamParam{
Size: nirvana.F(int64(2)),
}),
Region: nirvana.F(shared.RegionNameAmsterdam),
Region: nirvana.F(shared.RegionNameUsSea1),
SourceAddress: nirvana.F("0.0.0.0/0"),
SSHKey: nirvana.F(compute.SSHKeyParam{
PublicKey: nirvana.F("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC1234567890"),
Expand Down Expand Up @@ -207,7 +207,7 @@ _, err := client.Compute.VMs.New(context.TODO(), compute.VMNewParams{
Ram: nirvana.F(compute.RamParam{
Size: nirvana.F(int64(2)),
}),
Region: nirvana.F(shared.RegionNameAmsterdam),
Region: nirvana.F(shared.RegionNameUsSea1),
SourceAddress: nirvana.F("0.0.0.0/0"),
SSHKey: nirvana.F(compute.SSHKeyParam{
PublicKey: nirvana.F("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC1234567890"),
Expand Down Expand Up @@ -253,7 +253,7 @@ client.Compute.VMs.New(
Ram: nirvana.F(compute.RamParam{
Size: nirvana.F(int64(2)),
}),
Region: nirvana.F(shared.RegionNameAmsterdam),
Region: nirvana.F(shared.RegionNameUsSea1),
SourceAddress: nirvana.F("0.0.0.0/0"),
SSHKey: nirvana.F(compute.SSHKeyParam{
PublicKey: nirvana.F("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC1234567890"),
Expand Down Expand Up @@ -308,7 +308,7 @@ client.Compute.VMs.New(
Ram: nirvana.F(compute.RamParam{
Size: nirvana.F(int64(2)),
}),
Region: nirvana.F(shared.RegionNameAmsterdam),
Region: nirvana.F(shared.RegionNameUsSea1),
SourceAddress: nirvana.F("0.0.0.0/0"),
SSHKey: nirvana.F(compute.SSHKeyParam{
PublicKey: nirvana.F("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC1234567890"),
Expand Down
32 changes: 10 additions & 22 deletions aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,46 +13,34 @@ type Error = apierror.Error
type RegionName = shared.RegionName

// This is an alias to an internal value.
const RegionNameAmsterdam = shared.RegionNameAmsterdam
const RegionNameUsSea1 = shared.RegionNameUsSea1

// This is an alias to an internal value.
const RegionNameChicago = shared.RegionNameChicago
const RegionNameUsSva1 = shared.RegionNameUsSva1

// This is an alias to an internal value.
const RegionNameFrankfurt = shared.RegionNameFrankfurt
const RegionNameUsChi1 = shared.RegionNameUsChi1

// This is an alias to an internal value.
const RegionNameHongkong = shared.RegionNameHongkong
const RegionNameUsWdc1 = shared.RegionNameUsWdc1

// This is an alias to an internal value.
const RegionNameLondon = shared.RegionNameLondon
const RegionNameEuLon1 = shared.RegionNameEuLon1

// This is an alias to an internal value.
const RegionNameMumbai = shared.RegionNameMumbai
const RegionNameEuAms1 = shared.RegionNameEuAms1

// This is an alias to an internal value.
const RegionNameSaopaulo = shared.RegionNameSaopaulo
const RegionNameEuFrk1 = shared.RegionNameEuFrk1

// This is an alias to an internal value.
const RegionNameSeattle = shared.RegionNameSeattle
const RegionNameApMum1 = shared.RegionNameApMum1

// This is an alias to an internal value.
const RegionNameSiliconvalley = shared.RegionNameSiliconvalley
const RegionNameApSin1 = shared.RegionNameApSin1

// This is an alias to an internal value.
const RegionNameSingapore = shared.RegionNameSingapore

// This is an alias to an internal value.
const RegionNameStockholm = shared.RegionNameStockholm

// This is an alias to an internal value.
const RegionNameSydney = shared.RegionNameSydney

// This is an alias to an internal value.
const RegionNameTokyo = shared.RegionNameTokyo

// This is an alias to an internal value.
const RegionNameWashingtondc = shared.RegionNameWashingtondc
const RegionNameApTyo1 = shared.RegionNameApTyo1

// This is an alias to an internal type.
type ResourceStatus = shared.ResourceStatus
Expand Down
58 changes: 29 additions & 29 deletions client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func TestUserAgentHeader(t *testing.T) {
Ram: nirvana.F(compute.RamParam{
Size: nirvana.F(int64(2)),
}),
Region: nirvana.F(shared.RegionNameAmsterdam),
Region: nirvana.F(shared.RegionNameUsSea1),
SourceAddress: nirvana.F("0.0.0.0/0"),
SSHKey: nirvana.F(compute.SSHKeyParam{
PublicKey: nirvana.F("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC1234567890"),
Expand Down Expand Up @@ -81,7 +81,7 @@ func TestRetryAfter(t *testing.T) {
},
}),
)
res, err := client.Compute.VMs.New(context.Background(), compute.VMNewParams{
_, err := client.Compute.VMs.New(context.Background(), compute.VMNewParams{
BootVolume: nirvana.F(compute.VMNewParamsBootVolume{
Size: nirvana.F(int64(100)),
}),
Expand All @@ -95,14 +95,14 @@ func TestRetryAfter(t *testing.T) {
Ram: nirvana.F(compute.RamParam{
Size: nirvana.F(int64(2)),
}),
Region: nirvana.F(shared.RegionNameAmsterdam),
Region: nirvana.F(shared.RegionNameUsSea1),
SourceAddress: nirvana.F("0.0.0.0/0"),
SSHKey: nirvana.F(compute.SSHKeyParam{
PublicKey: nirvana.F("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC1234567890"),
}),
})
if err == nil || res != nil {
t.Error("Expected there to be a cancel error and for the response to be nil")
if err == nil {
t.Error("Expected there to be a cancel error")
}

attempts := len(retryCountHeaders)
Expand Down Expand Up @@ -134,7 +134,7 @@ func TestDeleteRetryCountHeader(t *testing.T) {
}),
option.WithHeaderDel("X-Stainless-Retry-Count"),
)
res, err := client.Compute.VMs.New(context.Background(), compute.VMNewParams{
_, err := client.Compute.VMs.New(context.Background(), compute.VMNewParams{
BootVolume: nirvana.F(compute.VMNewParamsBootVolume{
Size: nirvana.F(int64(100)),
}),
Expand All @@ -148,14 +148,14 @@ func TestDeleteRetryCountHeader(t *testing.T) {
Ram: nirvana.F(compute.RamParam{
Size: nirvana.F(int64(2)),
}),
Region: nirvana.F(shared.RegionNameAmsterdam),
Region: nirvana.F(shared.RegionNameUsSea1),
SourceAddress: nirvana.F("0.0.0.0/0"),
SSHKey: nirvana.F(compute.SSHKeyParam{
PublicKey: nirvana.F("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC1234567890"),
}),
})
if err == nil || res != nil {
t.Error("Expected there to be a cancel error and for the response to be nil")
if err == nil {
t.Error("Expected there to be a cancel error")
}

expectedRetryCountHeaders := []string{"", "", ""}
Expand All @@ -182,7 +182,7 @@ func TestOverwriteRetryCountHeader(t *testing.T) {
}),
option.WithHeader("X-Stainless-Retry-Count", "42"),
)
res, err := client.Compute.VMs.New(context.Background(), compute.VMNewParams{
_, err := client.Compute.VMs.New(context.Background(), compute.VMNewParams{
BootVolume: nirvana.F(compute.VMNewParamsBootVolume{
Size: nirvana.F(int64(100)),
}),
Expand All @@ -196,14 +196,14 @@ func TestOverwriteRetryCountHeader(t *testing.T) {
Ram: nirvana.F(compute.RamParam{
Size: nirvana.F(int64(2)),
}),
Region: nirvana.F(shared.RegionNameAmsterdam),
Region: nirvana.F(shared.RegionNameUsSea1),
SourceAddress: nirvana.F("0.0.0.0/0"),
SSHKey: nirvana.F(compute.SSHKeyParam{
PublicKey: nirvana.F("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC1234567890"),
}),
})
if err == nil || res != nil {
t.Error("Expected there to be a cancel error and for the response to be nil")
if err == nil {
t.Error("Expected there to be a cancel error")
}

expectedRetryCountHeaders := []string{"42", "42", "42"}
Expand All @@ -229,7 +229,7 @@ func TestRetryAfterMs(t *testing.T) {
},
}),
)
res, err := client.Compute.VMs.New(context.Background(), compute.VMNewParams{
_, err := client.Compute.VMs.New(context.Background(), compute.VMNewParams{
BootVolume: nirvana.F(compute.VMNewParamsBootVolume{
Size: nirvana.F(int64(100)),
}),
Expand All @@ -243,14 +243,14 @@ func TestRetryAfterMs(t *testing.T) {
Ram: nirvana.F(compute.RamParam{
Size: nirvana.F(int64(2)),
}),
Region: nirvana.F(shared.RegionNameAmsterdam),
Region: nirvana.F(shared.RegionNameUsSea1),
SourceAddress: nirvana.F("0.0.0.0/0"),
SSHKey: nirvana.F(compute.SSHKeyParam{
PublicKey: nirvana.F("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC1234567890"),
}),
})
if err == nil || res != nil {
t.Error("Expected there to be a cancel error and for the response to be nil")
if err == nil {
t.Error("Expected there to be a cancel error")
}
if want := 3; attempts != want {
t.Errorf("Expected %d attempts, got %d", want, attempts)
Expand All @@ -270,7 +270,7 @@ func TestContextCancel(t *testing.T) {
)
cancelCtx, cancel := context.WithCancel(context.Background())
cancel()
res, err := client.Compute.VMs.New(cancelCtx, compute.VMNewParams{
_, err := client.Compute.VMs.New(cancelCtx, compute.VMNewParams{
BootVolume: nirvana.F(compute.VMNewParamsBootVolume{
Size: nirvana.F(int64(100)),
}),
Expand All @@ -284,14 +284,14 @@ func TestContextCancel(t *testing.T) {
Ram: nirvana.F(compute.RamParam{
Size: nirvana.F(int64(2)),
}),
Region: nirvana.F(shared.RegionNameAmsterdam),
Region: nirvana.F(shared.RegionNameUsSea1),
SourceAddress: nirvana.F("0.0.0.0/0"),
SSHKey: nirvana.F(compute.SSHKeyParam{
PublicKey: nirvana.F("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC1234567890"),
}),
})
if err == nil || res != nil {
t.Error("Expected there to be a cancel error and for the response to be nil")
if err == nil {
t.Error("Expected there to be a cancel error")
}
}

Expand All @@ -308,7 +308,7 @@ func TestContextCancelDelay(t *testing.T) {
)
cancelCtx, cancel := context.WithTimeout(context.Background(), 2*time.Millisecond)
defer cancel()
res, err := client.Compute.VMs.New(cancelCtx, compute.VMNewParams{
_, err := client.Compute.VMs.New(cancelCtx, compute.VMNewParams{
BootVolume: nirvana.F(compute.VMNewParamsBootVolume{
Size: nirvana.F(int64(100)),
}),
Expand All @@ -322,14 +322,14 @@ func TestContextCancelDelay(t *testing.T) {
Ram: nirvana.F(compute.RamParam{
Size: nirvana.F(int64(2)),
}),
Region: nirvana.F(shared.RegionNameAmsterdam),
Region: nirvana.F(shared.RegionNameUsSea1),
SourceAddress: nirvana.F("0.0.0.0/0"),
SSHKey: nirvana.F(compute.SSHKeyParam{
PublicKey: nirvana.F("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC1234567890"),
}),
})
if err == nil || res != nil {
t.Error("expected there to be a cancel error and for the response to be nil")
if err == nil {
t.Error("expected there to be a cancel error")
}
}

Expand All @@ -352,7 +352,7 @@ func TestContextDeadline(t *testing.T) {
},
}),
)
res, err := client.Compute.VMs.New(deadlineCtx, compute.VMNewParams{
_, err := client.Compute.VMs.New(deadlineCtx, compute.VMNewParams{
BootVolume: nirvana.F(compute.VMNewParamsBootVolume{
Size: nirvana.F(int64(100)),
}),
Expand All @@ -366,14 +366,14 @@ func TestContextDeadline(t *testing.T) {
Ram: nirvana.F(compute.RamParam{
Size: nirvana.F(int64(2)),
}),
Region: nirvana.F(shared.RegionNameAmsterdam),
Region: nirvana.F(shared.RegionNameUsSea1),
SourceAddress: nirvana.F("0.0.0.0/0"),
SSHKey: nirvana.F(compute.SSHKeyParam{
PublicKey: nirvana.F("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC1234567890"),
}),
})
if err == nil || res != nil {
t.Error("expected there to be a deadline error and for the response to be nil")
if err == nil {
t.Error("expected there to be a deadline error")
}
close(testDone)
}()
Expand Down
32 changes: 10 additions & 22 deletions compute/aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,46 +13,34 @@ type Error = apierror.Error
type RegionName = shared.RegionName

// This is an alias to an internal value.
const RegionNameAmsterdam = shared.RegionNameAmsterdam
const RegionNameUsSea1 = shared.RegionNameUsSea1

// This is an alias to an internal value.
const RegionNameChicago = shared.RegionNameChicago
const RegionNameUsSva1 = shared.RegionNameUsSva1

// This is an alias to an internal value.
const RegionNameFrankfurt = shared.RegionNameFrankfurt
const RegionNameUsChi1 = shared.RegionNameUsChi1

// This is an alias to an internal value.
const RegionNameHongkong = shared.RegionNameHongkong
const RegionNameUsWdc1 = shared.RegionNameUsWdc1

// This is an alias to an internal value.
const RegionNameLondon = shared.RegionNameLondon
const RegionNameEuLon1 = shared.RegionNameEuLon1

// This is an alias to an internal value.
const RegionNameMumbai = shared.RegionNameMumbai
const RegionNameEuAms1 = shared.RegionNameEuAms1

// This is an alias to an internal value.
const RegionNameSaopaulo = shared.RegionNameSaopaulo
const RegionNameEuFrk1 = shared.RegionNameEuFrk1

// This is an alias to an internal value.
const RegionNameSeattle = shared.RegionNameSeattle
const RegionNameApMum1 = shared.RegionNameApMum1

// This is an alias to an internal value.
const RegionNameSiliconvalley = shared.RegionNameSiliconvalley
const RegionNameApSin1 = shared.RegionNameApSin1

// This is an alias to an internal value.
const RegionNameSingapore = shared.RegionNameSingapore

// This is an alias to an internal value.
const RegionNameStockholm = shared.RegionNameStockholm

// This is an alias to an internal value.
const RegionNameSydney = shared.RegionNameSydney

// This is an alias to an internal value.
const RegionNameTokyo = shared.RegionNameTokyo

// This is an alias to an internal value.
const RegionNameWashingtondc = shared.RegionNameWashingtondc
const RegionNameApTyo1 = shared.RegionNameApTyo1

// This is an alias to an internal type.
type ResourceStatus = shared.ResourceStatus
Expand Down
Loading

0 comments on commit 172ea20

Please sign in to comment.