nezha/model/setting_api.go

37 lines
1.8 KiB
Go
Raw Normal View History

2024-10-27 01:10:07 -04:00
package model
type SettingForm struct {
DNSServers string `json:"dns_servers,omitempty" validate:"optional"`
2024-11-16 07:57:03 -05:00
IgnoredIPNotification string `json:"ignored_ip_notification,omitempty" validate:"optional"`
2024-10-27 01:10:07 -04:00
IPChangeNotificationGroupID uint64 `json:"ip_change_notification_group_id,omitempty"` // IP变更提醒的通知组
Cover uint8 `json:"cover,omitempty"`
2024-11-23 03:36:16 -05:00
SiteName string `json:"site_name,omitempty" minLength:"1"`
Language string `json:"language,omitempty" minLength:"2"`
2024-11-16 07:57:03 -05:00
InstallHost string `json:"install_host,omitempty" validate:"optional"`
CustomCode string `json:"custom_code,omitempty" validate:"optional"`
CustomCodeDashboard string `json:"custom_code_dashboard,omitempty" validate:"optional"`
2024-11-23 03:36:16 -05:00
RealIPHeader string `json:"real_ip_header,omitempty" validate:"optional"` // 真实IP
2024-12-06 10:19:28 -05:00
UserTemplate string `json:"user_template,omitempty" validate:"optional"`
2024-10-27 01:10:07 -04:00
2024-12-04 07:00:18 -05:00
TLS bool `json:"tls,omitempty" validate:"optional"`
2024-11-16 07:57:03 -05:00
EnableIPChangeNotification bool `json:"enable_ip_change_notification,omitempty" validate:"optional"`
EnablePlainIPInNotification bool `json:"enable_plain_ip_in_notification,omitempty" validate:"optional"`
2024-10-27 01:10:07 -04:00
}
2024-12-04 07:00:18 -05:00
type FrontendTemplate struct {
Path string `json:"path,omitempty"`
Name string `json:"name,omitempty"`
Repository string `json:"repository,omitempty"`
Author string `json:"author,omitempty"`
Version string `json:"version,omitempty"`
IsAdmin bool `json:"is_admin,omitempty"`
IsOfficial bool `json:"is_official,omitempty"`
2024-12-06 10:19:28 -05:00
}
2024-12-28 10:50:59 -05:00
type SettingResponse[T any] struct {
Config T `json:"config,omitempty"`
2024-12-04 07:00:18 -05:00
Version string `json:"version,omitempty"`
FrontendTemplates []FrontendTemplate `json:"frontend_templates,omitempty"`
2024-12-04 07:00:18 -05:00
}