Giter VIP home page Giter VIP logo

gorm_test's Introduction

初めにすること

.envファイルを作成し、以下の設定を行う。

MYSQL_ROOT_PASSWORD=
MYSQL_DATABASE=
MYSQL_USER=
MYSQL_PASSWORD=

firebasetoken.jsonの配置

jwtの署名を確認するためにfirebase-adminsdk.jsonをmain.goと同じディレクトリに移動してください。

build

docker-compose build

docker-compose up -d

コンテナに入る

docker-compose exec go ash

migration

up

migrate -path src/database/migrations -database ${DB_PATH} up

down

migrate -path src/database/migrations -database ${DB_PATH} down

migration ファイル作成

migrate create -ext sql -dir src/database/migrations -seq create_model

API 設計

color

メソッド URI リソース
GET api/v1/colors 自動生成の色と人気の色組み合わせを返答
POST api/v1/color 色メモの登録
POST api/v1/color/:id/edit 色メモの編集
POST api/v1/color/:id/delete 色メモの削除
POST api/v1/color/:id/duplicate 色メモの複製

tags

メソッド URI リソース
GET api/v1/colors/:color_id/tags タグ一覧
POST api/v1/colors/:color_id/tags  タグ登録
POST api/v1/color/:color_id/tags/:tag_id/edit タグの編集
POST api/v1/color/:color_id/tags/:tag_id/delete タグの削除

Auth

メソッド URI リソース
POST api/v1/auth/signup サインアップ
POST api/v1/auth/login  ログイン

gorm_test's People

Contributors

rikutkb avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.