Documentation ¶
Index ¶
- type App
- func (s *App) GetDNS(w http.ResponseWriter, r *http.Request)
- func (s *App) GetHostname(w http.ResponseWriter, r *http.Request)
- func (s *App) GetHosts(w http.ResponseWriter, r *http.Request)
- func (s *App) GetSWAP(w http.ResponseWriter, r *http.Request)
- func (s *App) GetTimezone(w http.ResponseWriter, r *http.Request)
- func (s *App) Route(r chi.Router)
- func (s *App) SyncTime(w http.ResponseWriter, r *http.Request)
- func (s *App) UpdateDNS(w http.ResponseWriter, r *http.Request)
- func (s *App) UpdateHostname(w http.ResponseWriter, r *http.Request)
- func (s *App) UpdateHosts(w http.ResponseWriter, r *http.Request)
- func (s *App) UpdateRootPassword(w http.ResponseWriter, r *http.Request)
- func (s *App) UpdateSWAP(w http.ResponseWriter, r *http.Request)
- func (s *App) UpdateTime(w http.ResponseWriter, r *http.Request)
- func (s *App) UpdateTimezone(w http.ResponseWriter, r *http.Request)
- type DNS
- type Hostname
- type Hosts
- type Password
- type SWAP
- type Time
- type Timezone
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct{}
func (*App) GetHostname ¶
func (s *App) GetHostname(w http.ResponseWriter, r *http.Request)
GetHostname 获取主机名
func (*App) GetHosts ¶
func (s *App) GetHosts(w http.ResponseWriter, r *http.Request)
GetHosts 获取 hosts 信息
func (*App) GetSWAP ¶
func (s *App) GetSWAP(w http.ResponseWriter, r *http.Request)
GetSWAP 获取 SWAP 信息
func (*App) GetTimezone ¶
func (s *App) GetTimezone(w http.ResponseWriter, r *http.Request)
GetTimezone 获取时区
func (*App) UpdateDNS ¶
func (s *App) UpdateDNS(w http.ResponseWriter, r *http.Request)
UpdateDNS 设置 DNS 信息
func (*App) UpdateHostname ¶
func (s *App) UpdateHostname(w http.ResponseWriter, r *http.Request)
UpdateHostname 设置主机名
func (*App) UpdateHosts ¶
func (s *App) UpdateHosts(w http.ResponseWriter, r *http.Request)
UpdateHosts 设置 hosts 信息
func (*App) UpdateRootPassword ¶
func (s *App) UpdateRootPassword(w http.ResponseWriter, r *http.Request)
UpdateRootPassword 设置 root 密码
func (*App) UpdateSWAP ¶
func (s *App) UpdateSWAP(w http.ResponseWriter, r *http.Request)
UpdateSWAP 设置 SWAP 信息
func (*App) UpdateTime ¶
func (s *App) UpdateTime(w http.ResponseWriter, r *http.Request)
UpdateTime 设置时间
func (*App) UpdateTimezone ¶
func (s *App) UpdateTimezone(w http.ResponseWriter, r *http.Request)
UpdateTimezone 设置时区
type Hostname ¶
type Hostname struct {
Hostname string `form:"hostname" json:"hostname" validate:"required|regex:^[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9]$"`
}
Click to show internal directories.
Click to hide internal directories.