Skip to content

Commit

Permalink
feat(api): api update (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] committed Jan 23, 2025
1 parent f66cf2a commit 73233e3
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
2 changes: 2 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ Methods:
- <code title="delete /vms/{vm_id}">client.VMs.<a href="https://pkg.go.dev/github.com/nirvana-labs/nirvana-go/vms#VMService.Delete">Delete</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, vmID <a href="https://pkg.go.dev/builtin#string">string</a>) (<a href="https://pkg.go.dev/github.com/nirvana-labs/nirvana-go/operations">operations</a>.<a href="https://pkg.go.dev/github.com/nirvana-labs/nirvana-go/operations#Operation">Operation</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /vms/{vm_id}">client.VMs.<a href="https://pkg.go.dev/github.com/nirvana-labs/nirvana-go/vms#VMService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, vmID <a href="https://pkg.go.dev/builtin#string">string</a>) (<a href="https://pkg.go.dev/github.com/nirvana-labs/nirvana-go/vms">vms</a>.<a href="https://pkg.go.dev/github.com/nirvana-labs/nirvana-go/vms#VM">VM</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>

## OsImages

# VPCs

Response Types:
Expand Down
26 changes: 26 additions & 0 deletions vms/osimage.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

package vms

import (
"github.com/nirvana-labs/nirvana-go/option"
)

// OsImageService contains methods and other services that help with interacting
// with the Nirvana Labs API.
//
// Note, unlike clients, this service does not read variables from the environment
// automatically. You should not instantiate this service directly, and instead use
// the [NewOsImageService] method instead.
type OsImageService struct {
Options []option.RequestOption
}

// NewOsImageService generates a new service that applies the given options to each
// request. These options are applied after the parent client's options (if there
// is one), and before any request-specific options.
func NewOsImageService(opts ...option.RequestOption) (r *OsImageService) {
r = &OsImageService{}
r.Options = opts
return
}
4 changes: 3 additions & 1 deletion vms/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ import (
// automatically. You should not instantiate this service directly, and instead use
// the [NewVMService] method instead.
type VMService struct {
Options []option.RequestOption
Options []option.RequestOption
OsImages *OsImageService
}

// NewVMService generates a new service that applies the given options to each
Expand All @@ -34,6 +35,7 @@ type VMService struct {
func NewVMService(opts ...option.RequestOption) (r *VMService) {
r = &VMService{}
r.Options = opts
r.OsImages = NewOsImageService(opts...)
return
}

Expand Down

0 comments on commit 73233e3

Please sign in to comment.