mysql-heroku-rest-api

command module
v0.0.0-...-8108acb Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2020 License: MIT Imports: 8 Imported by: 0

README

mysql-heroku-rest-api

Description

The project uses Go, Heroku with ClearDB (MySQL) to implement a back-end API managing a simple database table named users. It supports some basic RESTful APIs as described in the cURL API section below. The application URL can be found here.

Contributor

cURL API

Get all users
Description

Get all users' names and passwords from the database table users.

Response

An JSON object containing all users' names and passwords fetched from the database.

Example

curl -X GET https://powerful-reaches-73385.herokuapp.com/users

Create an user
Description

Create an user to the database table users.

Response

An JSON object containing the requested user's name and password.

Example

curl -X POST -d "{ \"name\": \"bill\", \"password\": \"1\" }" https://powerful-reaches-73385.herokuapp.com/users

Get an user
Description

Get an user from the database table users.

Response

An JSON object containing the user's name and password fetched from the database.

Example

curl -X GET https://powerful-reaches-73385.herokuapp.com/users/bill

Update an user password
Description

Update an user password in the database table users.

Response

An JSON object containing the requested user's name and password.

Example

curl -X PUT -d "{ \"name\": \"bill\", \"password\": \"666\" }" https://powerful-reaches-73385.herokuapp.com/users/bill

Delete an user
Description

Delete an user from the database table users.

Response

An JSON object containing the user's name given in the requested URL.

Example

curl -X DELETE https://powerful-reaches-73385.herokuapp.com/users/bill

Solutions for Known Errors

A documentation describing solutions for known errors.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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