Skip to content

Commit 404647b

Browse files
committed
Update Go import paths to spinframework
Signed-off-by: Adam Reese <[email protected]>
1 parent e1c1503 commit 404647b

28 files changed

+152
-152
lines changed

content/v2/ai-sentiment-analysis-api-tutorial.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ url = "https://github.com/spinframework/spin-docs/blob/main/content/v2/ai-sentim
3131
- [Conclusion](#conclusion)
3232
- [Next Steps](#next-steps)
3333

34-
> This tutorial does not work with Spin `v3.0` or above as the on disk representation of the models have changed. Refer to the [V3 tutorial](/spin/v3/ai-sentiment-analysis-api-tutorial) depending on your Spin version.
34+
> This tutorial does not work with Spin `v3.0` or above as the on disk representation of the models have changed. Refer to the [V3 tutorial](/spin/v3/ai-sentiment-analysis-api-tutorial) depending on your Spin version.
3535
3636
Artificial Intelligence (AI) Inferencing performs well on GPUs. However, GPU infrastructure is both scarce and expensive. This tutorial will show you how to use Fermyon Serverless AI to quickly build advanced AI-enabled serverless applications that can run on Fermyon Cloud. Your applications will benefit from 50 millisecond cold start times and operate 100x faster than other on-demand AI infrastructure services. Take a quick look at the video below to learn about executing inferencing on LLMs with no extra setup.
3737

@@ -45,9 +45,9 @@ In this tutorial we will:
4545

4646
## Tutorial Prerequisites
4747

48-
### Spin
48+
### Spin
4949

50-
You will need to [install the latest version of Spin](install#installing-spin). Serverless AI is supported on Spin versions 1.5 and above.
50+
You will need to [install the latest version of Spin](install#installing-spin). Serverless AI is supported on Spin versions 1.5 and above.
5151

5252
If you already have Spin installed, [check what version you are on and upgrade](upgrade#are-you-on-the-latest-version) if required.
5353

@@ -95,7 +95,7 @@ $ spin templates install --git https://github.com/spinframework/spin --upgrade
9595

9696
> This tutorial uses [Meta AI](https://ai.meta.com/)'s Llama 2, Llama Chat and Code Llama models you will need to visit [Meta's Llama webpage](https://ai.meta.com/resources/models-and-libraries/llama-downloads/) and agree to Meta's License, Acceptable Use Policy, and to Meta’s privacy policy before fetching and using Llama models.
9797
98-
## Serverless AI Inferencing With Spin Applications
98+
## Serverless AI Inferencing With Spin Applications
9999

100100
Now, let's dive deep into a comprehensive tutorial and unlock your potential to use Fermyon Serverless AI.
101101
**Note:** The full source code with other examples can be found in our [Github repo](https://github.com/fermyon/ai-examples/tree/main)
@@ -664,9 +664,9 @@ import (
664664
"net/http"
665665
"strings"
666666

667-
spinhttp "github.com/fermyon/spin/sdk/go/v2/http"
668-
"github.com/fermyon/spin/sdk/go/v2/kv"
669-
"github.com/fermyon/spin/sdk/go/v2/llm"
667+
spinhttp "github.com/spinframework/spin-go-sdk/v2/http"
668+
"github.com/spinframework/spin-go-sdk/v2/kv"
669+
"github.com/spinframework/spin-go-sdk/v2/llm"
670670
)
671671

672672
type sentimentAnalysisRequest struct {
@@ -804,9 +804,9 @@ We create an `assets` directory where we can store files to serve statically (se
804804
$ mkdir assets
805805
```
806806

807-
### Add the Front-End
807+
### Add the Front-End
808808

809-
We can add a webpage that asks the user for some text and does the sentiment analysis on it. In your assets folder, create two files `dynamic.js` and `index.html`.
809+
We can add a webpage that asks the user for some text and does the sentiment analysis on it. In your assets folder, create two files `dynamic.js` and `index.html`.
810810

811811
Here's the code snippet for `index.html`
812812

@@ -880,7 +880,7 @@ Here's the code snippet for `index.html`
880880
</html>
881881
```
882882

883-
Here's the code snippet for `dynamic.js`
883+
Here's the code snippet for `dynamic.js`
884884

885885
```javascript
886886
// Listen for the Enter key being pressed
@@ -1074,7 +1074,7 @@ $ curl -vXPOST 'localhost:3000/api/sentiment-analysis' -H'Content-Type: applicat
10741074

10751075
### Deploy to Fermyon Cloud
10761076

1077-
Deploying to the Fermyon Cloud is one simple command. If you have not logged into your Fermyon Cloud account already, the CLI will prompt you to login. Follow the instructions to complete the authorization process.
1077+
Deploying to the Fermyon Cloud is one simple command. If you have not logged into your Fermyon Cloud account already, the CLI will prompt you to login. Follow the instructions to complete the authorization process.
10781078

10791079
<!-- @selectiveCpy -->
10801080

content/v2/go-components.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Using TinyGo to compile components for Spin is currently required, as the
2626

2727
> All examples from this page can be found in [the Spin Go SDK repository on GitHub](https://github.com/spinframework/spin-go-sdk/tree/main/examples).
2828
29-
[**Want to go straight to the Spin SDK reference documentation?** Find it here.](https://pkg.go.dev/github.com/fermyon/spin/sdk/go/v2)
29+
[**Want to go straight to the Spin SDK reference documentation?** Find it here.](https://pkg.go.dev/github.com/spinframework/spin-go-sdk/v2)
3030

3131
## Versions
3232

@@ -52,7 +52,7 @@ import (
5252
"fmt"
5353
"net/http"
5454

55-
spinhttp "github.com/fermyon/spin/sdk/go/v2/http"
55+
spinhttp "github.com/spinframework/spin-go-sdk/v2/http"
5656
)
5757

5858
func init() {
@@ -124,7 +124,7 @@ import (
124124
"net/http"
125125
"os"
126126

127-
spinhttp "github.com/fermyon/spin/sdk/go/v2/http"
127+
spinhttp "github.com/spinframework/spin-go-sdk/v2/http"
128128
)
129129

130130
func init() {
@@ -217,7 +217,7 @@ package main
217217
import (
218218
"fmt"
219219

220-
"github.com/fermyon/spin/sdk/go/v2/redis"
220+
"github.com/spinframework/spin-go-sdk/v2/redis"
221221
)
222222

223223
func init() {
@@ -309,8 +309,8 @@ import (
309309
"net/http"
310310
"os"
311311

312-
spin_http "github.com/fermyon/spin/sdk/go/v2/http"
313-
"github.com/fermyon/spin/sdk/go/v2/redis"
312+
spin_http "github.com/spinframework/spin-go-sdk/v2/http"
313+
"github.com/spinframework/spin-go-sdk/v2/redis"
314314
)
315315

316316
func init() {

content/v2/http-outbound.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ const response = await fetch("https://example.com/users");
104104

105105
You can find a complete example of using outbound HTTP in the JavaScript SDK repository on [GitHub](https://github.com/spinframework/spin-js-sdk/tree/sdk-v2/examples/common-patterns/outbound-http)
106106

107-
**Note**: `fetch` currently only works when building for the HTTP trigger.
107+
**Note**: `fetch` currently only works when building for the HTTP trigger.
108108

109109
{{ blockEnd }}
110110

@@ -132,13 +132,13 @@ You can find a complete example for using outbound HTTP in the [Python SDK repos
132132

133133
{{ startTab "TinyGo"}}
134134

135-
> [**Want to go straight to the reference documentation?** Find it here.](https://pkg.go.dev/github.com/fermyon/spin/sdk/go/v2@v2.0.0/http)
135+
> [**Want to go straight to the reference documentation?** Find it here.](https://pkg.go.dev/github.com/spinframework/spin-go-sdk/v2@v2.2.1/http)
136136
137-
HTTP functions are available in the `github.com/fermyon/spin/sdk/go/v2/http` package. [See Go Packages for reference documentation.](https://pkg.go.dev/github.com/fermyon/spin/sdk/go/v2/http) The general function is named `Send`, but the Go SDK also surfaces individual functions, with request-specific parameters, for the `Get` and `Post` operations. For example:
137+
HTTP functions are available in the `github.com/spinframework/spin-go-sdk/v2/http` package. [See Go Packages for reference documentation.](https://pkg.go.dev/github.com/spinframework/spin-go-sdk/v2/http) The general function is named `Send`, but the Go SDK also surfaces individual functions, with request-specific parameters, for the `Get` and `Post` operations. For example:
138138

139139
```go
140140
import (
141-
spinhttp "github.com/fermyon/spin/sdk/go/v2/http"
141+
spinhttp "github.com/spinframework/spin-go-sdk/v2/http"
142142
)
143143

144144
res1, err1 := spinhttp.Get("https://random-data-api.fermyon.app/animals/json")

content/v2/http-trigger.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ For example, suppose the application `base` path is `base = "/shop"`. Then a tr
104104
### Resolving Overlapping Routes
105105

106106
If multiple triggers could potentially handle the same request based on their
107-
defined routes, the trigger whose route has the longest matching prefix
107+
defined routes, the trigger whose route has the longest matching prefix
108108
takes precedence. This also means that exact matches take precedence over wildcard matches.
109109

110110
In the following example, requests starting with the `/users/` prefix (e.g. `/users/1`)
@@ -305,7 +305,7 @@ class IncomingHandler(http.IncomingHandler):
305305

306306
{{ startTab "TinyGo"}}
307307

308-
> [**Want to go straight to the reference documentation?** Find it here.](https://pkg.go.dev/github.com/fermyon/spin/sdk/go/v2@v2.0.0/http)
308+
> [**Want to go straight to the reference documentation?** Find it here.](https://pkg.go.dev/github.com/spinframework/spin-go-sdk/v2@v2.2.1/http)
309309
310310
In Go, you register the handler as a callback in your program's `init` function. Call `spinhttp.Handle`, passing your handler as the sole argument. Your handler takes a `http.Request` record, from the standard `net/http` package, and a `ResponseWriter` to construct the response.
311311

@@ -318,7 +318,7 @@ import (
318318
"fmt"
319319
"net/http"
320320

321-
spinhttp "github.com/fermyon/spin/sdk/go/v2/http"
321+
spinhttp "github.com/spinframework/spin-go-sdk/v2/http"
322322
)
323323

324324
func init() {
@@ -507,7 +507,7 @@ When exposing HTTP triggers using HTTPS you must provide `spin up` with a TLS ce
507507

508508
The `spin up` command's `--tls-cert` and `--tls-key` trigger options provide a way for you to specify both a TLS certificate and a private key (whilst running the `spin up` command).
509509

510-
The `--tls-cert` option specifies the path to the TLS certificate to use for HTTPS, if this is not set, normal HTTP will be used. The certificate should be in PEM format.
510+
The `--tls-cert` option specifies the path to the TLS certificate to use for HTTPS, if this is not set, normal HTTP will be used. The certificate should be in PEM format.
511511

512512
The `--tls-key` option specifies the path to the private key to use for HTTPS, if this is not set, normal HTTP will be used. The key should be in PKCS#8 format. For more information, please see the [Spin CLI Reference](./cli-reference#trigger-options).
513513

content/v2/key-value-store-tutorial.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ $ spin new -t http-go spin-key-value
109109

110110
## Configuration
111111

112-
Good news - Spin will take care of setting up your Key Value store. However, in order to make sure your Spin application has permission to access the Key Value store, you must add the `key_value_stores = ["default"]` line in the `[component.<component-name>]` section of the `spin.toml` file, for each component which needs access to the Key Value store. This line is necessary to communicate to Spin that a given component has access to the default Key Value store. A newly scaffolded Spin application will not have this line; you will need to add it.
112+
Good news - Spin will take care of setting up your Key Value store. However, in order to make sure your Spin application has permission to access the Key Value store, you must add the `key_value_stores = ["default"]` line in the `[component.<component-name>]` section of the `spin.toml` file, for each component which needs access to the Key Value store. This line is necessary to communicate to Spin that a given component has access to the default Key Value store. A newly scaffolded Spin application will not have this line; you will need to add it.
113113

114114
> Note: `[component.spin_key_value]` contains the name of the component. If you used a different name, when creating the application, this sections name would be different.
115115
@@ -150,7 +150,7 @@ key_value_stores = ["default"]
150150

151151
## Write Code to Save and Load Data
152152

153-
In this section, we use the Spin SDK to open and persist our application's data inside our default key/value store. This is a special store that every environment running Spin applications will make available for their application.
153+
In this section, we use the Spin SDK to open and persist our application's data inside our default key/value store. This is a special store that every environment running Spin applications will make available for their application.
154154

155155
### The Spin SDK Version
156156

@@ -330,8 +330,8 @@ import (
330330
"net/http"
331331
"fmt"
332332

333-
spin_http "github.com/fermyon/spin/sdk/go/v2/http"
334-
"github.com/fermyon/spin/sdk/go/v2/kv"
333+
spin_http "github.com/spinframework/spin-go-sdk/v2/http"
334+
"github.com/spinframework/spin-go-sdk/v2/kv"
335335
)
336336

337337
func init() {
@@ -408,7 +408,7 @@ func main() {}
408408

409409
## Building and Running Your Spin Application
410410

411-
Now, let's build and run our Spin Application locally. Run the following command to build your application:
411+
Now, let's build and run our Spin Application locally. Run the following command to build your application:
412412

413413
<!-- @selectiveCpy -->
414414

content/v2/kv-store-api-guide.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ fn handle_request(_req: Request) -> Result<impl IntoResponse> {
6565
}
6666
```
6767

68-
**General Notes**
68+
**General Notes**
6969

7070
`set` **Operation**
7171
- For set, the value argument can be of any type that implements `AsRef<[u8]>`
@@ -129,7 +129,7 @@ class IncomingHandler(http.IncomingHandler):
129129
with key_value.open_default() as store:
130130
store.set("test", bytes("hello world!", "utf-8"))
131131
val = store.get("test")
132-
132+
133133
return Response(
134134
200,
135135
{"content-type": "text/plain"},
@@ -148,12 +148,12 @@ class IncomingHandler(http.IncomingHandler):
148148

149149
{{ startTab "TinyGo"}}
150150

151-
> [**Want to go straight to the Spin SDK reference documentation?** Find it here.](https://pkg.go.dev/github.com/fermyon/spin/sdk/go/v2@v2.0.0/kv)
151+
> [**Want to go straight to the Spin SDK reference documentation?** Find it here.](https://pkg.go.dev/github.com/spinframework/spin-go-sdk/v2@v2.2.1/kv)
152152
153-
Key value functions are provided by the `github.com/fermyon/spin/sdk/go/v2/kv` module. [See Go Packages for reference documentation.](https://pkg.go.dev/github.com/fermyon/spin/sdk/go/v2/kv) For example:
153+
Key value functions are provided by the `github.com/spinframework/spin-go-sdk/v2/kv` module. [See Go Packages for reference documentation.](https://pkg.go.dev/github.com/spinframework/spin-go-sdk/v2/kv) For example:
154154

155155
```go
156-
import "github.com/fermyon/spin/sdk/go/v2/kv"
156+
import "github.com/spinframework/spin-go-sdk/v2/kv"
157157

158158
func example() error {
159159
store, err := kv.OpenStore("default")

content/v2/language-support-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ This page contains information about language support for Spin features:
8585

8686
{{ startTab "TinyGo"}}
8787

88-
**[📄 Visit the TinyGo Spin SDK reference documentation](https://pkg.go.dev/github.com/fermyon/spin/sdk/go/v2) to see specific modules, functions, variables and syntax relating to the following TinyGo SDK.**
88+
**[📄 Visit the TinyGo Spin SDK reference documentation](https://pkg.go.dev/github.com/spinframework/spin-go-sdk/v2) to see specific modules, functions, variables and syntax relating to the following TinyGo SDK.**
8989

9090
| Feature | SDK Supported? |
9191
|-----|-----|

content/v2/quickstart.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ The `requirements.txt`, by default, contains the references to the `spin-sdk` an
509509
<!-- @selectiveCpy -->
510510

511511
```bash
512-
$ pip3 install -r requirements.txt
512+
$ pip3 install -r requirements.txt
513513
Collecting spin-sdk==3.1.0 (from -r requirements.txt (line 1))
514514
Using cached spin_sdk-3.1.0-py3-none-any.whl.metadata (16 kB)
515515
Collecting componentize-py==0.13.3 (from -r requirements.txt (line 2))
@@ -529,7 +529,7 @@ The `hello-python` directory structure created by the Spin `http-py` template is
529529
```text
530530
├── app.py
531531
├── spin.toml
532-
└── requirements.txt
532+
└── requirements.txt
533533
```
534534

535535
The additional `spin.toml` file is the manifest file, which tells Spin what events should trigger what components. In this case our trigger is HTTP, for a Web application, and we have only one component, at the route `/...`. This is a wildcard that matches any route.
@@ -661,7 +661,7 @@ import (
661661
"fmt"
662662
"net/http"
663663

664-
spinhttp "github.com/fermyon/spin/sdk/go/v2/http"
664+
spinhttp "github.com/spinframework/spin-go-sdk/v2/http"
665665
)
666666

667667
func init() {
@@ -695,7 +695,7 @@ Executing the build command for component hello-rust: cargo build --target wasm3
695695
Compiling anyhow v1.0.69
696696
Compiling version_check v0.9.4
697697
# ...
698-
Compiling spin-sdk v0.10.0
698+
Compiling spin-sdk v0.10.0
699699
Compiling hello-rust v0.1.0 (/home/ivan/testing/start/hello_rust)
700700
Finished release [optimized] target(s) in 11.94s
701701
Finished building all Spin components
@@ -906,7 +906,7 @@ date = "2023-11-04T00:00:01Z"
906906
Hello, Fermyon
907907
```
908908

909-
> The `curl` output may vary based on which language SDK you use.
909+
> The `curl` output may vary based on which language SDK you use.
910910
911911
Congratulations! You just created, built and ran your first Spin application!
912912

content/v2/rdbms-storage.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ The code below is an [Outbound MySQL example](https://github.com/spinframework/s
7878
```ts
7979
import { ResponseBuilder, Mysql } from '@fermyon/spin-sdk';
8080

81-
// Connects as the root user without a password
81+
// Connects as the root user without a password
8282
const DB_URL = "mysql://root:@127.0.0.1/spin_dev"
8383

8484
/*
@@ -94,7 +94,7 @@ export async function handler(_req: Request, res: ResponseBuilder) {
9494
conn.execute('delete from test where id=?', [4]);
9595
conn.execute('insert into test values (4,5)', []);
9696
let ret = conn.query('select * from test', []);
97-
// return a object that looks like
97+
// return a object that looks like
9898
// { "columns": [{name: "id", dataType: "int32"}], "rows": [{ "id": 4, "val": 5 }] }
9999
res.send(JSON.stringify(ret, null, 2));
100100
}
@@ -117,7 +117,7 @@ class IncomingHandler(http.IncomingHandler):
117117
def handle_request(self, request: Request) -> Response:
118118
with mysql.open("mysql://root:@127.0.0.1/spin_dev") as db:
119119
print(db.query("select * from test", []))
120-
120+
121121
return Response(
122122
200,
123123
{"content-type": "text/plain"},
@@ -129,9 +129,9 @@ class IncomingHandler(http.IncomingHandler):
129129

130130
{{ startTab "TinyGo"}}
131131

132-
> [**Want to go straight to the reference documentation?** Find it here.](https://pkg.go.dev/github.com/fermyon/spin/sdk/go/v2)
132+
> [**Want to go straight to the reference documentation?** Find it here.](github.com/spinframework/spin-go-sdk/v2)
133133
134-
MySQL functions are available in the `github.com/fermyon/spin/sdk/go/v2/mysql` package, and PostgreSQL in `github.com/fermyon/spin/sdk/go/v2/pg`. [See Go Packages for reference documentation.](https://pkg.go.dev/github.com/fermyon/spin/sdk/go/v2)
134+
MySQL functions are available in the `github.com/spinframework/spin-go-sdk/v2/mysql` package, and PostgreSQL in `github.com/spinframework/spin-go-sdk/v2/pg`. [See Go Packages for reference documentation.](https://pkg.go.dev/github.com/spinframework/spin-go-sdk/v2)
135135

136136
The package follows the usual Go database API. Use `Open` to return a connection to the database of type `*sql.DB` - see the [Go standard library documentation](https://pkg.go.dev/database/sql#DB) for usage information. For example:
137137

@@ -144,8 +144,8 @@ import (
144144
"net/http"
145145
"os"
146146

147-
spinhttp "github.com/fermyon/spin/sdk/go/v2/http"
148-
"github.com/fermyon/spin/sdk/go/v2/pg"
147+
spinhttp "github.com/spinframework/spin-go-sdk/v2/http"
148+
"github.com/spinframework/spin-go-sdk/v2/pg"
149149
)
150150

151151
type Pet struct {

0 commit comments

Comments
 (0)