mixth / thaichana

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ThaiChana API

3 route paths

/recently
    get currently checked in
/checkin
    check-in to any places
        input {
            "id": 1234,
            "place_id": "4321"
        }
        output {
            "density": "ok"
        }
/checkout
        input {
            "id": 1234,
            "place_id": "4321"
        }
        output {}        

3 tables in db

type TablePeople struct {
	ID       int64
	MobileMo string
}

type TablePlaces struct {
	ID       int64
	Name     string
	Location Location
	Limit    int
}

type CacheVisitors struct {
	ID      int64
	PlaceID int64
}

Technical Requirement

  1. First version works
  2. Second version is readable
  3. Third version is testable
    • di by function
    • di by interface{}
  • logging using uber-zap
  • configuration using viper
  • routing using gorilla-mux
  • graceful shutting down
  • distributed tracing using telemetry

About


Languages

Language:Go 98.2%Language:Makefile 1.8%