Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Commit

Permalink
fix: all the things :)
Browse files Browse the repository at this point in the history
  • Loading branch information
wesbillman committed Apr 18, 2024
1 parent d038528 commit 44f55a5
Show file tree
Hide file tree
Showing 31 changed files with 253 additions and 516 deletions.
44 changes: 0 additions & 44 deletions ftl-examples.code-workspace

This file was deleted.

39 changes: 20 additions & 19 deletions go/http/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,43 @@ module ftl/http

go 1.22.2

require github.com/TBD54566975/ftl v0.128.1
require github.com/TBD54566975/ftl v0.180.1

require (
connectrpc.com/connect v1.14.0 // indirect
connectrpc.com/connect v1.16.0 // indirect
connectrpc.com/grpcreflect v1.2.0 // indirect
connectrpc.com/otelconnect v0.7.0 // indirect
github.com/BurntSushi/toml v1.3.2 // indirect
github.com/TBD54566975/scaffolder v0.8.0 // indirect
github.com/alecthomas/concurrency v0.0.2 // indirect
github.com/alecthomas/kong v0.9.0 // indirect
github.com/alecthomas/participle/v2 v2.1.1 // indirect
github.com/alecthomas/types v0.10.1 // indirect
github.com/alecthomas/types v0.14.0 // indirect
github.com/alessio/shellescape v1.4.2 // indirect
github.com/danieljoos/wincred v1.2.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
github.com/jackc/pgx/v5 v5.5.3 // indirect
github.com/jackc/pgx/v5 v5.5.5 // indirect
github.com/jackc/puddle/v2 v2.2.1 // indirect
github.com/jpillora/backoff v1.0.0 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/oklog/ulid/v2 v2.1.0 // indirect
github.com/swaggest/jsonschema-go v0.3.64 // indirect
github.com/multiformats/go-base36 v0.2.0 // indirect
github.com/swaggest/jsonschema-go v0.3.70 // indirect
github.com/swaggest/refl v1.3.0 // indirect
github.com/zalando/go-keyring v0.2.3 // indirect
go.opentelemetry.io/otel v1.23.1 // indirect
go.opentelemetry.io/otel/metric v1.23.1 // indirect
go.opentelemetry.io/otel/trace v1.23.1 // indirect
golang.design/x/reflect v0.0.0-20220504060917-02c43be63f3b // indirect
golang.org/x/crypto v0.19.0 // indirect
golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 // indirect
golang.org/x/mod v0.15.0 // indirect
golang.org/x/net v0.21.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.17.0 // indirect
github.com/zalando/go-keyring v0.2.4 // indirect
go.opentelemetry.io/otel v1.25.0 // indirect
go.opentelemetry.io/otel/metric v1.25.0 // indirect
go.opentelemetry.io/otel/trace v1.25.0 // indirect
golang.org/x/crypto v0.22.0 // indirect
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/protobuf v1.32.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
)
129 changes: 64 additions & 65 deletions go/http/go.sum

Large diffs are not rendered by default.

46 changes: 0 additions & 46 deletions kotlin/ftl-module-http/pom.xml

This file was deleted.

File renamed without changes.
78 changes: 25 additions & 53 deletions kotlin/pom.xml → kotlin/http/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,13 @@
<modelVersion>4.0.0</modelVersion>

<groupId>ftl</groupId>
<artifactId>ftl</artifactId>
<artifactId>http</artifactId>
<version>1.0-SNAPSHOT</version>

<packaging>pom</packaging>

<modules>
<module>ftl-module-http</module>
</modules>

<properties>
<ftl.version>0.126.0</ftl.version>
<ftlEndpoint>http://127.0.0.1:8892</ftlEndpoint>
<ftl.version>0.180.1</ftl.version>
<java.version>1.8</java.version>
<kotlin.version>1.9.22</kotlin.version>
<kotlin.version>1.9.23</kotlin.version>
<kotlin.compiler.incremental>true</kotlin.compiler.incremental>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
Expand All @@ -36,7 +29,7 @@
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.7.2</version>
<version>42.7.3</version>
</dependency>
</dependencies>

