2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-05 03:22:32 +08:00
Files
panel/internal/http/request/toolbox_system.go
Copilot 1f55c2448d feat: add NTP server configuration and manual sync server option (#1232)
* Initial plan

* feat: add NTP server configuration support for time sync

Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com>

* feat: add system NTP server configuration with chrony and timesyncd support

Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com>

* fix: improve NTP service restart error handling

Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com>

* feat: 优化ntp

* fix: logo跳转

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com>
Co-authored-by: 耗子 <haozi@loli.email>
2026-01-13 21:24:58 +08:00

41 lines
1.0 KiB
Go

package request
import "time"
type ToolboxSystemDNS struct {
DNS1 string `form:"dns1" json:"dns1" validate:"required"`
DNS2 string `form:"dns2" json:"dns2" validate:"required"`
}
type ToolboxSystemSWAP struct {
Size int64 `form:"size" json:"size" validate:"min:0"`
}
type ToolboxSystemTimezone struct {
Timezone string `form:"timezone" json:"timezone" validate:"required"`
}
type ToolboxSystemTime struct {
Time time.Time `form:"time" json:"time" validate:"required"`
}
type ToolboxSystemHostname struct {
Hostname string `form:"hostname" json:"hostname" validate:"required|regex:^[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9]$"`
}
type ToolboxSystemHosts struct {
Hosts string `form:"hosts" json:"hosts"`
}
type ToolboxSystemPassword struct {
Password string `form:"password" json:"password" validate:"required|password"`
}
type ToolboxSystemSyncTime struct {
Server string `form:"server" json:"server"` // 可选的 NTP 服务器地址
}
type ToolboxSystemNTPServers struct {
Servers []string `form:"servers" json:"servers" validate:"required"`
}