All Projects β†’ mingrammer β†’ Go Todo Rest Api Example

mingrammer / Go Todo Rest Api Example

πŸ“š A RESTful API example for simple todo application with Go

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Go Todo Rest Api Example

Node Express Mongo Api
Starter project for a REST API with Node.js, Express & MongoDB πŸ”‹
Stars: ✭ 148 (-61.56%)
Mutual labels:  rest-api, tutorial
Deep Learning In Production
In this repository, I will share some useful notes and references about deploying deep learning-based models in production.
Stars: ✭ 3,104 (+706.23%)
Mutual labels:  rest-api, tutorial
Rest Api Basics
This is a basic guide on how to build a REST API with Django & Python. For much deeper depth, check out our new course on REST API: (https://kirr.co/90kxtx)
Stars: ✭ 171 (-55.58%)
Mutual labels:  rest-api, tutorial
Learning Rust
Rust ε­¦δΉ δΉ‹θ·― > Rust Programming Tutorial, include articles, interview, example, problems.
Stars: ✭ 376 (-2.34%)
Mutual labels:  tutorial, example
Spring Boot Mysql Rest Api Tutorial
Building a Restful CRUD API using Spring Boot, Mysql, JPA and Hibernate
Stars: ✭ 279 (-27.53%)
Mutual labels:  rest-api, tutorial
Java Course
Self paced course for Java Engineers
Stars: ✭ 103 (-73.25%)
Mutual labels:  rest-api, tutorial
Tweetme 2
Build a twitter-like app in Django, Bootstrap, Javascript, & React.js. Step-by-Step.
Stars: ✭ 247 (-35.84%)
Mutual labels:  rest-api, tutorial
Eliasdb
EliasDB a graph-based database.
Stars: ✭ 611 (+58.7%)
Mutual labels:  rest-api, tutorial
Avenging
MVP pattern example on Android: no Dagger or RxJava example
Stars: ✭ 279 (-27.53%)
Mutual labels:  tutorial, example
Project Minimek
A sample app to demonstrate various useful Redux techniques, accompanying the blog series at http://blog.isquaredsoftware.com/series/practical-redux
Stars: ✭ 266 (-30.91%)
Mutual labels:  tutorial, example
Spring Boot Mongodb Angular Todo App
A Sample App built using Spring Boot, Angular and MongoDB
Stars: ✭ 84 (-78.18%)
Mutual labels:  rest-api, tutorial
Javascript Idiosyncrasies
A bunch of Javascript idiosyncrasies to beginners.
Stars: ✭ 353 (-8.31%)
Mutual labels:  tutorial, example
Scala Pet Store
An implementation of the java pet store using FP techniques in scala
Stars: ✭ 812 (+110.91%)
Mutual labels:  rest-api, example
30 Days Of Python
Learn Python for the next 30 (or so) Days.
Stars: ✭ 1,748 (+354.03%)
Mutual labels:  rest-api, tutorial
Django Rest Framework Tutorial
Django-REST-framework εŸΊζœ¬ζ•™ε­Έ - εΎžη„‘εˆ°ζœ‰ DRF-Beginners-Guide πŸ“
Stars: ✭ 630 (+63.64%)
Mutual labels:  rest-api, tutorial
Play Scala Rest Api Example
Example Play Scala application showing REST API
Stars: ✭ 227 (-41.04%)
Mutual labels:  rest-api, example
Wordpress Plugin Boilerplate Tutorial
Tutorials and Examples for WordPress Plugin Boilerplate, a foundation for WordPress Plugin Development.
Stars: ✭ 232 (-39.74%)
Mutual labels:  tutorial, example
Lv examples
Examples, tutorials and applications for the LVGL embedded GUI library
Stars: ✭ 246 (-36.1%)
Mutual labels:  tutorial, example
Vaporschool
Learn how to build vapor applications from rookie to champion in a constructive way!
Stars: ✭ 259 (-32.73%)
Mutual labels:  tutorial, example
Javascript Journey
Source code for blog post Journey from procedural to reactive JavaScript with stops
Stars: ✭ 309 (-19.74%)
Mutual labels:  tutorial, example

Go Todo REST API Example

A RESTful API example for simple todo application with Go

It is a just simple tutorial or example for making simple RESTful API with Go using gorilla/mux (A nice mux library) and gorm (An ORM for Go)

Installation & Run

# Download this project
go get github.com/mingrammer/go-todo-rest-api-example

Before running API server, you should set the database config with yours or set the your database config with my values on config.go

func GetConfig() *Config {
	return &Config{
		DB: &DBConfig{
			Dialect:  "mysql",
			Username: "guest",
			Password: "Guest0000!",
			Name:     "todoapp",
			Charset:  "utf8",
		},
	}
}
# Build and Run
cd go-todo-rest-api-example
go build
./go-todo-rest-api-example

# API Endpoint : http://127.0.0.1:3000

Structure

β”œβ”€β”€ app
β”‚   β”œβ”€β”€ app.go
β”‚   β”œβ”€β”€ handler          // Our API core handlers
β”‚   β”‚   β”œβ”€β”€ common.go    // Common response functions
β”‚   β”‚   β”œβ”€β”€ projects.go  // APIs for Project model
β”‚   β”‚   └── tasks.go     // APIs for Task model
β”‚   └── model
β”‚       └── model.go     // Models for our application
β”œβ”€β”€ config
β”‚   └── config.go        // Configuration
└── main.go

API

/projects

  • GET : Get all projects
  • POST : Create a new project

/projects/:title

  • GET : Get a project
  • PUT : Update a project
  • DELETE : Delete a project

/projects/:title/archive

  • PUT : Archive a project
  • DELETE : Restore a project

/projects/:title/tasks

  • GET : Get all tasks of a project
  • POST : Create a new task in a project

/projects/:title/tasks/:id

  • GET : Get a task of a project
  • PUT : Update a task of a project
  • DELETE : Delete a task of a project

/projects/:title/tasks/:id/complete

  • PUT : Complete a task of a project
  • DELETE : Undo a task of a project

Todo

  • [x] Support basic REST APIs.
  • [ ] Support Authentication with user for securing the APIs.
  • [ ] Make convenient wrappers for creating API handlers.
  • [ ] Write the tests for all APIs.
  • [x] Organize the code with packages
  • [ ] Make docs with GoDoc
  • [ ] Building a deployment process
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].