How nitrosaccharose/go-web works
Govo is a small full-stack demo for user CRUD and expiring Redis key/value records. A user works in the Vue screen: user changes are sent over HTTP to Gin routes and handled against MySQL; KVT creation and polling go through Gin to Redis, with returned values and TTL displayed in the screen. The backend also exposes user lookups by name and account. Startup initializes both data clients before serving. The main screen and backend handlers support these flows; some frontend and model details are inferred from the README and tree, not sampled source.
Main entry points: router.go API routes · sql.go MySQL access · main.go Server startup · UserController.go User handlers
Components 16
Vue interface
- Main screen
go-web-front-project/views/main.vue - HTTP client
go-web-front-project/src/request.js - Vue app
go-web-front-project/src/App.vue - Frontend entry
go-web-front-project/src/main.js - Web router
go-web-front-project/router/index.js
Gin API
- Server startup
main.go - API routes
routers/router.go - User handlers
controller/UserController.go - KVT handlers
controller/KVTObjectController.go
Data access
- User model
model/User.go - KVT model
model/KVTObject.go - MySQL access
sql/sql.go - Redis access
redis/redis.go
External stores
- MySQL
- Redis cluster
Other components
- User
Connections 19
- User → Main screen: uses
- Frontend entry → Vue app: mounts
- Frontend entry → Web router: installs
- Vue app → Web router: renders routes
- Web router → Main screen: routes to
- Main screen → HTTP client: sends requests
- HTTP client → API routes: HTTP
- Server startup → MySQL access: connects
- Server startup → Redis access: connects
- Server startup → API routes: serves
- API routes → User handlers: dispatches
- API routes → KVT handlers: dispatches
- User handlers → MySQL access: queries
- User handlers → User model: binds records
- MySQL access → User model: migrates
- MySQL access → MySQL: reads/writes
- KVT handlers → Redis access: gets/sets TTL
- KVT handlers → KVT model: binds response
- Redis access → Redis cluster: commands