How bestaevsaba/gsmapp works
This Go service accepts GSM timestamp records and serves date-filtered, paginated queries. An HTTP client reaches the registered handlers in the app entry point; handlers validate and decode requests, then call database operations that use the configured MySQL connection. Configuration and structured logging support that flow. The graph preserves the documented POST and GET capabilities; relationships are based on the shown source and README, without assuming additional behavior from unsampled files.
Main entry points: logger.go Structured Logger · data.go DB Connection · main.go App Entry · gsm_get.go Query Records
Components 12
HTTP API
- App Entry
cmd/app/main.go - POST Handler
internal/handlers/post_gsm.go - GET Handler
internal/handlers/get_gsm.go
GSM Data
- GSM Record
internal/models/model.go - Insert Record
internal/db/gsm_post.go - Query Records
internal/db/gsm_get.go
Runtime Support
- DB Config
dbconfig/config.go - DB Connection
dbconfig/data.go - Connection Settings
dbconfig/config.json - Structured Logger
internal/logger/logger.go
Other components
- HTTP Client
- MySQL
Connections 22
- HTTP Client → App Entry: sends HTTP
Readme.md - App Entry → POST Handler: routes POST
cmd/app/main.go - App Entry → GET Handler: routes GET
cmd/app/main.go - App Entry → DB Connection: initializes
cmd/app/main.go - POST Handler → GSM Record: decodes into
internal/handlers/post_gsm.go - POST Handler → Insert Record: calls
internal/handlers/post_gsm.go - GET Handler → Query Records: calls
internal/handlers/get_gsm.go - Query Records → GSM Record: scans into
internal/db/gsm_get.go - Insert Record → DB Connection: gets connection
internal/db/gsm_post.go - Query Records → DB Connection: gets connection
internal/db/gsm_get.go - Insert Record → MySQL: inserts into
internal/db/gsm_post.go - Query Records → MySQL: queries
internal/db/gsm_get.go - DB Connection → DB Config: loads settings
dbconfig/data.go - DB Config → Connection Settings: reads
dbconfig/config.go - DB Connection → MySQL: opens connection
dbconfig/data.go - App Entry → Structured Logger: gets logger
cmd/app/main.go - POST Handler → Structured Logger: gets logger
internal/handlers/post_gsm.go - GET Handler → Structured Logger: gets logger
internal/handlers/get_gsm.go - Insert Record → Structured Logger: gets logger
internal/db/gsm_post.go - Query Records → Structured Logger: gets logger
internal/db/gsm_get.go - DB Config → Structured Logger: gets logger
dbconfig/config.go - DB Connection → Structured Logger: gets logger
dbconfig/data.go