backend-api-go

command module
v0.0.0-...-47f988f Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2017 License: MIT Imports: 9 Imported by: 0

README

backend-api-go

A simple RESTful API (CRUD) built with GoLang

Requirements

Install

Clone and setup:

$ git clone https://github.com/wilk/backend-api-go.git
$ cd backend-api-go
$ ./setup.sh

Running

First, setup docker-compose:

$ docker-compose up

Then start querying at http://localhost:3000/api/users/

Shutdown

$ 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

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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