Skip to content

Commit 48ddef7

Browse files
authored
Merge pull request #1 from adamreese/update-import-paths
Update import paths to new package
2 parents d4d8822 + b22d53f commit 48ddef7

File tree

80 files changed

+181
-190
lines changed

Some content is hidden

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

80 files changed

+181
-190
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module examples/http-outbound/hello
2+
3+
go 1.20
4+
5+
require github.com/fermyon/spin-go-sdk v0.0.0
6+
7+
require github.com/julienschmidt/httprouter v1.3.0 // indirect
8+
9+
replace github.com/fermyon/spin-go-sdk v0.0.0 => ../../../

examples/http-tinygo-outbound-http/tinygo-hello/main.go renamed to examples/http-outbound/hello/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"net/http"
77
"os"
88

9-
spinhttp "github.com/fermyon/spin/sdk/go/v2/http"
9+
spinhttp "github.com/fermyon/spin-go-sdk/http"
1010
)
1111

1212
func init() {
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module examples/http-outbound/http-to-same-app
2+
3+
go 1.20
4+
5+
require github.com/fermyon/spin-go-sdk v0.0.0
6+
7+
require github.com/julienschmidt/httprouter v1.3.0 // indirect
8+
9+
replace github.com/fermyon/spin-go-sdk v0.0.0 => ../../../
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"fmt"
55
"net/http"
66

7-
spinhttp "github.com/fermyon/spin/sdk/go/v2/http"
7+
spinhttp "github.com/fermyon/spin-go-sdk/http"
88
)
99

1010
func init() {

examples/http-tinygo-outbound-http/spin.toml renamed to examples/http-outbound/spin.toml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,31 @@ spin_manifest_version = 2
33
[application]
44
authors = ["Fermyon Engineering <[email protected]>"]
55
description = "A simple Spin application written in (Tiny)Go that performs outbound HTTP requests."
6-
name = "spin-tinygo-outbound-http"
6+
name = "http-outbound-example"
77
version = "1.0.0"
88

99
[[trigger.http]]
1010
route = "/hello"
11-
component = "tinygo-hello"
11+
component = "hello"
1212

1313
[[trigger.http]]
14-
route = "/outbound-http-to-same-app"
15-
component = "outbound-http-to-same-app"
14+
route = "/http-to-same-app"
15+
component = "http-to-same-app"
1616

17-
[component.tinygo-hello]
18-
source = "tinygo-hello/main.wasm"
17+
[component.hello]
18+
source = "hello/main.wasm"
1919
allowed_outbound_hosts = [
20-
"https://random-data-api.fermyon.app:443",
21-
"https://postman-echo.com:443",
20+
"https://random-data-api.fermyon.app:443",
21+
"https://postman-echo.com:443",
2222
]
23-
[component.tinygo-hello.build]
24-
workdir = "tinygo-hello"
23+
[component.hello.build]
24+
workdir = "hello"
2525
command = "tinygo build -target=wasi -gc=leaking -no-debug -o main.wasm main.go"
2626

27-
[component.outbound-http-to-same-app]
28-
source = "outbound-http-to-same-app/main.wasm"
27+
[component.http-to-same-app]
28+
source = "http-to-same-app/main.wasm"
2929
# Use self to make outbound requests to components in the same Spin application.
3030
allowed_outbound_hosts = ["http://self"]
31-
[component.outbound-http-to-same-app.build]
32-
workdir = "outbound-http-to-same-app"
31+
[component.http-to-same-app.build]
32+
workdir = "http-to-same-app"
3333
command = "tinygo build -target=wasi -gc=leaking -no-debug -o main.wasm main.go"

examples/http-router/go.mod

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module examples/http-router
2+
3+
go 1.20
4+
5+
require github.com/fermyon/spin-go-sdk v0.0.0
6+
7+
require github.com/julienschmidt/httprouter v1.3.0 // indirect
8+
9+
replace github.com/fermyon/spin-go-sdk v0.0.0 => ../../

0 commit comments

Comments
 (0)