This is CRUD API for video service project
- Download gin web framework.
go get github.com/gin-gonic/gin
- Download postgresql open source object-relational database system and add to path.
- Include it in your project
go get github.com/lib/pq
- Download yaml package that implements YAML support for the Go language.
go get gopkg.in/yaml.v2
go run cmd/setup.go
go run cmd/setup.go
GET("/videos") // gets all videos that are saved
POST("/videos") // creates a video
GET("/videos/:id") // gets video by id
PUT("/videos/:id") // updates video by id
DELETE("/videos/:id") // deletes video by id
├───.idea
├───cmd
| ├───main.go
| └───setup.go
├───configs
| └───configs.yaml
├───entity
| └───video.go
└───pkg
├───controller
| └───video-controller.go
├───db
│ ├───SQL
| | └───table.sql
| ├───db-connection.go
| └───db-functions.go
├───service
| └───video-service.go
└───utils
├───convert
| └───strtoint.go
└───reader
└───readfile.go