A simple RESTful API built with Go, Gin, and Mux for managing a stock's resources.
Prerequisites
- Go - Install the latest version available from the official website
- Git - To clone the repository
- Clone the repository:
git clone https://github.com/daking24/Go---Stocks-API.git
cd go-postgres-yt- Install the required packages: Copy code
go get -v- Run the application:
go run main.go-
Endpoint:
GET /api/stockFetch all Stocks -
Endpoint:
POST /api/new-stockCreate a Stock -
Endpoint:
GET /api/stock/{id}Get a Stock by ID -
Endpoint:
PUT /api/stock/{id}Update a Stock by ID -
Endpoint:
DELETE /api/delete-stock/{bookId}Delete a Stock by ID
Feel free to submit a pull request or open an issue to contribute to the project. Make sure to include a detailed description of the changes and any relevant context.
This project is open source and licensed under the MIT License.
If you have any questions, feel free to reach out to the maintainer at kingdavidao11@gmail.com.