Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wilk/backend-api-go
A simple RESTful API (CRUD) built with GoLang
https://github.com/wilk/backend-api-go
docker docker-compose glide golang golang-application golang-examples gorm martini-web
Last synced: 23 days ago
JSON representation
A simple RESTful API (CRUD) built with GoLang
- Host: GitHub
- URL: https://github.com/wilk/backend-api-go
- Owner: wilk
- License: mit
- Created: 2017-03-03T21:09:19.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-16T08:22:44.000Z (almost 8 years ago)
- Last Synced: 2024-11-16T00:43:13.541Z (about 1 month ago)
- Topics: docker, docker-compose, glide, golang, golang-application, golang-examples, gorm, martini-web
- Language: Go
- Size: 15.6 KB
- Stars: 3
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# backend-api-go
A simple RESTful API (CRUD) built with GoLang## Requirements
- [Git](https://git-scm.com/)
- [Docker](https://www.docker.com/)
- [docker-compose](https://docs.docker.com/compose/)## Install
Clone and setup:```bash
$ git clone https://github.com/wilk/backend-api-go.git
$ cd backend-api-go
$ ./setup.sh
```## Running
First, setup docker-compose:```bash
$ docker-compose up
```Then start querying at `http://localhost:3000/api/users/`
## Shutdown
```bash
$ docker-compose down
```## APIs
The entity **User** has the following fields:- ID (uint)
- name (string)
- email (string)
- age (int)
- mobile (string)Follows the list of users APIs:
|METHOD|URL|REQUEST HEADERS|REQUEST PAYLOAD|RESPONSE HEADERS|RESPONSE PAYLOAD|
|------|---|---------------|---------------|----------------|----------------|
|GET|http://localhost:3000/api/users/ | | | |User[]|
|POST|http://localhost:3000/api/users/ |Content-Type: "application/json"|User||User|
|GET|http://localhost:3000/api/users/10 | | | |User|
|PUT|http://localhost:3000/api/users/10 |Content-Type: "application/json"|User||User|
|DELETE|http://localhost:3000/api/users/10 | | | | |