GOAPI Tutorial
In this post, We will create repository structure for our GOLANG APIs project.
We have directory structure like below for this project. We will follow this structure for this project.
In this post, We will create repository structure for our GOLANG APIs project.
We have directory structure like below for this project. We will follow this structure for this project.
├├── goapi │ ├── api-frontend │ ├── db │ │ ├── db.sql │ │ └── model.sql │ ├── docs │ ├── README.md │ └── server │ ├── bin │ │ └── main │ ├── Makefile │ └── src │ └── test.com │ └── goapi │ └── app │ ├── apis │ │ └── student.go │ ├── cmd │ │ └── main │ │ └── main.go │ ├── db │ │ ├── client_db.go │ │ └── student_db.go │ ├── model │ │ └── student.go │ ├── router.go │ └── utils │ ├── constant.go │ └── rest_util.go
goapi: This is the root directory for this project.
api-front-end: This directory contains front-end code and related utilities
db: This is containing sql script and sample data of data base
docs: This contains documentation of this project
server: This directory contains two directories bin and src
bin: bin directory contain executable binary of this project
src: This directory contains source code of this project. src directory has apis, cmd, db, model and utils directories.
apis: This directories contain apis definitions of this project
cmd: contains main method to start server
db: This contains db connection and query
model: This contains request and response structure
utils: This contains helper functions
router.go: contains apis routs and path
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.

Comments
Post a Comment