aasumitro / posbe

:rocket: WIP: Example Point of Sales

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Point of Sales

Authentication

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.

Create Mocks

Required tools:

How to use

mockery 
  --dir=internal/account/repository/mysql 
  --name=RoleSqlRepository 
  --filename=role_sql_repository.go 
  --output=domain/mocks --outpkg=mocks 

more info read the docs.

Database Migration

Required tools:

How to use

  • 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

more info read the docs.

About

:rocket: WIP: Example Point of Sales

License:Other


Languages

Language:Go 76.4%Language:TypeScript 21.8%Language:Makefile 0.8%Language:JavaScript 0.6%Language:CSS 0.3%Language:HTML 0.1%Language:PLpgSQL 0.0%