Expand Down Expand Up @@ -77,23 +70,6 @@
<artifactId>maven-dependency-plugin</artifactId>
<version>3.6.1</version>
<executions>
<!-- Install FTL code generator into target directory. -->
<execution>
<phase>initialize</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>xyz.block</groupId>
<artifactId>ftl-generator</artifactId>
<version>${ftl.version}</version>
<destFileName>ftl-generator.jar</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
<!-- Copy all dependencies into the target directory -->
<execution>
<id>copy-dependencies</id>
Expand Down Expand Up @@ -131,31 +107,6 @@
</execution>
</executions>
</plugin>
<!-- Run the FTL code generator -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>java</executable>
<arguments>
<argument>-jar</argument>
<argument>target/dependency/ftl-generator.jar</argument>
<argument>--endpoint=${ftlEndpoint}</argument>
<argument>--dest=${project.build.directory}</argument>
<argument>--module=${ftlModuleName}</argument>
<argument>--module-client-suffix=ModuleClient</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
<!-- Add sources generated by the FTL tooling -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand Down Expand Up @@ -183,6 +134,7 @@
<disableDefaultRuleSets>true</disableDefaultRuleSets>
<classPath>${generated.classpath}</classPath>
<jvmTarget>${java.version}</jvmTarget>
<jdkHome>${java.home}</jdkHome>
<config>${project.build.directory}/detekt.yml</config>
<plugins>
<plugin>
Expand All @@ -209,5 +161,25 @@
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<artifactId>kotlin-maven-plugin</artifactId>
<groupId>org.jetbrains.kotlin</groupId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
</plugin>
<!-- Add generated sources to the classpath -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
</plugin>
<!-- Extract schema -->
<plugin>
<groupId>com.github.ozsie</groupId>
<artifactId>detekt-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import xyz.block.ftl.Json
import xyz.block.ftl.Context
import xyz.block.ftl.HttpIngress
import xyz.block.ftl.Method
import xyz.block.ftl.Verb
import xyz.block.ftl.Export

