The important part here is in the Login function where we set that sacred JWT Token in a Cookie.
so wee dont need Bearer token in our authorization header.
mockery
--dir=internal/account/repository/mysql
--name=RoleSqlRepository
--filename=role_sql_repository.go
--output=domain/mocks --outpkg=mocks
more info read the docs.
-
Add new migration
migrate create -ext sql -dir db/migrations example_table
-
Run Migration
POSTGRESQL_URL: 'postgresql://postgres:@localhost:5432/posbe?sslmode=disable'
- set version (dirty state) (version: -1 before last migrate)
migrate -database ${PG_DSN} -path db/migrations force ${VERSION}
- up
migrate -database ${PG_DSN} -path db/migrations up
- down
migrate -database ${PG_DSN} -path db/migrations down
- set version (dirty state) (version: -1 before last migrate)
more info read the docs.