Improve web service related aspects

This commit is contained in:
2025-11-22 17:09:25 +08:00
parent 2a3ef3e52a
commit 27fc5c1fd6
7 changed files with 158 additions and 6 deletions

View File

@@ -5,8 +5,20 @@ type Config struct {
Server struct {
Host string `json:"host"`
Port int `json:"port"`
Tls struct {
Enabled bool `json:"enabled"`
Cert string `json:"cert_file"`
Key string `json:"key_file"`
} `json:"tls"`
Advanced struct {
Readtimeout int `json:"read_timeout"`
Writetimeout int `json:"write_timeout"`
Idletimeout int `json:"idle_timeout"`
Maxheaderbytes int `json:"max_header_bytes"`
} `json:"advanced"`
} `json:"server"`
Database struct {
Driver string `json:"driver"`
Host string `json:"host"`
Port int `json:"port"`
Username string `json:"username"`