From 7b19762897fd2275a91ba7d30bf5bfb6157463a9 Mon Sep 17 00:00:00 2001 From: Wes Date: Fri, 19 Jan 2024 11:52:12 -0700 Subject: [PATCH] feat: update backend and add just for commands (#14) --- .github/ISSUE_TEMPLATE/config.yml | 4 - .github/workflows/ci.yml | 2 + .gitignore | 6 + CODEOWNERS | 25 +-- CONTRIBUTING.md | 164 +-------------- Justfile | 7 + Procfile.dev | 4 + README.md | 41 ++-- backend/online-boutique/common/money/money.go | 53 ++--- backend/online-boutique/go.mod | 43 +--- backend/online-boutique/go.sum | 142 ------------- .../services/ad-kotlin/pom.xml | 198 ------------------ .../ad-kotlin/src/main/kotlin/ftl/ad/Ad.kt | 78 ------- backend/online-boutique/services/ad/ad.go | 6 +- backend/online-boutique/services/ad/ftl.toml | 3 - backend/online-boutique/services/ad/go.mod | 10 + backend/online-boutique/services/ad/go.sum | 2 + backend/online-boutique/services/ad/main | Bin 75996 -> 0 bytes .../online-boutique/services/cart/ftl.toml | 2 + backend/online-boutique/services/cart/go.mod | 7 + backend/online-boutique/services/cart/go.sum | 2 + .../services/checkout/checkout.go | 25 +-- .../services/checkout/ftl.toml | 2 + .../online-boutique/services/checkout/go.mod | 49 +++++ .../online-boutique/services/checkout/go.sum | 147 +++++++++++++ .../services/currency/currency.go | 31 ++- .../services/currency/ftl.toml | 2 + .../online-boutique/services/currency/go.mod | 10 + .../online-boutique/services/currency/go.sum | 2 + .../services/echo/generated_ftl_module.go | 6 - .../online-boutique/services/email/email.go | 1 - .../online-boutique/services/payment/ftl.toml | 2 + .../online-boutique/services/payment/go.mod | 7 + .../online-boutique/services/payment/go.sum | 2 + .../services/payment/payment.go | 4 +- .../services/productcatalog/ftl.toml | 2 + .../services/productcatalog/go.mod | 7 + .../services/productcatalog/go.sum | 0 .../services/productcatalog/productcatalog.go | 18 +- .../services/recommendation/ftl.toml | 2 + .../services/recommendation/go.mod | 46 ++++ .../services/recommendation/go.sum | 147 +++++++++++++ .../services/recommendation/recommendation.go | 10 +- .../services/shipping/ftl.toml | 2 + .../online-boutique/services/shipping/go.mod | 5 + .../online-boutique/services/shipping/go.sum | 0 .../services/shipping/shipping.go | 10 +- .../services/time/generated_ftl_module.go | 21 -- ...flutter-3.13.8.pkg => .flutter-3.16.8.pkg} | 0 bin/{.go-1.21.3.pkg => .go-1.21.6.pkg} | 0 bin/.goreman-0.3.15.pkg | 1 + bin/.just-1.23.0.pkg | 1 + bin/.watchexec-1.25.1.pkg | 1 + bin/dart | 2 +- bin/flutter | 2 +- bin/go | 2 +- bin/gofmt | 2 +- bin/goreman | 1 + bin/just | 1 + bin/watchexec | 1 + 60 files changed, 591 insertions(+), 782 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 Justfile create mode 100644 Procfile.dev delete mode 100644 backend/online-boutique/services/ad-kotlin/pom.xml delete mode 100644 backend/online-boutique/services/ad-kotlin/src/main/kotlin/ftl/ad/Ad.kt create mode 100644 backend/online-boutique/services/ad/go.mod create mode 100644 backend/online-boutique/services/ad/go.sum delete mode 100644 backend/online-boutique/services/ad/main create mode 100644 backend/online-boutique/services/cart/ftl.toml create mode 100644 backend/online-boutique/services/cart/go.mod create mode 100644 backend/online-boutique/services/cart/go.sum create mode 100644 backend/online-boutique/services/checkout/ftl.toml create mode 100644 backend/online-boutique/services/checkout/go.mod create mode 100644 backend/online-boutique/services/checkout/go.sum create mode 100644 backend/online-boutique/services/currency/ftl.toml create mode 100644 backend/online-boutique/services/currency/go.mod create mode 100644 backend/online-boutique/services/currency/go.sum delete mode 100644 backend/online-boutique/services/echo/generated_ftl_module.go delete mode 100644 backend/online-boutique/services/email/email.go create mode 100644 backend/online-boutique/services/payment/ftl.toml create mode 100644 backend/online-boutique/services/payment/go.mod create mode 100644 backend/online-boutique/services/payment/go.sum create mode 100644 backend/online-boutique/services/productcatalog/ftl.toml create mode 100644 backend/online-boutique/services/productcatalog/go.mod create mode 100644 backend/online-boutique/services/productcatalog/go.sum create mode 100644 backend/online-boutique/services/recommendation/ftl.toml create mode 100644 backend/online-boutique/services/recommendation/go.mod create mode 100644 backend/online-boutique/services/recommendation/go.sum create mode 100644 backend/online-boutique/services/shipping/ftl.toml create mode 100644 backend/online-boutique/services/shipping/go.mod create mode 100644 backend/online-boutique/services/shipping/go.sum delete mode 100644 backend/online-boutique/services/time/generated_ftl_module.go rename bin/{.flutter-3.13.8.pkg => .flutter-3.16.8.pkg} (100%) rename bin/{.go-1.21.3.pkg => .go-1.21.6.pkg} (100%) create mode 120000 bin/.goreman-0.3.15.pkg create mode 120000 bin/.just-1.23.0.pkg create mode 120000 bin/.watchexec-1.25.1.pkg create mode 120000 bin/goreman create mode 120000 bin/just create mode 120000 bin/watchexec diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index ce71f103..00000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,4 +0,0 @@ -contact_links: - - name: ❓ Questions and Help 🤔 - url: https://discord.gg/tbd (/add your discord channel if applicable) - about: This issue tracker is not for support questions. Please refer to the community for more help. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4562aadc..ba25aa19 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,8 @@ jobs: uses: actions/checkout@v3 - name: Init Hermit uses: cashapp/activate-hermit@v1 + with: + cache: true - name: Get dependencies working-directory: ./frontend/mobile run: flutter pub get diff --git a/.gitignore b/.gitignore index 19fd746b..c717a2b5 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,9 @@ build/ deploy/ .DS_Store /logs/ +generated_ftl_module.go +*.zip +dist/ +go.work +go.work.sum +_ftl/ diff --git a/CODEOWNERS b/CODEOWNERS index 21ecf13a..b96b6a3b 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,24 +1 @@ -# This CODEOWNERS file denotes the project leads -# and encodes their responsibilities for code review. - -# Instructions: At a minimum, replace the '@GITHUB_USER_NAME_GOES_HERE' -# here with at least one project lead. - -# Lines starting with '#' are comments. -# Each line is a file pattern followed by one or more owners. -# The format is described: https://github.blog/2017-07-06-introducing-code-owners/ - -# These owners will be the default owners for everything in the repo. -* @GITHUB_USER_NAME_GOES_HERE - - -# ----------------------------------------------- -# BELOW THIS LINE ARE TEMPLATES, UNUSED -# ----------------------------------------------- -# Order is important. The last matching pattern has the most precedence. -# So if a pull request only touches javascript files, only these owners -# will be requested to review. -# *.js @octocat @github/js - -# You can also use email addresses if you prefer. -# docs/* docs@example.com \ No newline at end of file +* @alecthomas @wesbillman @worstell diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 95b8a6fa..c58d87fb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,7 +4,7 @@ There are many ways to be an open source contributor, and we're here to help you * Propose ideas in our [discord](https://discord.gg/tbd) -* Raise an issue or feature request in our [issue tracker](LINK_HERE) ___***FIX LINK AND REMOVE THIS NOTICE***___ +* Raise an issue or feature request in [github](https://github.com/TBD54566975/ftl-examples/issues) * Help another contributor with one of their questions, or a code review * Suggest improvements to our Getting Started documentation by supplying a Pull Request * Evangelize our work together in conferences, podcasts, and social media spaces. @@ -17,167 +17,7 @@ ___***UPDATE TABLE OF PROJECT DEPS AND INSTALLATION NOTES***___ | Requirement | Tested Version | Installation Instructions | |-------------|----------------|------------------------------------------------------| -| Go | 1.17.6 |[go.dev](https://go.dev/doc/tutorial/compile-install) | -| Mage | 1.12.1 |[magefile.org](https://magefile.org/) | -| Java | 17.0.2 | Below, recommended via [SDKMan](https://sdkman.io) | - -### Go - -This project is written in Go, a modern, open source programming language. - -You may verify your `go` installation via the terminal: - -``` -$> go version -go version go1.17.6 darwin/amd64 -``` - -If you do not have go, we recommend installing it by: - -#### MacOS - -##### Homebrew -``` -$> brew install go -``` - -#### Linux - -See the [Go Installation Documentation](https://go.dev/doc/install). - -### Mage - -The build is run by Mage. - -You may verify your `mage` installation via the terminal: - -``` -$> mage --version -Mage Build Tool 1.12.1 -Build Date: 2021-12-15T21:00:02Z -Commit: 2f1ec40 -built with: go1.17.6 -``` - -#### MacOS - -##### Homebrew - -``` -$> brew install mage -``` - -#### Linux - -Installation instructions are on the [Magefile home page](https://magefile.org/). - -### Java - -This project is written in Java, a typesafe, compiled programming language. - -You may verify your `java` installation via the terminal by running `java -version`. - -If you do not have Java, we recommend installing it -via [SDKMan](https://sdkman.io/install). This is a project which will allow you -to easily install the Java Development Kit (JDK), runtime (JRE), and related frameworks, -build tools, and runtimes. - -After you've installed SDKMan, you may install Java: - -#### SDKMan (cross-platform instructions) - -```shell -$> sdk install java - ... -Do you want java 17.0.2-open to be set as default? (Y/n): Y -Setting java 17.0.2-open as default. -``` - -You may test your installation: - -```shell -$> java -version -openjdk version "17.0.2" 2022-01-18 -OpenJDK Runtime Environment (build 17.0.2+8-86) -OpenJDK 64-Bit Server VM (build 17.0.2+8-86, mixed mode, sharing) -``` - ---- -**NOTE** - -You may additionally look for other Java versions to install by running `sdk list java`: - -...or other installation candidates like Apache Ant, Apache Maven, etc, by running `sdk list`. - -Consult the SDKMan documentation for more info. - ---- - -## Build (Mage) - -``` -$> mage build -``` - -## Build (Java / Gradle) - -### macOS / Linux -```shell -$> ./gradlew build -``` - -### Windows -```shell -$> gradlew.bat build -``` - -## Test (Mage) - -``` -$> mage test -``` - -## Test (Java / Gradle) - -### macOS / Linux -```shell -$> ./gradlew test -``` - -### Windows -```shell -$> gradlew.bat test -``` - ---- -**NOTE** - -You may also combine Gradle build targets in one call, like: - -```shell -$> ./gradlew clean build test -``` - ---- - -## Communications - -### Issues - -Anyone from the community is welcome (and encouraged!) to raise issues via -[GitHub Issues](LINK_HERE) ___***FIX LINK AND REMOVE THIS NOTICE***___. - -### Discussions - -Design discussions and proposals take place in our [discord](https://discord.gg/tbd). - -We advocate an asynchronous, written debate model - so write up your thoughts and invite the community to join in! - -### Continuous Integration - -Build and Test cycles are run on every commit to every branch on [CircleCI](LINK_HERE). - - ___***FIX LINK ABOVE AND REMOVE THIS NOTICE***___ +| Hermit | v0.38.1 |[hermit](https://cashapp.github.io/hermit/usage/get-started/) | ## Contribution diff --git a/Justfile b/Justfile new file mode 100644 index 00000000..a120fc55 --- /dev/null +++ b/Justfile @@ -0,0 +1,7 @@ +# Start the FTL backend with hot-reloading +dev: + watchexec -r -e sql -- goreman -logtime=false -f Procfile.dev start + +# Start the example web frontend for online-boutique +web: + cd frontend/web && npm install && npm run dev diff --git a/Procfile.dev b/Procfile.dev new file mode 100644 index 00000000..339c347c --- /dev/null +++ b/Procfile.dev @@ -0,0 +1,4 @@ +ftl: ftl serve --recreate --allow-origins '*' +backend: ftl dev backend/online-boutique/services +mobile_code_gen: ftl schema generate frontend/mobile/templates/ frontend/mobile/lib/api --watch=5s +web_code_gen: ftl schema generate frontend/web/templates/ frontend/web/src/api --watch=5s diff --git a/README.md b/README.md index c8ba3b38..e404e02d 100644 --- a/README.md +++ b/README.md @@ -1,31 +1,32 @@ -# $PROJECT_NAME README +# FTL examples -Congrats, project leads! You got a new project to grow! +## Introduction -This stub is meant to help you form a strong community around your work. It's yours to adapt, and may -diverge from this initial structure. Just keep the files seeded in this repo, and the rest is yours to evolve! +This repo is designed to show how to use FTL to build an online boutique backend with a mobile (Flutter) app and React frontend. -## Introduction +## Running + +* Install [Hermit](https://cashapp.github.io/hermit/usage/get-started/) and related [shell_hooks]([shell hooks](https://cashapp.github.io/hermit/usage/shell/)). + +>[NOTE] This will install [Just](https://github.com/casey/just) for you. + +To see a list of commands that can be run, run `just --list` in the root of the project. + +### Start FTL, code gen, and backend services with hot-reloading -Orient users to the project here. This is a good place to start with an assumption -that the user knows very little - so start with the Big Picture and show how this -project fits into it. It may be good to reference/link the broader architecture in the -`collaboration` repo or the developer site here. +```bash +just dev +``` -Then maybe a dive into what this project does. +### Start the React web app -Diagrams and other visuals are helpful here. Perhaps code snippets showing usage. +```bash +just web +``` -Project leads should complete, alongside this `README`: -* [CODEOWNERS](./CODEOWNERS) - set project lead(s) -* [CONTRIBUTING.md](./CONTRIBUTING.md) - Fill out how to: install prereqs, build, test, run, access CI, chat, discuss, file issues -* [Bug-report.md](.github/ISSUE_TEMPLATE/bug-report.md) - Fill out `Assignees` add codeowners @names -* [config.yml](.github/ISSUE_TEMPLATE/config.yml) - remove "(/add your discord channel..)" and replace the url with your Discord channel if applicable +### Flutter app -The other files in this template repo may be used as-is: -* [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md) -* [GOVERNANCE.md](./GOVERNANCE.md) -* [LICENSE](./LICENSE) +Flutter is better run via an [IDE](https://docs.flutter.dev/get-started/editor?tab=vscode) like VSCode or Android Studio. ## Project Resources diff --git a/backend/online-boutique/common/money/money.go b/backend/online-boutique/common/money/money.go index 6c8deb81..50592b83 100644 --- a/backend/online-boutique/common/money/money.go +++ b/backend/online-boutique/common/money/money.go @@ -16,6 +16,8 @@ package money import ( "errors" + + "ftl/currency" ) const ( @@ -29,66 +31,49 @@ var ( ErrMismatchingCurrency = errors.New("mismatching currency codes") ) -// Money represents an amount of money along with the currency type. -type Money struct { - // The 3-letter currency code defined in ISO 4217. - CurrencyCode string `json:"currencyCode"` - - // The whole units of the amount. - // For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. - Units int `json:"units"` - - // Number of nano (10^-9) units of the amount. - // The value must be between -999,999,999 and +999,999,999 inclusive. - // If `units` is positive, `nanos` must be positive or zero. - // If `units` is zero, `nanos` can be positive, zero, or negative. - // If `units` is negative, `nanos` must be negative or zero. - // For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. - Nanos int `json:"nanos"` -} - // IsValid checks if specified value has a valid units/nanos signs and ranges. -func IsValid(m Money) bool { +func IsValid(m currency.Money) bool { return signMatches(m) && validNanos(m.Nanos) } -func signMatches(m Money) bool { +func signMatches(m currency.Money) bool { return m.Nanos == 0 || m.Units == 0 || (m.Nanos < 0) == (m.Units < 0) } func validNanos(nanos int) bool { return nanosMin <= nanos && nanos <= nanosMax } // IsZero returns true if the specified money value is equal to zero. -func IsZero(m Money) bool { return m.Units == 0 && m.Nanos == 0 } +func IsZero(m currency.Money) bool { return m.Units == 0 && m.Nanos == 0 } // IsPositive returns true if the specified money value is valid and is // positive. -func IsPositive(m Money) bool { +func IsPositive(m currency.Money) bool { return IsValid(m) && m.Units > 0 || (m.Units == 0 && m.Nanos > 0) } // IsNegative returns true if the specified money value is valid and is // negative. -func IsNegative(m Money) bool { +func IsNegative(m currency.Money) bool { return IsValid(m) && m.Units < 0 || (m.Units == 0 && m.Nanos < 0) } // AreSameCurrency returns true if values l and r have a currency code and // they are the same values. -func AreSameCurrency(l, r Money) bool { +func AreSameCurrency(l, r currency.Money) bool { return l.CurrencyCode == r.CurrencyCode && l.CurrencyCode != "" } // AreEquals returns true if values l and r are the equal, including the -// currency. This does not check validity of the provided values. -func AreEquals(l, r Money) bool { +// +// This does not check validity of the provided values. +func AreEquals(l, r currency.Money) bool { return l.CurrencyCode == r.CurrencyCode && l.Units == r.Units && l.Nanos == r.Nanos } // Negate returns the same amount with the sign negated. -func Negate(m Money) Money { - return Money{ +func Negate(m currency.Money) currency.Money { + return currency.Money{ Units: -m.Units, Nanos: -m.Nanos, CurrencyCode: m.CurrencyCode} @@ -96,7 +81,7 @@ func Negate(m Money) Money { // Must panics if the given error is not nil. This can be used with other // functions like: "m := Must(Sum(a,b))". -func Must(v Money, err error) Money { +func Must(v currency.Money, err error) currency.Money { if err != nil { panic(err) } @@ -106,11 +91,11 @@ func Must(v Money, err error) Money { // Sum adds two values. Returns an error if one of the values are invalid or // currency codes are not matching (unless currency code is unspecified for // both). -func Sum(l, r Money) (Money, error) { +func Sum(l, r currency.Money) (currency.Money, error) { if !IsValid(l) || !IsValid(r) { - return Money{}, ErrInvalidValue + return currency.Money{}, ErrInvalidValue } else if l.CurrencyCode != r.CurrencyCode { - return Money{}, ErrMismatchingCurrency + return currency.Money{}, ErrMismatchingCurrency } units := l.Units + r.Units nanos := l.Nanos + r.Nanos @@ -130,7 +115,7 @@ func Sum(l, r Money) (Money, error) { } } - return Money{ + return currency.Money{ Units: units, Nanos: nanos, CurrencyCode: l.CurrencyCode}, nil @@ -138,7 +123,7 @@ func Sum(l, r Money) (Money, error) { // MultiplySlow is a slow multiplication operation done through adding the value // to itself n-1 times. -func MultiplySlow(m Money, n uint32) Money { +func MultiplySlow(m currency.Money, n uint32) currency.Money { out := m for n > 1 { out = Must(Sum(out, m)) diff --git a/backend/online-boutique/go.mod b/backend/online-boutique/go.mod index 6f115d2f..12eaee17 100644 --- a/backend/online-boutique/go.mod +++ b/backend/online-boutique/go.mod @@ -1,44 +1,3 @@ module github.com/TBD54566975/ftl/examples/online-boutique -go 1.21.3 - -replace github.com/TBD54566975/ftl => ../.. - -require ( - github.com/TBD54566975/ftl v0.0.0-00010101000000-000000000000 - github.com/alecthomas/errors v0.4.0 - github.com/google/uuid v1.4.0 - github.com/hashicorp/golang-lru/v2 v2.0.5 - golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 -) - -require ( - connectrpc.com/connect v1.11.1 // indirect - connectrpc.com/grpcreflect v1.2.0 // indirect - connectrpc.com/otelconnect v0.5.0 // indirect - github.com/alecthomas/concurrency v0.0.2 // indirect - github.com/alecthomas/participle/v2 v2.0.0 // indirect - github.com/alecthomas/types v0.7.1 // indirect - github.com/alessio/shellescape v1.4.1 // indirect - github.com/danieljoos/wincred v1.1.0 // indirect - github.com/go-logr/logr v1.2.4 // indirect - github.com/go-logr/stdr v1.2.2 // indirect - github.com/godbus/dbus/v5 v5.1.0 // indirect - github.com/iancoleman/strcase v0.2.0 // 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.17 // indirect - github.com/oklog/ulid/v2 v2.1.0 // indirect - github.com/rs/cors v1.9.0 // indirect - github.com/swaggest/jsonschema-go v0.3.62 // indirect - github.com/swaggest/refl v1.3.0 // indirect - github.com/zalando/go-keyring v0.2.1 // indirect - go.opentelemetry.io/otel v1.19.0 // indirect - go.opentelemetry.io/otel/metric v1.19.0 // indirect - go.opentelemetry.io/otel/trace v1.19.0 // indirect - golang.org/x/net v0.17.0 // indirect - golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect -) +go 1.21.6 diff --git a/backend/online-boutique/go.sum b/backend/online-boutique/go.sum index 0321db76..e69de29b 100644 --- a/backend/online-boutique/go.sum +++ b/backend/online-boutique/go.sum @@ -1,142 +0,0 @@ -connectrpc.com/connect v1.11.1 h1:dqRwblixqkVh+OFBOOL1yIf1jS/yP0MSJLijRj29bFg= -connectrpc.com/connect v1.11.1/go.mod h1:3AGaO6RRGMx5IKFfqbe3hvK1NqLosFNP2BxDYTPmNPo= -connectrpc.com/grpcreflect v1.2.0 h1:Q6og1S7HinmtbEuBvARLNwYmTbhEGRpHDhqrPNlmK+U= -connectrpc.com/grpcreflect v1.2.0/go.mod h1:nwSOKmE8nU5u/CidgHtPYk1PFI3U9ignz7iDMxOYkSY= -connectrpc.com/otelconnect v0.5.0 h1:K7xQKFbgeaHx563B+IIbd1EJe856AanueIYtGEtdnH8= -connectrpc.com/otelconnect v0.5.0/go.mod h1:cjBMmtJmTokg4/k/3iDjLOjfNVM4qSVfIWz/qWQ8FNw= -github.com/alecthomas/assert/v2 v2.3.0 h1:mAsH2wmvjsuvyBvAmCtm7zFsBlb8mIHx5ySLVdDZXL0= -github.com/alecthomas/assert/v2 v2.3.0/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ= -github.com/alecthomas/concurrency v0.0.2 h1:Q3kGPtLbleMbH9lHX5OBFvJygfyFw29bXZKBg+IEVuo= -github.com/alecthomas/concurrency v0.0.2/go.mod h1:GmuQb/iHX7mbNtPlC/WDzEFxDMB0HYFer2Qda9QTs7w= -github.com/alecthomas/errors v0.4.0 h1:zDIapqdw7gVx2BrQpw3Ll5YRGFuaiB0ywcjesqT0RIE= -github.com/alecthomas/errors v0.4.0/go.mod h1:0DQf6/xQp3f9rv+k72g2NmeTW2lC74kXA6b/8dN9BwY= -github.com/alecthomas/participle/v2 v2.0.0 h1:Fgrq+MbuSsJwIkw3fEj9h75vDP0Er5JzepJ0/HNHv0g= -github.com/alecthomas/participle/v2 v2.0.0/go.mod h1:rAKZdJldHu8084ojcWevWAL8KmEU+AT+Olodb+WoN2Y= -github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk= -github.com/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= -github.com/alecthomas/types v0.7.1 h1:zU49e5jp0MS4sVDq0yEX4uX/jX7aVpvwd+Rm632ZpEQ= -github.com/alecthomas/types v0.7.1/go.mod h1:t7PnU03TVweFpbPVKaeLtFykjJD8rqiBJ7gfkp6UvLQ= -github.com/alessio/shellescape v1.4.1 h1:V7yhSDDn8LP4lc4jS8pFkt0zCnzVJlG5JXy9BVKJUX0= -github.com/alessio/shellescape v1.4.1/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= -github.com/bool64/dev v0.2.31 h1:OS57EqYaYe2M/2bw9uhDCIFiZZwywKFS/4qMLN6JUmQ= -github.com/bool64/dev v0.2.31/go.mod h1:iJbh1y/HkunEPhgebWRNcs8wfGq7sjvJ6W5iabL8ACg= -github.com/bool64/shared v0.1.5 h1:fp3eUhBsrSjNCQPcSdQqZxxh9bBwrYiZ+zOKFkM0/2E= -github.com/bool64/shared v0.1.5/go.mod h1:081yz68YC9jeFB3+Bbmno2RFWvGKv1lPKkMP6MHJlPs= -github.com/danieljoos/wincred v1.1.0 h1:3RNcEpBg4IhIChZdFRSdlQt1QjCp1sMAPIrOnm7Yf8g= -github.com/danieljoos/wincred v1.1.0/go.mod h1:XYlo+eRTsVA9aHGp7NGjFkPla4m+DCL7hqDjlFjiygg= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= -github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= -github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= -github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/hashicorp/golang-lru/v2 v2.0.5 h1:wW7h1TG88eUIJ2i69gaE3uNVtEPIagzhGvHgwfx2Vm4= -github.com/hashicorp/golang-lru/v2 v2.0.5/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= -github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= -github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= -github.com/iancoleman/orderedmap v0.3.0 h1:5cbR2grmZR/DiVt+VJopEhtVs9YGInGIxAoMJn+Ichc= -github.com/iancoleman/orderedmap v0.3.0/go.mod h1:XuLcCUkdL5owUCQeF2Ue9uuw1EptkJDkXXS7VoV7XGE= -github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= -github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= -github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/oklog/ulid/v2 v2.1.0 h1:+9lhoxAP56we25tyYETBBY1YLA2SaoLvUFgrP2miPJU= -github.com/oklog/ulid/v2 v2.1.0/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNsTT1QQ= -github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= -github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/rs/cors v1.9.0 h1:l9HGsTsHJcvW14Nk7J9KFz8bzeAWXn3CG6bgt7LsrAE= -github.com/rs/cors v1.9.0/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= -github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/swaggest/assertjson v1.9.0 h1:dKu0BfJkIxv/xe//mkCrK5yZbs79jL7OVf9Ija7o2xQ= -github.com/swaggest/assertjson v1.9.0/go.mod h1:b+ZKX2VRiUjxfUIal0HDN85W0nHPAYUbYH5WkkSsFsU= -github.com/swaggest/jsonschema-go v0.3.62 h1:eIE0aRklWa2eLJg2L/zqyWpKvgUPbq2oKOtrJGJkPH0= -github.com/swaggest/jsonschema-go v0.3.62/go.mod h1:DYuKqdpms/edvywsX6p1zHXCZkdwB28wRaBdFCe3Duw= -github.com/swaggest/refl v1.3.0 h1:PEUWIku+ZznYfsoyheF97ypSduvMApYyGkYF3nabS0I= -github.com/swaggest/refl v1.3.0/go.mod h1:3Ujvbmh1pfSbDYjC6JGG7nMgPvpG0ehQL4iNonnLNbg= -github.com/yudai/gojsondiff v1.0.0 h1:27cbfqXLVEJ1o8I6v3y9lg8Ydm53EKqHXAOMxEGlCOA= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 h1:BHyfKlQyqbsFN5p3IfnEUduWvb9is428/nNb5L3U01M= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/zalando/go-keyring v0.2.1 h1:MBRN/Z8H4U5wEKXiD67YbDAr5cj/DOStmSga70/2qKc= -github.com/zalando/go-keyring v0.2.1/go.mod h1:g63M2PPn0w5vjmEbwAX3ib5I+41zdm4esSETOn9Y6Dw= -go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= -go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= -go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= -go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= -go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o= -go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A= -go.opentelemetry.io/otel/sdk/metric v1.19.0 h1:EJoTO5qysMsYCa+w4UghwFV/ptQgqSL/8Ni+hx+8i1k= -go.opentelemetry.io/otel/sdk/metric v1.19.0/go.mod h1:XjG0jQyFJrv2PbMvwND7LwCEhsJzCzV5210euduKcKY= -go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= -go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= -golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 h1:m64FZMko/V45gv0bNmrNYoDEq8U5YUhetc9cBWKS1TQ= -golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63/go.mod h1:0v4NqG35kSWCMzLaMeX+IQrlSnVE/bqGSyC2cz/9Le8= -golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= -golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= -golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 h1:Vve/L0v7CXXuxUmaMGIEK/dEeq7uiqb5qBgQrZzIE7E= -golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -lukechampine.com/uint128 v1.2.0 h1:mBi/5l91vocEN8otkC5bDLhi2KdCticRiwbdB0O+rjI= -lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= -modernc.org/cc/v3 v3.40.0 h1:P3g79IUS/93SYhtoeaHW+kRCIrYaxJ27MFPv+7kaTOw= -modernc.org/cc/v3 v3.40.0/go.mod h1:/bTg4dnWkSXowUO6ssQKnOV0yMVxDYNIsIrzqTFDGH0= -modernc.org/ccgo/v3 v3.16.13 h1:Mkgdzl46i5F/CNR/Kj80Ri59hC8TKAhZrYSaqvkwzUw= -modernc.org/ccgo/v3 v3.16.13/go.mod h1:2Quk+5YgpImhPjv2Qsob1DnZ/4som1lJTodubIcoUkY= -modernc.org/libc v1.22.5 h1:91BNch/e5B0uPbJFgqbxXuOnxBQjlS//icfQEGmvyjE= -modernc.org/libc v1.22.5/go.mod h1:jj+Z7dTNX8fBScMVNRAYZ/jF91K8fdT2hYMThc3YjBY= -modernc.org/mathutil v1.5.0 h1:rV0Ko/6SfM+8G+yKiyI830l3Wuz1zRutdslNoQ0kfiQ= -modernc.org/mathutil v1.5.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/memory v1.5.0 h1:N+/8c5rE6EqugZwHii4IFsaJ7MUhoWX07J5tC/iI5Ds= -modernc.org/memory v1.5.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= -modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4= -modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= -modernc.org/sqlite v1.23.1 h1:nrSBg4aRQQwq59JpvGEQ15tNxoO5pX/kUjcRNwSAGQM= -modernc.org/sqlite v1.23.1/go.mod h1:OrDj17Mggn6MhE+iPbBNf7RGKODDE9NFT0f3EwDzJqk= -modernc.org/strutil v1.1.3 h1:fNMm+oJklMGYfU9Ylcywl0CO5O6nTfaowNsh2wpPjzY= -modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw= -modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y= -modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= diff --git a/backend/online-boutique/services/ad-kotlin/pom.xml b/backend/online-boutique/services/ad-kotlin/pom.xml deleted file mode 100644 index d873ce92..00000000 --- a/backend/online-boutique/services/ad-kotlin/pom.xml +++ /dev/null @@ -1,198 +0,0 @@ - - - 4.0.0 - xyz.block - ad-kotlin - 1.0-SNAPSHOT - - - 1.0-SNAPSHOT - 11 - 1.9.0 - true - ${java.version} - ${java.version} - - - - - org.jetbrains.kotlin - kotlin-stdlib - ${kotlin.version} - - - ${project.groupId} - ftl-runtime - ${ftl.version} - - - ${project.groupId} - ftl-generator - ${ftl.version} - - - - - - - kotlin-maven-plugin - org.jetbrains.kotlin - ${kotlin.version} - - - compile - - compile - - - - ${project.basedir}/src/main/kotlin - - - - - test-compile - - test-compile - - - - ${project.basedir}/src/test/kotlin - - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - 3.2.0 - - - initialize - - copy - - - - - xyz.block - ftl-generator - ${ftl.version} - jar-with-dependencies - ftl-generator.jar - - - xyz.block - ftl-runtime - ${ftl.version} - jar-with-dependencies - ftl-runtime.jar - - - - - - copy-dependencies - compile - - copy-dependencies - - - ${project.build.directory}/dependency - runtime - - - - build-classpath - compile - - build-classpath - - - ${project.build.directory}/classpath.txt - generated.classpath - ${project.build.directory}/dependency - - - - - - - org.codehaus.mojo - exec-maven-plugin - 3.0.0 - - - initialize - - exec - - - java - - -jar - target/dependency/ftl-generator.jar - --endpoint=http://127.0.0.1:8892 - --dest=${project.build.directory} - --module=ad - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 3.2.0 - - - generate-sources - - add-source - - - - ${project.build.directory}/generated-sources/ftl - - - - - - - com.github.ozsie - detekt-maven-plugin - 1.23.3 - - true - ${generated.classpath} - ${java.version} - ${project.build.directory}/detekt.yml - - - ${project.build.directory}/dependency/ftl-runtime-${ftl.version}.jar - - - - - - compile - - check-with-type-resolution - - - - - - xyz.block - ftl-runtime - ${ftl.version} - - - - - - \ No newline at end of file diff --git a/backend/online-boutique/services/ad-kotlin/src/main/kotlin/ftl/ad/Ad.kt b/backend/online-boutique/services/ad-kotlin/src/main/kotlin/ftl/ad/Ad.kt deleted file mode 100644 index ea57769f..00000000 --- a/backend/online-boutique/services/ad-kotlin/src/main/kotlin/ftl/ad/Ad.kt +++ /dev/null @@ -1,78 +0,0 @@ -package ftl.ad - -import com.google.gson.Gson -import com.google.gson.annotations.SerializedName -import com.google.gson.reflect.TypeToken -import xyz.block.ftl.Context -import xyz.block.ftl.Ingress -import xyz.block.ftl.Method -import xyz.block.ftl.Verb -import xyz.block.ftl.serializer.makeGson -import java.util.* - -data class Ad(@SerializedName("RedirectURL") val redirectUrl: String, @SerializedName("Text") val text: String) -data class AdRequest(val contextKeys: List) -data class AdResponse(val ads: List) - -class AdModule { - private val database: Map = loadDatabase() - - @Throws(Exception::class) - @Verb - @Ingress(Method.GET, "/get") - fun get(context: Context, req: AdRequest): AdResponse { - return when { - req.contextKeys.isNotEmpty() -> AdResponse(ads = contextualAds(req.contextKeys)) - else -> AdResponse(ads = randomAds()) - } - } - - private fun contextualAds(contextKeys: List): List { - return contextKeys.map { database[it] ?: throw Exception("no ad registered for this context key") } - } - - private fun randomAds(): List { - val ads = mutableListOf() - val random = Random() - repeat(MAX_ADS_TO_SERVE) { - ads.add(database.entries.elementAt(random.nextInt(database.size)).value) - } - return ads - } - - companion object { - private const val MAX_ADS_TO_SERVE = 2 - private const val DATABASE_JSON = "{\n" + - " \"hair\": {\n" + - " \"RedirectURL\": \"/product/2ZYFJ3GM2N\",\n" + - " \"Text\": \"Hairdryer for sale. 50% off.\"\n" + - " },\n" + - " \"clothing\": {\n" + - " \"RedirectURL\": \"/product/66VCHSJNUP\",\n" + - " \"Text\": \"Tank top for sale. 20% off.\"\n" + - " },\n" + - " \"accessories\": {\n" + - " \"RedirectURL\": \"/product/1YMWWN1N4O\",\n" + - " \"Text\": \"Watch for sale. Buy one, get second kit for free\"\n" + - " },\n" + - " \"footwear\": {\n" + - " \"RedirectURL\": \"/product/L9ECAV7KIM\",\n" + - " \"Text\": \"Loafers for sale. Buy one, get second one for free\"\n" + - " },\n" + - " \"decor\": {\n" + - " \"RedirectURL\": \"/product/0PUK6V6EV0\",\n" + - " \"Text\": \"Candle holder for sale. 30% off.\"\n" + - " },\n" + - " \"kitchen\": {\n" + - " \"RedirectURL\": \"/product/9SIQT8TOJO\",\n" + - " \"Text\": \"Bamboo glass jar for sale. 10% off.\"\n" + - " }\n" + - "}" - - private fun loadDatabase(): Map { - return makeGson().fromJson>(DATABASE_JSON) - } - - inline fun Gson.fromJson(json: String) = fromJson(json, object : TypeToken() {}.type) - } -} diff --git a/backend/online-boutique/services/ad/ad.go b/backend/online-boutique/services/ad/ad.go index a9ca5752..63024c78 100644 --- a/backend/online-boutique/services/ad/ad.go +++ b/backend/online-boutique/services/ad/ad.go @@ -6,9 +6,8 @@ import ( _ "embed" "math/rand" - "golang.org/x/exp/maps" - "github.com/TBD54566975/ftl/examples/online-boutique/common" + "golang.org/x/exp/maps" ) const maxAdsToServe = 2 @@ -29,7 +28,8 @@ type Ad struct { } type AdResponse struct { - Ads []Ad + Name string + Ads []Ad } //ftl:verb diff --git a/backend/online-boutique/services/ad/ftl.toml b/backend/online-boutique/services/ad/ftl.toml index cf1f57ac..ad433ebe 100644 --- a/backend/online-boutique/services/ad/ftl.toml +++ b/backend/online-boutique/services/ad/ftl.toml @@ -1,5 +1,2 @@ module = "ad" language = "go" -deploy = [ - "main" -] diff --git a/backend/online-boutique/services/ad/go.mod b/backend/online-boutique/services/ad/go.mod new file mode 100644 index 00000000..b44a3d07 --- /dev/null +++ b/backend/online-boutique/services/ad/go.mod @@ -0,0 +1,10 @@ +module ftl/ad + +go 1.21.6 + +replace github.com/TBD54566975/ftl/examples/online-boutique => ../.. + +require ( + github.com/TBD54566975/ftl/examples/online-boutique v0.0.0-00010101000000-000000000000 + golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 +) diff --git a/backend/online-boutique/services/ad/go.sum b/backend/online-boutique/services/ad/go.sum new file mode 100644 index 00000000..3707af3c --- /dev/null +++ b/backend/online-boutique/services/ad/go.sum @@ -0,0 +1,2 @@ +golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 h1:hNQpMuAJe5CtcUqCXaWga3FHu+kQvCqcsoVaQgSV60o= +golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= diff --git a/backend/online-boutique/services/ad/main b/backend/online-boutique/services/ad/main deleted file mode 100644 index 9ee66d2ab56b2a3b24defd05f669a802c8d2b75c..0000000000000000000000000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vuc5nBYTskX0Wik_^UPf$4l}1l+t46z{zJMJa+2K8` z^%Uo~53yW6UyY}sLo11&bTNHu^rt5`67})nNAI0du6r9wZbg!pV>wKhUjF_)&B){S z%EBrG3?n-Uq z{!G8H@AY3cGhS}b^iMxZ{C*?-_TBUJBJ6aiR;O0-ZOMx=f)1<))4}+ztBA7NG+)-m zyQSjN?ee~JVPB@1@h5#2{KDqq@j`nm(O`V*#FRBkai&RHKOWYHDYLnM;qLcBEu6=6 zzekDv!1P;ReeHNN_VIeJyr0<16+XT4_uUV*q7U8PQer)rUU~awOY184`|ev^?=~|I zwj=jD`@;K6nCI)R{|7yF&2My3_Tz=_-?Xxh;HK3irhaiT#FB$_cly)E;dT_ z^NriEow&?2$(cI3*DtfaOyeKlc%~V@aC@e|J%1_EOus>2Zpx>>_}jC1n%w;Q?m-_I z2k$d!g0P-qCMtgk;@U*VTiYt$cGqyG3B^*;dW WhYx ../.. + +require github.com/hashicorp/golang-lru/v2 v2.0.7 diff --git a/backend/online-boutique/services/cart/go.sum b/backend/online-boutique/services/cart/go.sum new file mode 100644 index 00000000..a33c54a1 --- /dev/null +++ b/backend/online-boutique/services/cart/go.sum @@ -0,0 +1,2 @@ +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= diff --git a/backend/online-boutique/services/checkout/checkout.go b/backend/online-boutique/services/checkout/checkout.go index 85f5a011..fd020495 100644 --- a/backend/online-boutique/services/checkout/checkout.go +++ b/backend/online-boutique/services/checkout/checkout.go @@ -7,13 +7,14 @@ import ( "github.com/google/uuid" + "ftl/cart" + "ftl/currency" + "ftl/payment" + "ftl/productcatalog" + "ftl/shipping" + "github.com/TBD54566975/ftl/backend/common/slices" "github.com/TBD54566975/ftl/examples/online-boutique/common/money" - "github.com/TBD54566975/ftl/examples/online-boutique/services/cart" - "github.com/TBD54566975/ftl/examples/online-boutique/services/currency" - "github.com/TBD54566975/ftl/examples/online-boutique/services/payment" - "github.com/TBD54566975/ftl/examples/online-boutique/services/productcatalog" - "github.com/TBD54566975/ftl/examples/online-boutique/services/shipping" ftl "github.com/TBD54566975/ftl/go-runtime/sdk" ) @@ -28,19 +29,19 @@ type PlaceOrderRequest struct { type OrderItem struct { Item cart.Item - Cost money.Money + Cost currency.Money } type Order struct { ID string ShippingTrackingID string - ShippingCost money.Money + ShippingCost currency.Money ShippingAddress shipping.Address Items []OrderItem } //ftl:verb -//ftl:ingress POST /checkout +//ftl:ingress POST /checkout/{userID} func PlaceOrder(ctx context.Context, req PlaceOrderRequest) (Order, error) { cartItems, err := ftl.Call(ctx, cart.GetCart, cart.GetCartRequest{UserID: req.UserID}) if err != nil { @@ -49,7 +50,7 @@ func PlaceOrder(ctx context.Context, req PlaceOrderRequest) (Order, error) { orders := make([]OrderItem, len(cartItems.Items)) for i, item := range cartItems.Items { - product, err := ftl.Call(ctx, productcatalog.Get, productcatalog.GetRequest{ID: item.ProductID}) + product, err := ftl.Call(ctx, productcatalog.Get, productcatalog.GetRequest{Id: item.ProductID}) if err != nil { return Order{}, fmt.Errorf("failed to get product #%q: %w", item.ProductID, err) } @@ -81,7 +82,7 @@ func PlaceOrder(ctx context.Context, req PlaceOrderRequest) (Order, error) { return Order{}, fmt.Errorf("failed to convert shipping cost to currency: %w", err) } - total := money.Money{CurrencyCode: req.UserCurrency} + total := currency.Money{CurrencyCode: req.UserCurrency} total = money.Must(money.Sum(total, shippingPrice)) for _, it := range orders { multPrice := money.MultiplySlow(it.Cost, uint32(it.Item.Quantity)) @@ -103,14 +104,14 @@ func PlaceOrder(ctx context.Context, req PlaceOrderRequest) (Order, error) { if err != nil { return Order{}, fmt.Errorf("shipping error: %w", err) } - fmt.Printf("Shipped order, tracking ID %s", shippingTrackingID.ID) + fmt.Printf("Shipped order, tracking ID %s", shippingTrackingID.Id) // Empty the cart, but don't worry about errors. _, _ = ftl.Call(ctx, cart.EmptyCart, cart.EmptyCartRequest{UserID: req.UserID}) order := Order{ ID: uuid.New().String(), - ShippingTrackingID: shippingTrackingID.ID, + ShippingTrackingID: shippingTrackingID.Id, ShippingCost: shippingPrice, ShippingAddress: req.Address, Items: orders, diff --git a/backend/online-boutique/services/checkout/ftl.toml b/backend/online-boutique/services/checkout/ftl.toml new file mode 100644 index 00000000..6096398f --- /dev/null +++ b/backend/online-boutique/services/checkout/ftl.toml @@ -0,0 +1,2 @@ +module = "checkout" +language = "go" diff --git a/backend/online-boutique/services/checkout/go.mod b/backend/online-boutique/services/checkout/go.mod new file mode 100644 index 00000000..f2b1ef2d --- /dev/null +++ b/backend/online-boutique/services/checkout/go.mod @@ -0,0 +1,49 @@ +module ftl/checkout + +go 1.21.6 + +replace github.com/TBD54566975/ftl/examples/online-boutique => ../.. + +require ( + github.com/TBD54566975/ftl v0.99.0 + github.com/TBD54566975/ftl/examples/online-boutique v0.0.0-00010101000000-000000000000 + github.com/google/uuid v1.5.0 +) + +require ( + connectrpc.com/connect v1.14.0 // indirect + connectrpc.com/grpcreflect v1.2.0 // indirect + connectrpc.com/otelconnect v0.7.0 // indirect + github.com/alecthomas/concurrency v0.0.2 // indirect + github.com/alecthomas/participle/v2 v2.1.1 // indirect + github.com/alecthomas/types v0.9.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/iancoleman/strcase v0.2.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.2 // 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/swaggest/refl v1.3.0 // indirect + github.com/zalando/go-keyring v0.2.3 // indirect + go.opentelemetry.io/otel v1.21.0 // indirect + go.opentelemetry.io/otel/metric v1.21.0 // indirect + go.opentelemetry.io/otel/trace v1.21.0 // indirect + golang.design/x/reflect v0.0.0-20220504060917-02c43be63f3b // indirect + golang.org/x/crypto v0.18.0 // indirect + golang.org/x/exp v0.0.0-20231127185646-65229373498e // indirect + golang.org/x/mod v0.14.0 // indirect + golang.org/x/net v0.20.0 // indirect + golang.org/x/sync v0.6.0 // indirect + golang.org/x/sys v0.16.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/protobuf v1.32.0 // indirect +) diff --git a/backend/online-boutique/services/checkout/go.sum b/backend/online-boutique/services/checkout/go.sum new file mode 100644 index 00000000..fd3ee3fb --- /dev/null +++ b/backend/online-boutique/services/checkout/go.sum @@ -0,0 +1,147 @@ +connectrpc.com/connect v1.14.0 h1:PDS+J7uoz5Oui2VEOMcfz6Qft7opQM9hPiKvtGC01pA= +connectrpc.com/connect v1.14.0/go.mod h1:uoAq5bmhhn43TwhaKdGKN/bZcGtzPW1v+ngDTn5u+8s= +connectrpc.com/grpcreflect v1.2.0 h1:Q6og1S7HinmtbEuBvARLNwYmTbhEGRpHDhqrPNlmK+U= +connectrpc.com/grpcreflect v1.2.0/go.mod h1:nwSOKmE8nU5u/CidgHtPYk1PFI3U9ignz7iDMxOYkSY= +connectrpc.com/otelconnect v0.7.0 h1:ZH55ZZtcJOTKWWLy3qmL4Pam4RzRWBJFOqTPyAqCXkY= +connectrpc.com/otelconnect v0.7.0/go.mod h1:Bt2ivBymHZHqxvo4HkJ0EwHuUzQN6k2l0oH+mp/8nwc= +github.com/TBD54566975/ftl v0.99.0 h1:IBdJoPwajme+8EUwlLQPwT+aVgLWM4OibO3Dbamf80w= +github.com/TBD54566975/ftl v0.99.0/go.mod h1:KJrJ1KFFWdXFoZghKYBkHbrCkUaQYfcLhFs9jOZ4mcc= +github.com/alecthomas/assert/v2 v2.4.1 h1:mwPZod/d35nlaCppr6sFP0rbCL05WH9fIo7lvsf47zo= +github.com/alecthomas/assert/v2 v2.4.1/go.mod h1:fw5suVxB+wfYJ3291t0hRTqtGzFYdSwstnRQdaQx2DM= +github.com/alecthomas/concurrency v0.0.2 h1:Q3kGPtLbleMbH9lHX5OBFvJygfyFw29bXZKBg+IEVuo= +github.com/alecthomas/concurrency v0.0.2/go.mod h1:GmuQb/iHX7mbNtPlC/WDzEFxDMB0HYFer2Qda9QTs7w= +github.com/alecthomas/participle/v2 v2.1.1 h1:hrjKESvSqGHzRb4yW1ciisFJ4p3MGYih6icjJvbsmV8= +github.com/alecthomas/participle/v2 v2.1.1/go.mod h1:Y1+hAs8DHPmc3YUFzqllV+eSQ9ljPTk0ZkPMtEdAx2c= +github.com/alecthomas/repr v0.3.0 h1:NeYzUPfjjlqHY4KtzgKJiWd6sVq2eNUPTi34PiFGjY8= +github.com/alecthomas/repr v0.3.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= +github.com/alecthomas/types v0.9.0 h1:g/P/fNElr7Ot1tWxSEms/I2gnRemxAqGNeetW6HOlO4= +github.com/alecthomas/types v0.9.0/go.mod h1:t7PnU03TVweFpbPVKaeLtFykjJD8rqiBJ7gfkp6UvLQ= +github.com/alessio/shellescape v1.4.2 h1:MHPfaU+ddJ0/bYWpgIeUnQUqKrlJ1S7BfEYPM4uEoM0= +github.com/alessio/shellescape v1.4.2/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= +github.com/bool64/dev v0.2.31 h1:OS57EqYaYe2M/2bw9uhDCIFiZZwywKFS/4qMLN6JUmQ= +github.com/bool64/dev v0.2.31/go.mod h1:iJbh1y/HkunEPhgebWRNcs8wfGq7sjvJ6W5iabL8ACg= +github.com/bool64/shared v0.1.5 h1:fp3eUhBsrSjNCQPcSdQqZxxh9bBwrYiZ+zOKFkM0/2E= +github.com/bool64/shared v0.1.5/go.mod h1:081yz68YC9jeFB3+Bbmno2RFWvGKv1lPKkMP6MHJlPs= +github.com/danieljoos/wincred v1.2.0 h1:ozqKHaLK0W/ii4KVbbvluM91W2H3Sh0BncbUNPS7jLE= +github.com/danieljoos/wincred v1.2.0/go.mod h1:FzQLLMKBFdvu+osBrnFODiv32YGwCfx0SkRa/eYHgec= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= +github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU= +github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= +github.com/iancoleman/orderedmap v0.3.0 h1:5cbR2grmZR/DiVt+VJopEhtVs9YGInGIxAoMJn+Ichc= +github.com/iancoleman/orderedmap v0.3.0/go.mod h1:XuLcCUkdL5owUCQeF2Ue9uuw1EptkJDkXXS7VoV7XGE= +github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= +github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= +github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= +github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= +github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= +github.com/jackc/pgx/v5 v5.5.2 h1:iLlpgp4Cp/gC9Xuscl7lFL1PhhW+ZLtXZcrfCt4C3tA= +github.com/jackc/pgx/v5 v5.5.2/go.mod h1:ez9gk+OAat140fv9ErkZDYFWmXLfV+++K0uAOiwgm1A= +github.com/jackc/puddle/v2 v2.2.1 h1:RhxXJtFG022u4ibrCSMSiu5aOq1i77R3OHKNJj77OAk= +github.com/jackc/puddle/v2 v2.2.1/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= +github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= +github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/oklog/ulid/v2 v2.1.0 h1:+9lhoxAP56we25tyYETBBY1YLA2SaoLvUFgrP2miPJU= +github.com/oklog/ulid/v2 v2.1.0/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNsTT1QQ= +github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= +github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= +github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 h1:lZUw3E0/J3roVtGQ+SCrUrg3ON6NgVqpn3+iol9aGu4= +github.com/santhosh-tekuri/jsonschema/v5 v5.3.1/go.mod h1:uToXkOrWAZ6/Oc07xWQrPOhJotwFIyu2bBVN41fcDUY= +github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= +github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/swaggest/assertjson v1.9.0 h1:dKu0BfJkIxv/xe//mkCrK5yZbs79jL7OVf9Ija7o2xQ= +github.com/swaggest/assertjson v1.9.0/go.mod h1:b+ZKX2VRiUjxfUIal0HDN85W0nHPAYUbYH5WkkSsFsU= +github.com/swaggest/jsonschema-go v0.3.64 h1:HyB41fkA4XP0BZkqWfGap5i2JtRHQGXG/21dGDPbyLM= +github.com/swaggest/jsonschema-go v0.3.64/go.mod h1:DYuKqdpms/edvywsX6p1zHXCZkdwB28wRaBdFCe3Duw= +github.com/swaggest/refl v1.3.0 h1:PEUWIku+ZznYfsoyheF97ypSduvMApYyGkYF3nabS0I= +github.com/swaggest/refl v1.3.0/go.mod h1:3Ujvbmh1pfSbDYjC6JGG7nMgPvpG0ehQL4iNonnLNbg= +github.com/yudai/gojsondiff v1.0.0 h1:27cbfqXLVEJ1o8I6v3y9lg8Ydm53EKqHXAOMxEGlCOA= +github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 h1:BHyfKlQyqbsFN5p3IfnEUduWvb9is428/nNb5L3U01M= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= +github.com/zalando/go-keyring v0.2.3 h1:v9CUu9phlABObO4LPWycf+zwMG7nlbb3t/B5wa97yms= +github.com/zalando/go-keyring v0.2.3/go.mod h1:HL4k+OXQfJUWaMnqyuSOc0drfGPX2b51Du6K+MRgZMk= +go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc= +go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo= +go.opentelemetry.io/otel/metric v1.21.0 h1:tlYWfeo+Bocx5kLEloTjbcDwBuELRrIFxwdQ36PlJu4= +go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM= +go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= +go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= +go.opentelemetry.io/otel/sdk/metric v1.21.0 h1:smhI5oD714d6jHE6Tie36fPx4WDFIg+Y6RfAY4ICcR0= +go.opentelemetry.io/otel/sdk/metric v1.21.0/go.mod h1:FJ8RAsoPGv/wYMgBdUJXOm+6pzFY3YdljnXtv1SBE8Q= +go.opentelemetry.io/otel/trace v1.21.0 h1:WD9i5gzvoUPuXIXH24ZNBudiarZDKuekPqi/E8fpfLc= +go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ= +golang.design/x/reflect v0.0.0-20220504060917-02c43be63f3b h1:lkOPTy76R9NZ6FeDQWkDj3NsLtD8Csc9AAFYEl3kiME= +golang.design/x/reflect v0.0.0-20220504060917-02c43be63f3b/go.mod h1:QXG482h3unP32W/YwIPOc+09bvY447B7T+iLjC/JPcA= +golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= +golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= +golang.org/x/exp v0.0.0-20231127185646-65229373498e h1:Gvh4YaCaXNs6dKTlfgismwWZKyjVZXwOPfIyUaqU3No= +golang.org/x/exp v0.0.0-20231127185646-65229373498e/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= +golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +lukechampine.com/uint128 v1.2.0 h1:mBi/5l91vocEN8otkC5bDLhi2KdCticRiwbdB0O+rjI= +lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= +modernc.org/cc/v3 v3.40.0 h1:P3g79IUS/93SYhtoeaHW+kRCIrYaxJ27MFPv+7kaTOw= +modernc.org/cc/v3 v3.40.0/go.mod h1:/bTg4dnWkSXowUO6ssQKnOV0yMVxDYNIsIrzqTFDGH0= +modernc.org/ccgo/v3 v3.16.13 h1:Mkgdzl46i5F/CNR/Kj80Ri59hC8TKAhZrYSaqvkwzUw= +modernc.org/ccgo/v3 v3.16.13/go.mod h1:2Quk+5YgpImhPjv2Qsob1DnZ/4som1lJTodubIcoUkY= +modernc.org/libc v1.29.0 h1:tTFRFq69YKCF2QyGNuRUQxKBm1uZZLubf6Cjh/pVHXs= +modernc.org/libc v1.29.0/go.mod h1:DaG/4Q3LRRdqpiLyP0C2m1B8ZMGkQ+cCgOIjEtQlYhQ= +modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4= +modernc.org/mathutil v1.6.0/go.mod h1:Ui5Q9q1TR2gFm0AQRqQUaBWFLAhQpCwNcuhBOSedWPo= +modernc.org/memory v1.7.2 h1:Klh90S215mmH8c9gO98QxQFsY+W451E8AnzjoE2ee1E= +modernc.org/memory v1.7.2/go.mod h1:NO4NVCQy0N7ln+T9ngWqOQfi7ley4vpwvARR+Hjw95E= +modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4= +modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= +modernc.org/sqlite v1.28.0 h1:Zx+LyDDmXczNnEQdvPuEfcFVA2ZPyaD7UCZDjef3BHQ= +modernc.org/sqlite v1.28.0/go.mod h1:Qxpazz0zH8Z1xCFyi5GSL3FzbtZ3fvbjmywNogldEW0= +modernc.org/strutil v1.1.3 h1:fNMm+oJklMGYfU9Ylcywl0CO5O6nTfaowNsh2wpPjzY= +modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw= +modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y= +modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= diff --git a/backend/online-boutique/services/currency/currency.go b/backend/online-boutique/services/currency/currency.go index cf0d9775..5e153031 100644 --- a/backend/online-boutique/services/currency/currency.go +++ b/backend/online-boutique/services/currency/currency.go @@ -10,7 +10,6 @@ import ( "golang.org/x/exp/maps" "github.com/TBD54566975/ftl/examples/online-boutique/common" - "github.com/TBD54566975/ftl/examples/online-boutique/common/money" ) var ( @@ -19,6 +18,24 @@ var ( database = common.LoadDatabase[map[string]float64](databaseJSON) ) +// Money represents an amount of money along with the currency type. +type Money struct { + // The 3-letter currency code defined in ISO 4217. + CurrencyCode string `json:"currencyCode"` + + // The whole units of the amount. + // For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. + Units int `json:"units"` + + // Number of nano (10^-9) units of the amount. + // The value must be between -999,999,999 and +999,999,999 inclusive. + // If `units` is positive, `nanos` must be positive or zero. + // If `units` is zero, `nanos` can be positive, zero, or negative. + // If `units` is negative, `nanos` must be negative or zero. + // For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. + Nanos int `json:"nanos"` +} + type GetSupportedCurrenciesRequest struct { } @@ -33,21 +50,21 @@ func GetSupportedCurrencies(ctx context.Context, req GetSupportedCurrenciesReque } type ConvertRequest struct { - From money.Money + From Money ToCode string } //ftl:verb //ftl:ingress POST /currency/convert -func Convert(ctx context.Context, req ConvertRequest) (money.Money, error) { +func Convert(ctx context.Context, req ConvertRequest) (Money, error) { from := req.From fromRate, ok := database[from.CurrencyCode] if !ok { - return money.Money{}, fmt.Errorf("unknown origin currency %q", req.From.CurrencyCode) + return Money{}, fmt.Errorf("unknown origin currency %q", req.From.CurrencyCode) } toRate, ok := database[req.ToCode] if !ok { - return money.Money{}, fmt.Errorf("unknown destination currency %q", req.ToCode) + return Money{}, fmt.Errorf("unknown destination currency %q", req.ToCode) } euros := carry(float64(from.Units)/fromRate, float64(from.Nanos)/fromRate) to := carry(float64(euros.Units)*toRate, float64(euros.Nanos)*toRate) @@ -56,12 +73,12 @@ func Convert(ctx context.Context, req ConvertRequest) (money.Money, error) { } // carry is a helper function that handles decimal/fractional carrying. -func carry(units float64, nanos float64) money.Money { +func carry(units float64, nanos float64) Money { const fractionSize = 1000000000 // 1B nanos += math.Mod(units, 1.0) * fractionSize units = math.Floor(units) + math.Floor(nanos/fractionSize) nanos = math.Mod(nanos, fractionSize) - return money.Money{ + return Money{ Units: int(units), Nanos: int(nanos), } diff --git a/backend/online-boutique/services/currency/ftl.toml b/backend/online-boutique/services/currency/ftl.toml new file mode 100644 index 00000000..07218ce6 --- /dev/null +++ b/backend/online-boutique/services/currency/ftl.toml @@ -0,0 +1,2 @@ +module = "currency" +language = "go" diff --git a/backend/online-boutique/services/currency/go.mod b/backend/online-boutique/services/currency/go.mod new file mode 100644 index 00000000..f6ba4a87 --- /dev/null +++ b/backend/online-boutique/services/currency/go.mod @@ -0,0 +1,10 @@ +module ftl/currency + +go 1.21.6 + +replace github.com/TBD54566975/ftl/examples/online-boutique => ../.. + +require ( + github.com/TBD54566975/ftl/examples/online-boutique v0.0.0-00010101000000-000000000000 + golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 +) diff --git a/backend/online-boutique/services/currency/go.sum b/backend/online-boutique/services/currency/go.sum new file mode 100644 index 00000000..3707af3c --- /dev/null +++ b/backend/online-boutique/services/currency/go.sum @@ -0,0 +1,2 @@ +golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 h1:hNQpMuAJe5CtcUqCXaWga3FHu+kQvCqcsoVaQgSV60o= +golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= diff --git a/backend/online-boutique/services/echo/generated_ftl_module.go b/backend/online-boutique/services/echo/generated_ftl_module.go deleted file mode 100644 index 1e6a4c37..00000000 --- a/backend/online-boutique/services/echo/generated_ftl_module.go +++ /dev/null @@ -1,6 +0,0 @@ -//ftl:module echo -package echo - -import ( - "context" -) diff --git a/backend/online-boutique/services/email/email.go b/backend/online-boutique/services/email/email.go deleted file mode 100644 index 8774a6ef..00000000 --- a/backend/online-boutique/services/email/email.go +++ /dev/null @@ -1 +0,0 @@ -package email diff --git a/backend/online-boutique/services/payment/ftl.toml b/backend/online-boutique/services/payment/ftl.toml new file mode 100644 index 00000000..cd591d5b --- /dev/null +++ b/backend/online-boutique/services/payment/ftl.toml @@ -0,0 +1,2 @@ +module = "payment" +language = "go" diff --git a/backend/online-boutique/services/payment/go.mod b/backend/online-boutique/services/payment/go.mod new file mode 100644 index 00000000..934e6e6f --- /dev/null +++ b/backend/online-boutique/services/payment/go.mod @@ -0,0 +1,7 @@ +module ftl/payment + +go 1.21.6 + +replace github.com/TBD54566975/ftl/examples/online-boutique => ../.. + +require github.com/google/uuid v1.5.0 diff --git a/backend/online-boutique/services/payment/go.sum b/backend/online-boutique/services/payment/go.sum new file mode 100644 index 00000000..040e2213 --- /dev/null +++ b/backend/online-boutique/services/payment/go.sum @@ -0,0 +1,2 @@ +github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU= +github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= diff --git a/backend/online-boutique/services/payment/payment.go b/backend/online-boutique/services/payment/payment.go index adc54bcb..588293db 100644 --- a/backend/online-boutique/services/payment/payment.go +++ b/backend/online-boutique/services/payment/payment.go @@ -9,7 +9,7 @@ import ( "github.com/google/uuid" - "github.com/TBD54566975/ftl/examples/online-boutique/common/money" + "ftl/currency" ) type InvalidCreditCardErr struct{} @@ -43,7 +43,7 @@ func (c CreditCardInfo) LastFour() string { } type ChargeRequest struct { - Amount money.Money + Amount currency.Money CreditCard CreditCardInfo } diff --git a/backend/online-boutique/services/productcatalog/ftl.toml b/backend/online-boutique/services/productcatalog/ftl.toml new file mode 100644 index 00000000..b66dc497 --- /dev/null +++ b/backend/online-boutique/services/productcatalog/ftl.toml @@ -0,0 +1,2 @@ +module = "productcatalog" +language = "go" diff --git a/backend/online-boutique/services/productcatalog/go.mod b/backend/online-boutique/services/productcatalog/go.mod new file mode 100644 index 00000000..928224da --- /dev/null +++ b/backend/online-boutique/services/productcatalog/go.mod @@ -0,0 +1,7 @@ +module ftl/productcatalog + +go 1.21.6 + +replace github.com/TBD54566975/ftl/examples/online-boutique => ../.. + +require github.com/TBD54566975/ftl/examples/online-boutique v0.0.0-00010101000000-000000000000 diff --git a/backend/online-boutique/services/productcatalog/go.sum b/backend/online-boutique/services/productcatalog/go.sum new file mode 100644 index 00000000..e69de29b diff --git a/backend/online-boutique/services/productcatalog/productcatalog.go b/backend/online-boutique/services/productcatalog/productcatalog.go index d07d7519..dfc9af0d 100644 --- a/backend/online-boutique/services/productcatalog/productcatalog.go +++ b/backend/online-boutique/services/productcatalog/productcatalog.go @@ -4,12 +4,12 @@ package productcatalog import ( "context" _ "embed" + "fmt" "strings" - "github.com/alecthomas/errors" + "ftl/currency" "github.com/TBD54566975/ftl/examples/online-boutique/common" - "github.com/TBD54566975/ftl/examples/online-boutique/common/money" ) var ( @@ -19,11 +19,11 @@ var ( ) type Product struct { - ID string `json:"id"` - Name string `json:"name"` - Description string `json:"description"` - Picture string `json:"picture"` - PriceUSD money.Money `json:"priceUSD"` + ID string `json:"id"` + Name string `json:"name"` + Description string `json:"description"` + Picture string `json:"picture"` + PriceUSD currency.Money `json:"priceUSD"` // Categories such as "clothing" or "kitchen" that can be used to look up // other related products. @@ -47,14 +47,14 @@ type GetRequest struct { } //ftl:verb -//ftl:ingress GET /productcatalog/id +//ftl:ingress GET /productcatalog/{id} func Get(ctx context.Context, req GetRequest) (Product, error) { for _, p := range database { if p.ID == req.ID { return p, nil } } - return Product{}, errors.Errorf("product not found: %q", req.ID) + return Product{}, fmt.Errorf("product not found: %q", req.ID) } type SearchRequest struct { diff --git a/backend/online-boutique/services/recommendation/ftl.toml b/backend/online-boutique/services/recommendation/ftl.toml new file mode 100644 index 00000000..b9adcbd9 --- /dev/null +++ b/backend/online-boutique/services/recommendation/ftl.toml @@ -0,0 +1,2 @@ +module = "recommendation" +language = "go" diff --git a/backend/online-boutique/services/recommendation/go.mod b/backend/online-boutique/services/recommendation/go.mod new file mode 100644 index 00000000..98cb2547 --- /dev/null +++ b/backend/online-boutique/services/recommendation/go.mod @@ -0,0 +1,46 @@ +module ftl/recommendation + +go 1.21.6 + +replace github.com/TBD54566975/ftl/examples/online-boutique => ../.. + +require github.com/TBD54566975/ftl v0.99.0 + +require ( + connectrpc.com/connect v1.14.0 // indirect + connectrpc.com/grpcreflect v1.2.0 // indirect + connectrpc.com/otelconnect v0.7.0 // indirect + github.com/alecthomas/concurrency v0.0.2 // indirect + github.com/alecthomas/participle/v2 v2.1.1 // indirect + github.com/alecthomas/types v0.9.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.5.0 // indirect + github.com/iancoleman/strcase v0.2.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.2 // 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/swaggest/refl v1.3.0 // indirect + github.com/zalando/go-keyring v0.2.3 // indirect + go.opentelemetry.io/otel v1.21.0 // indirect + go.opentelemetry.io/otel/metric v1.21.0 // indirect + go.opentelemetry.io/otel/trace v1.21.0 // indirect + golang.design/x/reflect v0.0.0-20220504060917-02c43be63f3b // indirect + golang.org/x/crypto v0.18.0 // indirect + golang.org/x/exp v0.0.0-20231127185646-65229373498e // indirect + golang.org/x/mod v0.14.0 // indirect + golang.org/x/net v0.20.0 // indirect + golang.org/x/sync v0.6.0 // indirect + golang.org/x/sys v0.16.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/protobuf v1.32.0 // indirect +) diff --git a/backend/online-boutique/services/recommendation/go.sum b/backend/online-boutique/services/recommendation/go.sum new file mode 100644 index 00000000..fd3ee3fb --- /dev/null +++ b/backend/online-boutique/services/recommendation/go.sum @@ -0,0 +1,147 @@ +connectrpc.com/connect v1.14.0 h1:PDS+J7uoz5Oui2VEOMcfz6Qft7opQM9hPiKvtGC01pA= +connectrpc.com/connect v1.14.0/go.mod h1:uoAq5bmhhn43TwhaKdGKN/bZcGtzPW1v+ngDTn5u+8s= +connectrpc.com/grpcreflect v1.2.0 h1:Q6og1S7HinmtbEuBvARLNwYmTbhEGRpHDhqrPNlmK+U= +connectrpc.com/grpcreflect v1.2.0/go.mod h1:nwSOKmE8nU5u/CidgHtPYk1PFI3U9ignz7iDMxOYkSY= +connectrpc.com/otelconnect v0.7.0 h1:ZH55ZZtcJOTKWWLy3qmL4Pam4RzRWBJFOqTPyAqCXkY= +connectrpc.com/otelconnect v0.7.0/go.mod h1:Bt2ivBymHZHqxvo4HkJ0EwHuUzQN6k2l0oH+mp/8nwc= +github.com/TBD54566975/ftl v0.99.0 h1:IBdJoPwajme+8EUwlLQPwT+aVgLWM4OibO3Dbamf80w= +github.com/TBD54566975/ftl v0.99.0/go.mod h1:KJrJ1KFFWdXFoZghKYBkHbrCkUaQYfcLhFs9jOZ4mcc= +github.com/alecthomas/assert/v2 v2.4.1 h1:mwPZod/d35nlaCppr6sFP0rbCL05WH9fIo7lvsf47zo= +github.com/alecthomas/assert/v2 v2.4.1/go.mod h1:fw5suVxB+wfYJ3291t0hRTqtGzFYdSwstnRQdaQx2DM= +github.com/alecthomas/concurrency v0.0.2 h1:Q3kGPtLbleMbH9lHX5OBFvJygfyFw29bXZKBg+IEVuo= +github.com/alecthomas/concurrency v0.0.2/go.mod h1:GmuQb/iHX7mbNtPlC/WDzEFxDMB0HYFer2Qda9QTs7w= +github.com/alecthomas/participle/v2 v2.1.1 h1:hrjKESvSqGHzRb4yW1ciisFJ4p3MGYih6icjJvbsmV8= +github.com/alecthomas/participle/v2 v2.1.1/go.mod h1:Y1+hAs8DHPmc3YUFzqllV+eSQ9ljPTk0ZkPMtEdAx2c= +github.com/alecthomas/repr v0.3.0 h1:NeYzUPfjjlqHY4KtzgKJiWd6sVq2eNUPTi34PiFGjY8= +github.com/alecthomas/repr v0.3.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= +github.com/alecthomas/types v0.9.0 h1:g/P/fNElr7Ot1tWxSEms/I2gnRemxAqGNeetW6HOlO4= +github.com/alecthomas/types v0.9.0/go.mod h1:t7PnU03TVweFpbPVKaeLtFykjJD8rqiBJ7gfkp6UvLQ= +github.com/alessio/shellescape v1.4.2 h1:MHPfaU+ddJ0/bYWpgIeUnQUqKrlJ1S7BfEYPM4uEoM0= +github.com/alessio/shellescape v1.4.2/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= +github.com/bool64/dev v0.2.31 h1:OS57EqYaYe2M/2bw9uhDCIFiZZwywKFS/4qMLN6JUmQ= +github.com/bool64/dev v0.2.31/go.mod h1:iJbh1y/HkunEPhgebWRNcs8wfGq7sjvJ6W5iabL8ACg= +github.com/bool64/shared v0.1.5 h1:fp3eUhBsrSjNCQPcSdQqZxxh9bBwrYiZ+zOKFkM0/2E= +github.com/bool64/shared v0.1.5/go.mod h1:081yz68YC9jeFB3+Bbmno2RFWvGKv1lPKkMP6MHJlPs= +github.com/danieljoos/wincred v1.2.0 h1:ozqKHaLK0W/ii4KVbbvluM91W2H3Sh0BncbUNPS7jLE= +github.com/danieljoos/wincred v1.2.0/go.mod h1:FzQLLMKBFdvu+osBrnFODiv32YGwCfx0SkRa/eYHgec= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= +github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU= +github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= +github.com/iancoleman/orderedmap v0.3.0 h1:5cbR2grmZR/DiVt+VJopEhtVs9YGInGIxAoMJn+Ichc= +github.com/iancoleman/orderedmap v0.3.0/go.mod h1:XuLcCUkdL5owUCQeF2Ue9uuw1EptkJDkXXS7VoV7XGE= +github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= +github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= +github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= +github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= +github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= +github.com/jackc/pgx/v5 v5.5.2 h1:iLlpgp4Cp/gC9Xuscl7lFL1PhhW+ZLtXZcrfCt4C3tA= +github.com/jackc/pgx/v5 v5.5.2/go.mod h1:ez9gk+OAat140fv9ErkZDYFWmXLfV+++K0uAOiwgm1A= +github.com/jackc/puddle/v2 v2.2.1 h1:RhxXJtFG022u4ibrCSMSiu5aOq1i77R3OHKNJj77OAk= +github.com/jackc/puddle/v2 v2.2.1/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= +github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= +github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/oklog/ulid/v2 v2.1.0 h1:+9lhoxAP56we25tyYETBBY1YLA2SaoLvUFgrP2miPJU= +github.com/oklog/ulid/v2 v2.1.0/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNsTT1QQ= +github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= +github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= +github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 h1:lZUw3E0/J3roVtGQ+SCrUrg3ON6NgVqpn3+iol9aGu4= +github.com/santhosh-tekuri/jsonschema/v5 v5.3.1/go.mod h1:uToXkOrWAZ6/Oc07xWQrPOhJotwFIyu2bBVN41fcDUY= +github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= +github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/swaggest/assertjson v1.9.0 h1:dKu0BfJkIxv/xe//mkCrK5yZbs79jL7OVf9Ija7o2xQ= +github.com/swaggest/assertjson v1.9.0/go.mod h1:b+ZKX2VRiUjxfUIal0HDN85W0nHPAYUbYH5WkkSsFsU= +github.com/swaggest/jsonschema-go v0.3.64 h1:HyB41fkA4XP0BZkqWfGap5i2JtRHQGXG/21dGDPbyLM= +github.com/swaggest/jsonschema-go v0.3.64/go.mod h1:DYuKqdpms/edvywsX6p1zHXCZkdwB28wRaBdFCe3Duw= +github.com/swaggest/refl v1.3.0 h1:PEUWIku+ZznYfsoyheF97ypSduvMApYyGkYF3nabS0I= +github.com/swaggest/refl v1.3.0/go.mod h1:3Ujvbmh1pfSbDYjC6JGG7nMgPvpG0ehQL4iNonnLNbg= +github.com/yudai/gojsondiff v1.0.0 h1:27cbfqXLVEJ1o8I6v3y9lg8Ydm53EKqHXAOMxEGlCOA= +github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 h1:BHyfKlQyqbsFN5p3IfnEUduWvb9is428/nNb5L3U01M= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= +github.com/zalando/go-keyring v0.2.3 h1:v9CUu9phlABObO4LPWycf+zwMG7nlbb3t/B5wa97yms= +github.com/zalando/go-keyring v0.2.3/go.mod h1:HL4k+OXQfJUWaMnqyuSOc0drfGPX2b51Du6K+MRgZMk= +go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc= +go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo= +go.opentelemetry.io/otel/metric v1.21.0 h1:tlYWfeo+Bocx5kLEloTjbcDwBuELRrIFxwdQ36PlJu4= +go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM= +go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= +go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= +go.opentelemetry.io/otel/sdk/metric v1.21.0 h1:smhI5oD714d6jHE6Tie36fPx4WDFIg+Y6RfAY4ICcR0= +go.opentelemetry.io/otel/sdk/metric v1.21.0/go.mod h1:FJ8RAsoPGv/wYMgBdUJXOm+6pzFY3YdljnXtv1SBE8Q= +go.opentelemetry.io/otel/trace v1.21.0 h1:WD9i5gzvoUPuXIXH24ZNBudiarZDKuekPqi/E8fpfLc= +go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ= +golang.design/x/reflect v0.0.0-20220504060917-02c43be63f3b h1:lkOPTy76R9NZ6FeDQWkDj3NsLtD8Csc9AAFYEl3kiME= +golang.design/x/reflect v0.0.0-20220504060917-02c43be63f3b/go.mod h1:QXG482h3unP32W/YwIPOc+09bvY447B7T+iLjC/JPcA= +golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= +golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= +golang.org/x/exp v0.0.0-20231127185646-65229373498e h1:Gvh4YaCaXNs6dKTlfgismwWZKyjVZXwOPfIyUaqU3No= +golang.org/x/exp v0.0.0-20231127185646-65229373498e/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= +golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +lukechampine.com/uint128 v1.2.0 h1:mBi/5l91vocEN8otkC5bDLhi2KdCticRiwbdB0O+rjI= +lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= +modernc.org/cc/v3 v3.40.0 h1:P3g79IUS/93SYhtoeaHW+kRCIrYaxJ27MFPv+7kaTOw= +modernc.org/cc/v3 v3.40.0/go.mod h1:/bTg4dnWkSXowUO6ssQKnOV0yMVxDYNIsIrzqTFDGH0= +modernc.org/ccgo/v3 v3.16.13 h1:Mkgdzl46i5F/CNR/Kj80Ri59hC8TKAhZrYSaqvkwzUw= +modernc.org/ccgo/v3 v3.16.13/go.mod h1:2Quk+5YgpImhPjv2Qsob1DnZ/4som1lJTodubIcoUkY= +modernc.org/libc v1.29.0 h1:tTFRFq69YKCF2QyGNuRUQxKBm1uZZLubf6Cjh/pVHXs= +modernc.org/libc v1.29.0/go.mod h1:DaG/4Q3LRRdqpiLyP0C2m1B8ZMGkQ+cCgOIjEtQlYhQ= +modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4= +modernc.org/mathutil v1.6.0/go.mod h1:Ui5Q9q1TR2gFm0AQRqQUaBWFLAhQpCwNcuhBOSedWPo= +modernc.org/memory v1.7.2 h1:Klh90S215mmH8c9gO98QxQFsY+W451E8AnzjoE2ee1E= +modernc.org/memory v1.7.2/go.mod h1:NO4NVCQy0N7ln+T9ngWqOQfi7ley4vpwvARR+Hjw95E= +modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4= +modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= +modernc.org/sqlite v1.28.0 h1:Zx+LyDDmXczNnEQdvPuEfcFVA2ZPyaD7UCZDjef3BHQ= +modernc.org/sqlite v1.28.0/go.mod h1:Qxpazz0zH8Z1xCFyi5GSL3FzbtZ3fvbjmywNogldEW0= +modernc.org/strutil v1.1.3 h1:fNMm+oJklMGYfU9Ylcywl0CO5O6nTfaowNsh2wpPjzY= +modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw= +modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y= +modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= diff --git a/backend/online-boutique/services/recommendation/recommendation.go b/backend/online-boutique/services/recommendation/recommendation.go index b23a8ada..ab3b1a5d 100644 --- a/backend/online-boutique/services/recommendation/recommendation.go +++ b/backend/online-boutique/services/recommendation/recommendation.go @@ -3,11 +3,11 @@ package recommendation import ( "context" + "fmt" "math/rand" - "github.com/alecthomas/errors" + "ftl/productcatalog" - "github.com/TBD54566975/ftl/examples/online-boutique/services/productcatalog" ftl "github.com/TBD54566975/ftl/go-runtime/sdk" ) @@ -26,7 +26,7 @@ func List(ctx context.Context, req ListRequest) (ListResponse, error) { catalog, err := ftl.Call(ctx, productcatalog.List, productcatalog.ListRequest{}) if err != nil { - return ListResponse{}, errors.Wrap(err, "failed to retrieve product catalog") + return ListResponse{}, fmt.Errorf("%s: %w", "failed to retrieve product catalog", err) } // Remove user-provided products from the catalog, to avoid recommending @@ -37,10 +37,10 @@ func List(ctx context.Context, req ListRequest) (ListResponse, error) { } filtered := make([]string, 0, len(catalog.Products)) for _, product := range catalog.Products { - if _, ok := userIDs[product.ID]; ok { + if _, ok := userIDs[product.Id]; ok { continue } - filtered = append(filtered, product.ID) + filtered = append(filtered, product.Id) } // Sample from filtered products and return them. diff --git a/backend/online-boutique/services/shipping/ftl.toml b/backend/online-boutique/services/shipping/ftl.toml new file mode 100644 index 00000000..c7cbbc52 --- /dev/null +++ b/backend/online-boutique/services/shipping/ftl.toml @@ -0,0 +1,2 @@ +module = "shipping" +language = "go" diff --git a/backend/online-boutique/services/shipping/go.mod b/backend/online-boutique/services/shipping/go.mod new file mode 100644 index 00000000..c5e6d966 --- /dev/null +++ b/backend/online-boutique/services/shipping/go.mod @@ -0,0 +1,5 @@ +module ftl/shipping + +go 1.21.6 + +replace github.com/TBD54566975/ftl/examples/online-boutique => ../.. diff --git a/backend/online-boutique/services/shipping/go.sum b/backend/online-boutique/services/shipping/go.sum new file mode 100644 index 00000000..e69de29b diff --git a/backend/online-boutique/services/shipping/shipping.go b/backend/online-boutique/services/shipping/shipping.go index 25412cdc..5f7e178e 100644 --- a/backend/online-boutique/services/shipping/shipping.go +++ b/backend/online-boutique/services/shipping/shipping.go @@ -6,8 +6,8 @@ import ( "fmt" "math" - "github.com/TBD54566975/ftl/examples/online-boutique/common/money" - "github.com/TBD54566975/ftl/examples/online-boutique/services/cart" + "ftl/cart" + "ftl/currency" ) type Address struct { @@ -25,7 +25,7 @@ type ShippingRequest struct { //ftl:verb //ftl:ingress POST /shipping/quote -func GetQuote(ctx context.Context, req ShippingRequest) (money.Money, error) { +func GetQuote(ctx context.Context, req ShippingRequest) (currency.Money, error) { return moneyFromUSD(8.99), nil } @@ -40,9 +40,9 @@ func ShipOrder(ctx context.Context, req ShippingRequest) (ShipOrderResponse, err return ShipOrderResponse{ID: createTrackingID(baseAddress)}, nil } -func moneyFromUSD(value float64) money.Money { +func moneyFromUSD(value float64) currency.Money { units, fraction := math.Modf(value) - return money.Money{ + return currency.Money{ CurrencyCode: "USD", Units: int(units), Nanos: int(math.Trunc(fraction * 10000000)), diff --git a/backend/online-boutique/services/time/generated_ftl_module.go b/backend/online-boutique/services/time/generated_ftl_module.go deleted file mode 100644 index adc2749b..00000000 --- a/backend/online-boutique/services/time/generated_ftl_module.go +++ /dev/null @@ -1,21 +0,0 @@ -//ftl:module time -package time - -import ( - "context" - "time" -) - -type TimeRequest struct { -} - -type TimeResponse struct { - Time time.Time `json:"time"` -} - -// Time returns the current time. -// -//ftl:verb -func Time(context.Context, TimeRequest) (TimeResponse, error) { - panic("Verb stubs should not be called directly, instead use github.com/TBD54566975/ftl/runtime-go/sdk.Call()") -} diff --git a/bin/.flutter-3.13.8.pkg b/bin/.flutter-3.16.8.pkg similarity index 100% rename from bin/.flutter-3.13.8.pkg rename to bin/.flutter-3.16.8.pkg diff --git a/bin/.go-1.21.3.pkg b/bin/.go-1.21.6.pkg similarity index 100% rename from bin/.go-1.21.3.pkg rename to bin/.go-1.21.6.pkg diff --git a/bin/.goreman-0.3.15.pkg b/bin/.goreman-0.3.15.pkg new file mode 120000 index 00000000..383f4511 --- /dev/null +++ b/bin/.goreman-0.3.15.pkg @@ -0,0 +1 @@ +hermit \ No newline at end of file diff --git a/bin/.just-1.23.0.pkg b/bin/.just-1.23.0.pkg new file mode 120000 index 00000000..383f4511 --- /dev/null +++ b/bin/.just-1.23.0.pkg @@ -0,0 +1 @@ +hermit \ No newline at end of file diff --git a/bin/.watchexec-1.25.1.pkg b/bin/.watchexec-1.25.1.pkg new file mode 120000 index 00000000..383f4511 --- /dev/null +++ b/bin/.watchexec-1.25.1.pkg @@ -0,0 +1 @@ +hermit \ No newline at end of file diff --git a/bin/dart b/bin/dart index 012cf9d3..b56aeab9 120000 --- a/bin/dart +++ b/bin/dart @@ -1 +1 @@ -.flutter-3.13.8.pkg \ No newline at end of file +.flutter-3.16.8.pkg \ No newline at end of file diff --git a/bin/flutter b/bin/flutter index 012cf9d3..b56aeab9 120000 --- a/bin/flutter +++ b/bin/flutter @@ -1 +1 @@ -.flutter-3.13.8.pkg \ No newline at end of file +.flutter-3.16.8.pkg \ No newline at end of file diff --git a/bin/go b/bin/go index 5ce3df00..e93cdb3c 120000 --- a/bin/go +++ b/bin/go @@ -1 +1 @@ -.go-1.21.3.pkg \ No newline at end of file +.go-1.21.6.pkg \ No newline at end of file diff --git a/bin/gofmt b/bin/gofmt index 5ce3df00..e93cdb3c 120000 --- a/bin/gofmt +++ b/bin/gofmt @@ -1 +1 @@ -.go-1.21.3.pkg \ No newline at end of file +.go-1.21.6.pkg \ No newline at end of file diff --git a/bin/goreman b/bin/goreman new file mode 120000 index 00000000..7546a72e --- /dev/null +++ b/bin/goreman @@ -0,0 +1 @@ +.goreman-0.3.15.pkg \ No newline at end of file diff --git a/bin/just b/bin/just new file mode 120000 index 00000000..38ec3579 --- /dev/null +++ b/bin/just @@ -0,0 +1 @@ +.just-1.23.0.pkg \ No newline at end of file diff --git a/bin/watchexec b/bin/watchexec new file mode 120000 index 00000000..57e2eae0 --- /dev/null +++ b/bin/watchexec @@ -0,0 +1 @@ +.watchexec-1.25.1.pkg \ No newline at end of file