auth

module
v0.0.0-...-4ac03a4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2024 License: MIT

README

auth-service

Migrations

golang-migrate

Migrate reads migrations from sources and applies them in correct order to a database.

Docs: https://github.com/golang-migrate/migrate

commands:
# create a migration
migrate create -ext=sql -dir=internal/infra/database/migrations -seq create_users_table

# execute migrations
migrate -path=internal/infra/database/migrations -database "postgres://root:root@localhost:5432/auth_db?sslmode=disable" -verbose up

# restore migrations
migrate -path=internal/infra/database/migrations -database "postgres://root:root@localhost:5432/auth_db?sslmode=disable" -verbose down

sqlc

"sqlc generates fully type-safe idiomatic Go code from SQL."

Docs: https://docs.sqlc.dev/en/latest/#

commands:
# Generate sqlc code:
sqlc generate

Directories

Path Synopsis
internal
mocks

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL