Code Monkey home page Code Monkey logo

golang-crud-with-gorm's Introduction

golang-todo-list

Go언어를 이용해서 C(Create)U(Update)R(Read)D(Delete)를 할 수 있는 ToDo List를 만드는 프로젝트입니다.

Installation

$ go mod init github.com/dev-hyunsang/golang-todo-list
$ go get -u github.com/gofiber/fiber/v2
$ go get -u gorm.io/gorm
$ go get -u gorm.io/driver/sqlite

ToDos:

  • 새로운 ToDO 항목 만들기
  • 생성되어 있는 ToDo 항목들 불러오기
  • UUID를 통해서 생성되어 있는 ToDo 항목 수정하기
  • 생성되어 있는 ToDo 항목 삭제하기

Docs

POST /create

Request

{
    "content": "안녕하세요!!"
}

Response

{
    "message": "새로운 할일 항목을 만들었어요!",
    "status": 200,
    "time": "2022-06-05T16:51:32.68058+09:00"
}

POST /read

Request

Null

Response

{
    "datas": [
        {
            "todo_uuid": "bf8de572-cf5d-4f4b-8552-581015aae720",
            "content": "안녕하세요!!",
            "created_time": "2022-06-05T16:51:32.678999+09:00",
            "updated_time": "2022-06-05T16:51:32.678999+09:00"
        }
    ],
    "message": "성공적으로 생성되어 있는 항목들을 가지고 왔어요!",
    "status": 200,
    "time": "2022-06-05T16:52:45.074149+09:00"
}

POST /edit

Request

{
    "todo_uuid": "bf8de572-cf5d-4f4b-8552-581015aae720",
    "content": "반갑습니다~!"
}

Response

{
    "message": "성공적으로 수정했어요!",
    "status": 200,
    "time": "2022-06-05T16:53:04.78207+09:00"
}

Delete /delete/:UUID

Request

127.0.0.1:3000/delete/07265781-593b-4ef0-a25f-158a3460ebb7

Response

{
    "message": "성공적으로 할일 항목을 삭제했어요.",
    "status": 200,
    "time": "2022-06-05T16:49:55.773332+09:00"
}

golang-crud-with-gorm's People

Contributors

dev-hyunsang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  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.