A Simple HTTP(REST) API to make a dashboard like service for college placement. It helps keep a check of companies coming for recruitment.👩💻
-
/dashboard
view Welcome Dashboard -
/company
view All Companies and thier Info
you can view Company's name, Package, Selected students count, Ongoing or not
-
/company/{name}
Add New Company -
/company/{name}/{package}
Add New Company and it's Annual Package -
/selected/{id}/{selected}
Add no of students selected by the company
-
/stop/{id}
Change the status of hiring to : no more hiring! -
/start/{id}
Change the status of hiring to : now hiring! -
/selected/{id}/{selected}
Update no of students selected by the company
/company/{id}
Delete Company Info from the system using its ID
-
go mod init folder-name/Placement-buddy
go mod tidy
-
go get gofr.dev/pkg/gofr
-
You can run the mysql server and create a database locally using the following docker command:
docker run --name placement-buddy -e MYSQL_ROOT_PASSWORD=root123 -e MYSQL_DATABASE=placement_buddy -p 3306:3306 -d mysql:8.0.30
-
Access placment_buddy database and create table companies with columns id and name:
docker exec -it placement-buddy mysql -uroot -proot123 placement_buddy -e "[SQL CODE FOR DB]"
can check in your mysql workbench if avlbl
-
run your API using
go run main.go
handler_test.go is made to test few of the functionalities of handler.go