Skip to content

wicaker/multi-tenant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Database Migration

Generate Mock

  • mockery --name={InterfaceName} --output={path}. Example: mockery --name=AuthUsecase --output=/cmd/auth/mocks

Run test

go test -v ./test/functional/... go test -v ./cmd/auth/authhandler With coverage: unit: go test -coverprofile=coverage.out ./cmd/auth/authhandler go tool cover -html=coverage.out -o coverage.html

functional: go test ./test/functional/... -coverprofile=./coverage.out -coverpkg=./... go tool cover -html=coverage.out -o coverage.html

Create a new migration file

curl -L https://github.com/golang-migrate/migrate/releases/download/v4.15.2/migrate.darwin-amd64.tar.gz | tar xvz ./migrate create -ext sql -dir migration {file_name}

./migrate -path {FILE_PATH} -database "{DATABASE_URL" up ./migrate -path {FILE_PATH} -database "{DATABASE_URL" down

TODO

  • unit test
  • functional test
  • 2FA Google
  • OAuth Google Sign In
  • OAuth Facebook Sign In
  • OAuth Twitter Sign In

Folder Structure

https://dasarpemrogramangolang.novalagung.com/C-project-layout-structure.html

Document database schema

https://github.com/k1LoW/tbls

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages