From 39f01ea441b2de1d887a065889230c1beef0cf78 Mon Sep 17 00:00:00 2001 From: Jonathan Vuillemin Date: Thu, 8 Aug 2024 14:43:33 +0200 Subject: [PATCH] doc(main): Updated documentation (#277) --- docs/getting-started/grpc-application.md | 2 +- docs/getting-started/http-application.md | 2 +- docs/getting-started/worker-application.md | 2 +- docs/modules/fxsql.md | 8 ++++++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/getting-started/grpc-application.md b/docs/getting-started/grpc-application.md index 52562457..44162a98 100644 --- a/docs/getting-started/grpc-application.md +++ b/docs/getting-started/grpc-application.md @@ -12,7 +12,7 @@ icon: material/rocket-launch-outline The [gRPC application template](https://github.com/ankorstore/yokai-grpc-template) provides: - a ready to extend [Yokai](https://github.com/ankorstore/yokai) application, with the [gRPC server](../modules/fxgrpcserver.md) module installed -- a ready to use [dev environment](https://github.com/ankorstore/yokai-grpc-template/blob/main/docker-compose.yaml), based on [Air](https://github.com/cosmtrek/air) (for live reloading) +- a ready to use [dev environment](https://github.com/ankorstore/yokai-grpc-template/blob/main/docker-compose.yaml), based on [Air](https://github.com/air-verse/air) (for live reloading) - a ready to use [Dockerfile](https://github.com/ankorstore/yokai-grpc-template/blob/main/Dockerfile) for production - some examples of [service](https://github.com/ankorstore/yokai-grpc-template/blob/main/internal/service/example.go) and [test](https://github.com/ankorstore/yokai-grpc-template/blob/main/internal/service/example_test.go) to get started diff --git a/docs/getting-started/http-application.md b/docs/getting-started/http-application.md index 84c34433..ea1a0e2f 100644 --- a/docs/getting-started/http-application.md +++ b/docs/getting-started/http-application.md @@ -12,7 +12,7 @@ icon: material/rocket-launch-outline The [HTTP application template](https://github.com/ankorstore/yokai-http-template) provides: - a ready to extend [Yokai](https://github.com/ankorstore/yokai) application, with the [HTTP server](../modules/fxhttpserver.md) module installed -- a ready to use [dev environment](https://github.com/ankorstore/yokai-http-template/blob/main/docker-compose.yaml), based on [Air](https://github.com/cosmtrek/air) (for live reloading) +- a ready to use [dev environment](https://github.com/ankorstore/yokai-http-template/blob/main/docker-compose.yaml), based on [Air](https://github.com/air-verse/air) (for live reloading) - a ready to use [Dockerfile](https://github.com/ankorstore/yokai-http-template/blob/main/Dockerfile) for production - some examples of [handler](https://github.com/ankorstore/yokai-http-template/blob/main/internal/handler/example.go) and [test](https://github.com/ankorstore/yokai-http-template/blob/main/internal/handler/example_test.go) to get started diff --git a/docs/getting-started/worker-application.md b/docs/getting-started/worker-application.md index 3e8e623e..39ee0f3e 100644 --- a/docs/getting-started/worker-application.md +++ b/docs/getting-started/worker-application.md @@ -12,7 +12,7 @@ icon: material/rocket-launch-outline The [worker application template](https://github.com/ankorstore/yokai-worker-template) provides: - a ready to extend [Yokai](https://github.com/ankorstore/yokai) application, with the [worker](../modules/fxworker.md) module installed -- a ready to use [dev environment](https://github.com/ankorstore/yokai-worker-template/blob/main/docker-compose.yaml), based on [Air](https://github.com/cosmtrek/air) (for live reloading) +- a ready to use [dev environment](https://github.com/ankorstore/yokai-worker-template/blob/main/docker-compose.yaml), based on [Air](https://github.com/air-verse/air) (for live reloading) - a ready to use [Dockerfile](https://github.com/ankorstore/yokai-worker-template/blob/main/Dockerfile) for production - some examples of [worker](https://github.com/ankorstore/yokai-worker-template/blob/main/internal/worker/example.go) and [test](https://github.com/ankorstore/yokai-worker-template/blob/main/internal/worker/example_test.go) to get started diff --git a/docs/modules/fxsql.md b/docs/modules/fxsql.md index d6bf2baa..1a021100 100644 --- a/docs/modules/fxsql.md +++ b/docs/modules/fxsql.md @@ -66,7 +66,7 @@ modules: dsn: "user:password@tcp(localhost:3306)/db?parseTime=true" # database DSN migrations: path: db/migrations # migrations path (empty by default) - stdout: true # to print in stdout the migration logs (disabled by default) + stdout: true # to print in stdout the migration execution logs (disabled by default) log: enabled: true # to enable SQL queries logging (disabled by default) level: debug # to configure SQL queries logs level (debug by default) @@ -166,7 +166,9 @@ You can configure where to find your migration files: ```yaml title="configs/config.yaml" modules: sql: - migrations: db/migrations + migrations: + path: db/migrations # migrations path + stdout: true # to print in stdout the migration execution logs ``` And create them following [Goose SQL migrations](https://github.com/pressly/goose?tab=readme-ov-file#sql-migrations) conventions: @@ -563,6 +565,8 @@ modules: dsn: ":memory:" # in memory ``` +The [fxgomysqlserver](https://github.com/ankorstore/yokai-contrib/tree/main/fxgomysqlserver) Yokai contrib module is also available if you want to run an embed MySQL server for your tests. + You can then retrieve your components using the `sql.DB`, and make actual database operations: ```go title="internal/example_test.go"