Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.0.1-alpha.1"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 10
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/the-san-francisco-compute-company%2Fsfc-nodes-b800806859333bacc88fa4236eae35c8cdbec62970b7fb9ad440a330f24a1622.yml
openapi_spec_hash: fa672b6ca8953a8059961a7559a607a9
config_hash: c41bbd00e07f543c79f5d6d61fbee825
config_hash: 3e08ccabfd0014b8308a6dd422ed2523
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Changelog

## 0.0.1-alpha.1 (2025-07-10)

Full Changelog: [v0.0.1-alpha.0...v0.0.1-alpha.1](https://github.com/sfcompute/nodes-go/compare/v0.0.1-alpha.0...v0.0.1-alpha.1)

### Chores

* configure new SDK language ([6e68d64](https://github.com/sfcompute/nodes-go/commit/6e68d64dc949d10023baf84985a7aa35be588a0e))
* update SDK settings ([ffa4444](https://github.com/sfcompute/nodes-go/commit/ffa4444199a4a95811ff66907dc56d71c356f921))
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ To use a local version of this library from source in another project, edit the
directive. This can be done through the CLI with the following:

```sh
$ go mod edit -replace github.com/stainless-sdks/sfc-nodes-go=/path/to/sfc-nodes-go
$ go mod edit -replace github.com/sfcompute/nodes-go=/path/to/nodes-go
```

## Running tests
Expand Down
22 changes: 15 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SFC Nodes Go API Library

<a href="https://pkg.go.dev/github.com/stainless-sdks/sfc-nodes-go"><img src="https://pkg.go.dev/badge/github.com/stainless-sdks/sfc-nodes-go.svg" alt="Go Reference"></a>
<a href="https://pkg.go.dev/github.com/sfcompute/nodes-go"><img src="https://pkg.go.dev/badge/github.com/sfcompute/nodes-go.svg" alt="Go Reference"></a>

The SFC Nodes Go library provides convenient access to the [SFC Nodes REST API](https://docs.sfcompute.com/api-reference#tag/nodes)
from applications written in Go.
Expand All @@ -9,18 +9,26 @@ It is generated with [Stainless](https://www.stainless.com/).

## Installation

<!-- x-release-please-start-version -->

```go
import (
"github.com/stainless-sdks/sfc-nodes-go" // imported as sfcnodes
"github.com/sfcompute/nodes-go" // imported as sfcnodes
)
```

<!-- x-release-please-end -->

Or to pin the version:

<!-- x-release-please-start-version -->

```sh
go get -u 'github.com/stainless-sdks/sfc-nodes-go@v0.0.1-alpha.0'
go get -u 'github.com/sfcompute/nodes-go@v0.0.1-alpha.1'
```

<!-- x-release-please-end -->

## Requirements

This library requires Go 1.18+.
Expand All @@ -36,8 +44,8 @@ import (
"context"
"fmt"

"github.com/stainless-sdks/sfc-nodes-go"
"github.com/stainless-sdks/sfc-nodes-go/option"
"github.com/sfcompute/nodes-go"
"github.com/sfcompute/nodes-go/option"
)

func main() {
Expand Down Expand Up @@ -264,7 +272,7 @@ client.Nodes.List(context.TODO(), ...,

The request option `option.WithDebugLog(nil)` may be helpful while debugging.

See the [full list of request options](https://pkg.go.dev/github.com/stainless-sdks/sfc-nodes-go/option).
See the [full list of request options](https://pkg.go.dev/github.com/sfcompute/nodes-go/option).

### Pagination

Expand Down Expand Up @@ -461,7 +469,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con

We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.

We are keen for your feedback; please open an [issue](https://www.github.com/stainless-sdks/sfc-nodes-go/issues) with questions, bugs, or suggestions.
We are keen for your feedback; please open an [issue](https://www.github.com/sfcompute/nodes-go/issues) with questions, bugs, or suggestions.

## Contributing

Expand Down
4 changes: 2 additions & 2 deletions aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
package sfcnodes

import (
"github.com/stainless-sdks/sfc-nodes-go/internal/apierror"
"github.com/stainless-sdks/sfc-nodes-go/packages/param"
"github.com/sfcompute/nodes-go/internal/apierror"
"github.com/sfcompute/nodes-go/packages/param"
)

// aliased to make [param.APIUnion] private when embedding
Expand Down
44 changes: 22 additions & 22 deletions api.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"net/http"
"os"

"github.com/stainless-sdks/sfc-nodes-go/internal/requestconfig"
"github.com/stainless-sdks/sfc-nodes-go/option"
"github.com/sfcompute/nodes-go/internal/requestconfig"
"github.com/sfcompute/nodes-go/option"
)

// Client creates a struct with services and top level methods that help with
Expand Down
6 changes: 3 additions & 3 deletions client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"testing"
"time"

"github.com/stainless-sdks/sfc-nodes-go"
"github.com/stainless-sdks/sfc-nodes-go/internal"
"github.com/stainless-sdks/sfc-nodes-go/option"
"github.com/sfcompute/nodes-go"
"github.com/sfcompute/nodes-go/internal"
"github.com/sfcompute/nodes-go/option"
)

type closureTransport struct {
Expand Down
2 changes: 1 addition & 1 deletion field.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package sfcnodes

import (
"github.com/stainless-sdks/sfc-nodes-go/packages/param"
"github.com/sfcompute/nodes-go/packages/param"
"io"
"time"
)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/stainless-sdks/sfc-nodes-go
module github.com/sfcompute/nodes-go

go 1.21

Expand Down
4 changes: 2 additions & 2 deletions internal/apierror/apierror.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"net/http"
"net/http/httputil"

"github.com/stainless-sdks/sfc-nodes-go/internal/apijson"
"github.com/stainless-sdks/sfc-nodes-go/packages/respjson"
"github.com/sfcompute/nodes-go/internal/apijson"
"github.com/sfcompute/nodes-go/packages/respjson"
)

// Error represents an error that originates from the API, i.e. when a request is
Expand Down
2 changes: 1 addition & 1 deletion internal/apiform/encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"sync"
"time"

"github.com/stainless-sdks/sfc-nodes-go/packages/param"
"github.com/sfcompute/nodes-go/packages/param"
)

var encoders sync.Map // map[encoderEntry]encoderFunc
Expand Down
2 changes: 1 addition & 1 deletion internal/apiform/form_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package apiform

import (
"bytes"
"github.com/stainless-sdks/sfc-nodes-go/packages/param"
"github.com/sfcompute/nodes-go/packages/param"
"io"
"mime/multipart"
"strings"
Expand Down
2 changes: 1 addition & 1 deletion internal/apiform/richparam.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package apiform

import (
"github.com/stainless-sdks/sfc-nodes-go/packages/param"
"github.com/sfcompute/nodes-go/packages/param"
"mime/multipart"
"reflect"
)
Expand Down
4 changes: 2 additions & 2 deletions internal/apijson/decodeparam_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package apijson_test
import (
"encoding/json"
"fmt"
"github.com/stainless-sdks/sfc-nodes-go/internal/apijson"
"github.com/stainless-sdks/sfc-nodes-go/packages/param"
"github.com/sfcompute/nodes-go/internal/apijson"
"github.com/sfcompute/nodes-go/packages/param"
"reflect"
"testing"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/apijson/decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package apijson
import (
"encoding/json"
"fmt"
"github.com/stainless-sdks/sfc-nodes-go/packages/param"
"github.com/sfcompute/nodes-go/packages/param"
"reflect"
"strconv"
"sync"
Expand Down
4 changes: 2 additions & 2 deletions internal/apijson/decoderesp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package apijson_test

import (
"encoding/json"
"github.com/stainless-sdks/sfc-nodes-go/internal/apijson"
"github.com/stainless-sdks/sfc-nodes-go/packages/respjson"
"github.com/sfcompute/nodes-go/internal/apijson"
"github.com/sfcompute/nodes-go/packages/respjson"
"testing"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/apijson/subfield.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package apijson

import (
"github.com/stainless-sdks/sfc-nodes-go/packages/respjson"
"github.com/sfcompute/nodes-go/packages/respjson"
"reflect"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/apijson/union.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package apijson

import (
"errors"
"github.com/stainless-sdks/sfc-nodes-go/packages/param"
"github.com/sfcompute/nodes-go/packages/param"
"reflect"

"github.com/tidwall/gjson"
Expand Down
2 changes: 1 addition & 1 deletion internal/apiquery/encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"sync"
"time"

"github.com/stainless-sdks/sfc-nodes-go/packages/param"
"github.com/sfcompute/nodes-go/packages/param"
)

var encoders sync.Map // map[reflect.Type]encoderFunc
Expand Down
2 changes: 1 addition & 1 deletion internal/apiquery/query_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package apiquery

import (
"github.com/stainless-sdks/sfc-nodes-go/packages/param"
"github.com/sfcompute/nodes-go/packages/param"
"net/url"
"testing"
"time"
Expand Down
2 changes: 1 addition & 1 deletion internal/apiquery/richparam.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package apiquery

import (
"github.com/stainless-sdks/sfc-nodes-go/packages/param"
"github.com/sfcompute/nodes-go/packages/param"
"reflect"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/encoding/json/decode.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"encoding"
"encoding/base64"
"fmt"
"github.com/stainless-sdks/sfc-nodes-go/internal/encoding/json/shims"
"github.com/sfcompute/nodes-go/internal/encoding/json/shims"
"reflect"
"strconv"
"strings"
Expand Down
4 changes: 2 additions & 2 deletions internal/encoding/json/encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
"encoding"
"encoding/base64"
"fmt"
"github.com/stainless-sdks/sfc-nodes-go/internal/encoding/json/sentinel"
"github.com/stainless-sdks/sfc-nodes-go/internal/encoding/json/shims"
"github.com/sfcompute/nodes-go/internal/encoding/json/sentinel"
"github.com/sfcompute/nodes-go/internal/encoding/json/shims"
"math"
"reflect"
"slices"
Expand Down
2 changes: 1 addition & 1 deletion internal/encoding/json/sentinel/null.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package sentinel

import (
"github.com/stainless-sdks/sfc-nodes-go/internal/encoding/json/shims"
"github.com/sfcompute/nodes-go/internal/encoding/json/shims"
"reflect"
"sync"
)
Expand Down
4 changes: 2 additions & 2 deletions internal/encoding/json/sentinel/sentinel_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package sentinel_test

import (
"github.com/stainless-sdks/sfc-nodes-go/internal/encoding/json/sentinel"
"github.com/stainless-sdks/sfc-nodes-go/packages/param"
"github.com/sfcompute/nodes-go/internal/encoding/json/sentinel"
"github.com/sfcompute/nodes-go/packages/param"
"reflect"
"slices"
"testing"
Expand Down
2 changes: 1 addition & 1 deletion internal/encoding/json/time.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
package json

import (
"github.com/stainless-sdks/sfc-nodes-go/internal/encoding/json/shims"
"github.com/sfcompute/nodes-go/internal/encoding/json/shims"
"reflect"
"time"
)
Expand Down
4 changes: 2 additions & 2 deletions internal/paramutil/field.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package paramutil

import (
"github.com/stainless-sdks/sfc-nodes-go/packages/param"
"github.com/stainless-sdks/sfc-nodes-go/packages/respjson"
"github.com/sfcompute/nodes-go/packages/param"
"github.com/sfcompute/nodes-go/packages/respjson"
)

func AddrIfPresent[T comparable](v param.Opt[T]) *T {
Expand Down
2 changes: 1 addition & 1 deletion internal/paramutil/union.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package paramutil

import (
"fmt"
"github.com/stainless-sdks/sfc-nodes-go/packages/param"
"github.com/sfcompute/nodes-go/packages/param"
"reflect"
)

Expand Down
8 changes: 4 additions & 4 deletions internal/requestconfig/requestconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import (
"strings"
"time"

"github.com/stainless-sdks/sfc-nodes-go/internal"
"github.com/stainless-sdks/sfc-nodes-go/internal/apierror"
"github.com/stainless-sdks/sfc-nodes-go/internal/apiform"
"github.com/stainless-sdks/sfc-nodes-go/internal/apiquery"
"github.com/sfcompute/nodes-go/internal"
"github.com/sfcompute/nodes-go/internal/apierror"
"github.com/sfcompute/nodes-go/internal/apiform"
"github.com/sfcompute/nodes-go/internal/apiquery"
)

func getDefaultHeaders() map[string]string {
Expand Down
2 changes: 1 addition & 1 deletion internal/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

package internal

const PackageVersion = "0.0.1-alpha.0"
const PackageVersion = "0.0.1-alpha.1" // x-release-please-version
10 changes: 5 additions & 5 deletions node.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import (
"fmt"
"net/http"

"github.com/stainless-sdks/sfc-nodes-go/internal/apijson"
"github.com/stainless-sdks/sfc-nodes-go/internal/requestconfig"
"github.com/stainless-sdks/sfc-nodes-go/option"
"github.com/stainless-sdks/sfc-nodes-go/packages/param"
"github.com/stainless-sdks/sfc-nodes-go/packages/respjson"
"github.com/sfcompute/nodes-go/internal/apijson"
"github.com/sfcompute/nodes-go/internal/requestconfig"
"github.com/sfcompute/nodes-go/option"
"github.com/sfcompute/nodes-go/packages/param"
"github.com/sfcompute/nodes-go/packages/respjson"
)

// NodeService contains methods and other services that help with interacting with
Expand Down
6 changes: 3 additions & 3 deletions node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"os"
"testing"

"github.com/stainless-sdks/sfc-nodes-go"
"github.com/stainless-sdks/sfc-nodes-go/internal/testutil"
"github.com/stainless-sdks/sfc-nodes-go/option"
"github.com/sfcompute/nodes-go"
"github.com/sfcompute/nodes-go/internal/testutil"
"github.com/sfcompute/nodes-go/option"
)

func TestNodeNewWithOptionalParams(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions option/requestoption.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ import (
"strings"
"time"

"github.com/stainless-sdks/sfc-nodes-go/internal/requestconfig"
"github.com/sfcompute/nodes-go/internal/requestconfig"
"github.com/tidwall/sjson"
)

// RequestOption is an option for the requests made by the sfc-nodes API Client
// which can be supplied to clients, services, and methods. You can read more about this functional
// options pattern in our [README].
//
// [README]: https://pkg.go.dev/github.com/stainless-sdks/sfc-nodes-go#readme-requestoptions
// [README]: https://pkg.go.dev/github.com/sfcompute/nodes-go#readme-requestoptions
type RequestOption = requestconfig.RequestOption

// WithBaseURL returns a RequestOption that sets the BaseURL for the client.
Expand Down
Loading