data class GetRequest(
@Json("userId") val userID: String,
Expand Down Expand Up @@ -44,7 +44,7 @@ data class DeleteRequest(

// Example: curl -i http://localhost:8892/ingress/http/users/123/posts?postId=456
// Error Example: curl -i http://localhost:8892/ingress/http/users/000/posts?postId=456
@Verb
@Export
@HttpIngress(Method.GET, "/http/users/{userId}/posts")
fun `get`(context: Context, req: HttpRequest<GetRequest>): HttpResponse<GetResponse, String> {
return HttpResponse(
Expand All @@ -58,7 +58,7 @@ fun `get`(context: Context, req: HttpRequest<GetRequest>): HttpResponse<GetRespo
}

// Example: curl -i --json '{"user_id": 123, "post_id": 345}' http://localhost:8892/ingress/http/users
@Verb
@Export
@HttpIngress(Method.POST, "/http/users")
fun post(context: Context, req: HttpRequest<PostRequest>): HttpResponse<PostResponse, String> {
return HttpResponse(
Expand All @@ -69,7 +69,7 @@ fun post(context: Context, req: HttpRequest<PostRequest>): HttpResponse<PostResp
}

// Example: curl -X PUT http://localhost:8892/ingress/http/users/123 -d '{"postId": "123"}'
@Verb
@Export
@HttpIngress(Method.PUT, "/http/users/{userId}")
fun put(context: Context, req: HttpRequest<PutRequest>): HttpResponse<Empty, String> {
return HttpResponse(
Expand All @@ -80,7 +80,7 @@ fun put(context: Context, req: HttpRequest<PutRequest>): HttpResponse<Empty, Str
}

// Example: curl -X DELETE http://localhost:8892/ingress/http/users/123
@Verb
@Export
@HttpIngress(Method.DELETE, "/http/users/{userId}")
fun delete(context: Context, req: HttpRequest<DeleteRequest>): HttpResponse<Empty, String> {
return HttpResponse(
Expand Down
2 changes: 1 addition & 1 deletion online-boutique/backend/services/ad/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.22.2
replace github.com/TBD54566975/ftl/examples/online-boutique => ../..

require (
github.com/TBD54566975/ftl v0.179.1
github.com/TBD54566975/ftl v0.180.1
github.com/TBD54566975/ftl/examples/online-boutique v0.0.0-00010101000000-000000000000
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225
)
Expand Down
4 changes: 2 additions & 2 deletions online-boutique/backend/services/ad/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ connectrpc.com/otelconnect v0.7.0 h1:ZH55ZZtcJOTKWWLy3qmL4Pam4RzRWBJFOqTPyAqCXkY
connectrpc.com/otelconnect v0.7.0/go.mod h1:Bt2ivBymHZHqxvo4HkJ0EwHuUzQN6k2l0oH+mp/8nwc=
github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8=
github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/TBD54566975/ftl v0.179.1 h1:fm9co3MLPylMQEIEZT/dkOA0rj2+Yk/Gx1nhs9f8oCI=
github.com/TBD54566975/ftl v0.179.1/go.mod h1:wxdoAEH8g3aRWtmIwkcr84ilxluMiiNrlrkot3P5FYc=
github.com/TBD54566975/ftl v0.180.1 h1:FmtFzkkcanjMnLc2vaoQyjqV8nM5b8b32N4Uexz4f9k=
github.com/TBD54566975/ftl v0.180.1/go.mod h1:wxdoAEH8g3aRWtmIwkcr84ilxluMiiNrlrkot3P5FYc=
github.com/TBD54566975/scaffolder v0.8.0 h1:DWl1K3dWcLsOPAYGQGPQXtffrml6XCB0tF05JdpMqZU=
github.com/TBD54566975/scaffolder v0.8.0/go.mod h1:Ab/jbQ4q8EloYL0nbkdh2DVvkGc4nxr1OcIbdMpTxxg=
github.com/alecthomas/assert/v2 v2.8.1 h1:YCxnYR6jjpfnEK5AK5SysALKdUEBPGH4Y7As6tBnDw0=
Expand Down
2 changes: 1 addition & 1 deletion online-boutique/backend/services/cart/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.22.2
replace github.com/TBD54566975/ftl/examples/online-boutique => ../..

require (
github.com/TBD54566975/ftl v0.179.1
github.com/TBD54566975/ftl v0.180.1
github.com/hashicorp/golang-lru/v2 v2.0.7
)

Expand Down
4 changes: 2 additions & 2 deletions online-boutique/backend/services/cart/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ connectrpc.com/otelconnect v0.7.0 h1:ZH55ZZtcJOTKWWLy3qmL4Pam4RzRWBJFOqTPyAqCXkY
connectrpc.com/otelconnect v0.7.0/go.mod h1:Bt2ivBymHZHqxvo4HkJ0EwHuUzQN6k2l0oH+mp/8nwc=
github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8=
github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/TBD54566975/ftl v0.179.1 h1:fm9co3MLPylMQEIEZT/dkOA0rj2+Yk/Gx1nhs9f8oCI=
github.com/TBD54566975/ftl v0.179.1/go.mod h1:wxdoAEH8g3aRWtmIwkcr84ilxluMiiNrlrkot3P5FYc=
github.com/TBD54566975/ftl v0.180.1 h1:FmtFzkkcanjMnLc2vaoQyjqV8nM5b8b32N4Uexz4f9k=
github.com/TBD54566975/ftl v0.180.1/go.mod h1:wxdoAEH8g3aRWtmIwkcr84ilxluMiiNrlrkot3P5FYc=
github.com/TBD54566975/scaffolder v0.8.0 h1:DWl1K3dWcLsOPAYGQGPQXtffrml6XCB0tF05JdpMqZU=
github.com/TBD54566975/scaffolder v0.8.0/go.mod h1:Ab/jbQ4q8EloYL0nbkdh2DVvkGc4nxr1OcIbdMpTxxg=
github.com/alecthomas/assert/v2 v2.8.1 h1:YCxnYR6jjpfnEK5AK5SysALKdUEBPGH4Y7As6tBnDw0=
Expand Down
Loading

0 comments on commit 44f55a5

Please sign in to comment.