togo

command module
v0.0.2-0...-d9a3ee1 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2021 License: MIT Imports: 3 Imported by: 0

README

Quick start

  1. create env
cp env.example .env

2.1 with docker-compose, must install Docker and docker-compose

docker-compose up --build

2.2 without docker

go run main.go
  • you can get help by flag -h, --help
    go run main.go -h
    

3 run testcase

go test -race -count=1 -v -cover ./...

what is missing?

The key point missing:

  • API /login, can't deactivate a token when user logout.
  • API POST /tasks, missing handle mutex a function AddTask.

What did I do?

  • use redis for mange token, remove token in redis for set deactivate token.
  • handle mutex a AddTask function using Redlock
  • refactor code base structure
  • write unit test for services layer
  • add run command
  • use postgre to store all data.
  • add index (user_id, created_date), improve performance of count user's task
  • etc...

Technical debt

  • improve API's response
  • add log to issue tracing
  • improve code coverage
  • detect sql injection
  • graceful shutdown
  • CI/CD

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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