https://github.com/xatuke/go-crud
for GCI
https://github.com/xatuke/go-crud
Last synced: 3 months ago
JSON representation
for GCI
- Host: GitHub
- URL: https://github.com/xatuke/go-crud
- Owner: xatuke
- License: apache-2.0
- Created: 2020-01-12T13:26:30.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-12T13:55:12.000Z (over 6 years ago)
- Last Synced: 2026-03-01T22:24:29.107Z (5 months ago)
- Language: Go
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
[](https://gitter.im/JBossOutreach/gci)
# go-crud
## Prerequisites
- Have Go installed
- Have a working internet connection
## Run
- `go -u get https://github.com/gorilla/mux`
- `go run ./main.go`
## Use:
### Create, Read, Update, Delete Food Items with [Name] and [Price]
#### Running On: localhost:4000
### Requests Available:
> #### localhost:4000/
- HTTP Method: GET
- Use: Home Dir
- Request Body: N/A
> #### localhost:4000/api
- HTTP Method: GET
- Use: List all Foods
- Request Body: N/A
> #### localhost:4000/api/{id}
- HTTP Method: GET
- Use: Get the food with id mentioned
- Request Body: N/A
> #### localhost:4000/api/
- HTTP Method: POST
- Use: Add food to the api
- Request Body: JSON
> #### localhost:4000/api/{id}
- HTTP Method: PUT
- Use: Update food with Specified ID
- Request Body: JSON
> #### localhost:4000/api/{id}
- HTTP Method: DELETE
- Use: Delete food with Specified ID
- Request Body: JSON
### Request Body JSON Structure:
```
{
"Name": String
"Price": Int
}
```
## Working Demo
[Here](https://youtu.be/4dy_DAO7bDc)
Google Code-in and the Google Code-in logo are trademarks of Google Inc.