generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ef3e3dd
commit 9f40854
Showing
14 changed files
with
232 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
module = "passthrough" | ||
language = "java" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
module = "passthrough" | ||
language = "kotlin" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>xyz.block.ftl.examples</groupId> | ||
<artifactId>passthrough</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
|
||
<parent> | ||
<groupId>xyz.block.ftl</groupId> | ||
<artifactId>ftl-build-parent-kotlin</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>build-helper-maven-plugin</artifactId> | ||
<version>3.6.0</version> | ||
<executions> | ||
<execution> | ||
<phase>generate-sources</phase> | ||
<goals> | ||
<goal>add-source</goal> | ||
</goals> | ||
<configuration> | ||
<sources> | ||
<source>${project.build.directory}/generated-sources/ftl-clients</source> | ||
</sources> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
157 changes: 157 additions & 0 deletions
157
.../testdata/kotlin/passthrough/src/main/kotlin/xyz/block/ftl/test/TestInvokeGoFromKotlin.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
package xyz.block.ftl.test | ||
|
||
import ftl.gomodule.* | ||
import xyz.block.ftl.Export | ||
import xyz.block.ftl.Verb | ||
import java.time.ZonedDateTime | ||
|
||
@Export | ||
@Verb | ||
fun emptyVerb(emptyVerbClient: EmptyVerbClient) { | ||
emptyVerbClient.call() | ||
} | ||
|
||
@Export | ||
@Verb | ||
fun sinkVerb(input: String, sinkVerbClient: SinkVerbClient) { | ||
sinkVerbClient.call(input) | ||
} | ||
|
||
@Export | ||
@Verb | ||
fun sourceVerb(sourceVerbClient: SourceVerbClient): String { | ||
return sourceVerbClient.call() | ||
} | ||
|
||
@Export | ||
@Verb | ||
fun errorEmptyVerb(client: ErrorEmptyVerbClient) { | ||
client.call() | ||
} | ||
|
||
@Export | ||
@Verb | ||
fun intVerb(payload: Long, client: IntVerbClient): Long { | ||
return client.call(payload) | ||
} | ||
|
||
@Export | ||
@Verb | ||
fun floatVerb(payload: Double, client: FloatVerbClient): Double { | ||
return client.call(payload) | ||
} | ||
|
||
@Export | ||
@Verb | ||
fun stringVerb(payload: String, client: StringVerbClient): String { | ||
return client.call(payload) | ||
} | ||
|
||
@Export | ||
@Verb | ||
fun bytesVerb(payload: ByteArray, client: BytesVerbClient): ByteArray { | ||
return client.call(payload) | ||
} | ||
|
||
@Export | ||
@Verb | ||
fun boolVerb(payload: Boolean, client: BoolVerbClient): Boolean { | ||
return client.call(payload) | ||
} | ||
|
||
@Export | ||
@Verb | ||
fun stringArrayVerb(payload: List<String>, client: StringArrayVerbClient): List<String> { | ||
return client.call(payload) | ||
} | ||
|
||
@Export | ||
@Verb | ||
fun stringMapVerb(payload: Map<String, String>, client: StringMapVerbClient): Map<String, String> { | ||
return client.call(payload) | ||
} | ||
|
||
@Export | ||
@Verb | ||
fun timeVerb(instant: ZonedDateTime, client: TimeVerbClient): ZonedDateTime { | ||
return client.call(instant) | ||
} | ||
|
||
@Export | ||
@Verb | ||
fun testObjectVerb(payload: TestObject, client: TestObjectVerbClient): TestObject { | ||
return client.call(payload) | ||
} | ||
|
||
@Export | ||
@Verb | ||
fun testObjectOptionalFieldsVerb( | ||
payload: TestObjectOptionalFields, | ||
client: TestObjectOptionalFieldsVerbClient | ||
): TestObjectOptionalFields { | ||
return client.call(payload) | ||
} | ||
|
||
// now the same again but with option return / input types | ||
@Export | ||
@Verb | ||
fun optionalIntVerb(payload: Long, client: OptionalIntVerbClient): Long { | ||
return client.call(payload) | ||
} | ||
|
||
@Export | ||
@Verb | ||
fun optionalFloatVerb(payload: Double, client: OptionalFloatVerbClient): Double { | ||
return client.call(payload) | ||
} | ||
|
||
@Export | ||
@Verb | ||
fun optionalStringVerb(payload: String, client: OptionalStringVerbClient): String { | ||
return client.call(payload) | ||
} | ||
|
||
@Export | ||
@Verb | ||
fun optionalBytesVerb(payload: ByteArray?, client: OptionalBytesVerbClient): ByteArray { | ||
return client.call(payload!!) | ||
} | ||
|
||
@Export | ||
@Verb | ||
fun optionalBoolVerb(payload: Boolean, client: OptionalBoolVerbClient): Boolean { | ||
return client.call(payload) | ||
} | ||
|
||
@Export | ||
@Verb | ||
fun optionalStringArrayVerb(payload: List<String>, client: OptionalStringArrayVerbClient): List<String> { | ||
return client.call(payload) | ||
} | ||
|
||
@Export | ||
@Verb | ||
fun optionalStringMapVerb(payload: Map<String, String>, client: OptionalStringMapVerbClient): Map<String, String> { | ||
return client.call(payload) | ||
} | ||
|
||
@Export | ||
@Verb | ||
fun optionalTimeVerb(instant: ZonedDateTime?, client: OptionalTimeVerbClient): ZonedDateTime { | ||
return client.call(instant!!) | ||
} | ||
|
||
@Export | ||
@Verb | ||
fun optionalTestObjectVerb(payload: TestObject?, client: OptionalTestObjectVerbClient): TestObject { | ||
return client.call(payload!!) | ||
} | ||
|
||
@Export | ||
@Verb | ||
fun optionalTestObjectOptionalFieldsVerb( | ||
payload: TestObjectOptionalFields?, | ||
client: OptionalTestObjectOptionalFieldsVerbClient | ||
): TestObjectOptionalFields { | ||
return client.call(payload!!) | ||
} |