Versions in this module Expand all Collapse all v0 v0.30.1 Feb 12, 2026 v0.21.2 Feb 12, 2026 v0.21.1 Feb 12, 2026 Changes in this version + const CacheKeyOauth2State + const ConfigCoverAll + const ConfigCoverIgnoreAll + const ConfigTypeCloudflare + const ConfigTypeGitHub + const ConfigTypeGitea + const ConfigTypeGitee + const ConfigTypeGitlab + const ConfigTypeJihulab + const ConfigTypeOidc + const CronCoverAlertTrigger + const CronCoverAll + const CronCoverIgnoreAll + const CronTypeCronTask + const CronTypeTriggerTask + const CtxKeyAuthorizedUser + const CtxKeyPreferredTheme + const CtxKeyViewPasswordVerified + const MTReportHostState + const ModeAlwaysTrigger + const ModeOnetimeTrigger + const MonitorCoverAll + const MonitorCoverIgnoreAll + const NotificationRequestMethodGET + const NotificationRequestMethodPOST + const NotificationRequestTypeForm + const NotificationRequestTypeJSON + const ProviderCloudflare + const ProviderDummy + const ProviderTencentCloud + const ProviderWebHook + const RuleCoverAll + const RuleCoverIgnoreAll + const TaskTypeCommand + const TaskTypeFM + const TaskTypeHTTPGet + const TaskTypeICMPPing + const TaskTypeKeepalive + const TaskTypeNAT + const TaskTypeReportHostInfo + const TaskTypeTCPPing + const TaskTypeTerminal + const TaskTypeTerminalGRPC + const TaskTypeUpgrade + var DashboardThemes = map[string]string + var Languages = map[string]string + var ProviderList = []DDNSProvider + var ProviderMap = map[uint8]string + var Themes = map[string]string + func IsServiceSentinelNeeded(t uint64) bool + type AlertRule struct + Enable *bool + FailTriggerTasks []uint64 + FailTriggerTasksRaw string + Name string + NotificationTag string + RecoverTriggerTasks []uint64 + RecoverTriggerTasksRaw string + Rules []Rule + RulesRaw string + TriggerMode int + func (r *AlertRule) AfterFind(tx *gorm.DB) error + func (r *AlertRule) BeforeSave(tx *gorm.DB) error + func (r *AlertRule) Check(points [][]interface{}) (int, bool) + func (r *AlertRule) Enabled() bool + func (r *AlertRule) Snapshot(cycleTransferStats *CycleTransferStats, server *Server, db *gorm.DB) []interface{} + type ApiToken struct + Note string + Token string + UserID uint64 + type Common struct + CreatedAt time.Time + DeletedAt gorm.DeletedAt + ID uint64 + UpdatedAt time.Time + type Config struct + AvgPingCount int + Cover uint8 + DNSServers string + Debug bool + DisableSwitchTemplateInFrontend bool + EnableIPChangeNotification bool + EnablePlainIPInNotification bool + GRPCHost string + GRPCPort uint + HTTPPort uint + IPChangeNotificationTag string + IgnoredIPNotification string + IgnoredIPNotificationServerIDs map[uint64]bool + Language string + Location string + MaxTCPPingValue int32 + Oauth2 struct{ ... } + ProxyGRPCPort uint + Site struct{ ... } + TLS bool + UseTemplateHandleNoRoute bool + func (c *Config) Read(path string) error + func (c *Config) Save() error + type Cron struct + Command string + Cover uint8 + CronJobID cron.EntryID + LastExecutedAt time.Time + LastResult bool + Name string + NotificationTag string + PushSuccessful bool + Scheduler string + Servers []uint64 + ServersRaw string + TaskType uint8 + func (c *Cron) AfterFind(tx *gorm.DB) error + type CycleTransferStats struct + From time.Time + Max uint64 + Min uint64 + Name string + NextUpdate map[uint64]time.Time + ServerName map[uint64]string + To time.Time + Transfer map[uint64]uint64 + type DDNSProfile struct + AccessID string + AccessSecret string + Domains []string + DomainsRaw string + EnableIPv4 *bool + EnableIPv6 *bool + MaxRetries uint64 + Name string + Provider uint8 + WebhookHeaders string + WebhookMethod uint8 + WebhookRequestBody string + WebhookRequestType uint8 + WebhookURL string + func (d *DDNSProfile) AfterFind(tx *gorm.DB) error + func (d DDNSProfile) TableName() string + type DDNSProvider struct + AccessID bool + AccessSecret bool + ID uint8 + Name string + WebhookHeaders bool + WebhookMethod bool + WebhookRequestBody bool + WebhookRequestType bool + WebhookURL bool + type Host struct + Arch string + BootTime uint64 + CPU []string + CountryCode string + DiskTotal uint64 + GPU []string + IP string + MemTotal uint64 + Platform string + PlatformVersion string + SwapTotal uint64 + Version string + Virtualization string + func PB2Host(h *pb.Host) Host + func (h *Host) PB() *pb.Host + type HostState struct + CPU float64 + DiskUsed uint64 + GPU float64 + Load1 float64 + Load15 float64 + Load5 float64 + MemUsed uint64 + NetInSpeed uint64 + NetInTransfer uint64 + NetOutSpeed uint64 + NetOutTransfer uint64 + ProcessCount uint64 + SwapUsed uint64 + TcpConnCount uint64 + Temperatures []SensorTemperature + UdpConnCount uint64 + Uptime uint64 + func PB2State(s *pb.State) HostState + func (s *HostState) PB() *pb.State + type Monitor struct + Cover uint8 + CronJobID cron.EntryID + Duration uint64 + EnableShowInService bool + EnableTriggerTask bool + FailTriggerTasks []uint64 + FailTriggerTasksRaw string + LatencyNotify bool + MaxLatency float32 + MinLatency float32 + Name string + NotificationTag string + Notify bool + RecoverTriggerTasks []uint64 + RecoverTriggerTasksRaw string + SkipServers map[uint64]bool + SkipServersRaw string + Target string + Type uint8 + func (m *Monitor) AfterFind(tx *gorm.DB) error + func (m *Monitor) BeforeSave(tx *gorm.DB) error + func (m *Monitor) CronSpec() string + func (m *Monitor) InitSkipServers() error + func (m *Monitor) PB() *pb.Task + type MonitorHistory struct + AvgDelay float32 + CreatedAt time.Time + Data string + DeletedAt gorm.DeletedAt + Down uint64 + ID uint64 + MonitorID uint64 + ServerID uint64 + Up uint64 + UpdatedAt time.Time + type NAT struct + Domain string + Host string + Name string + ServerID uint64 + type NResult struct + N uint64 + type Notification struct + Name string + RequestBody string + RequestHeader string + RequestMethod int + RequestType int + Tag string + URL string + VerifySSL *bool + type NotificationServerBundle struct + Loc *time.Location + Notification *Notification + Server *Server + func (ns *NotificationServerBundle) Send(message string) error + type Response struct + Code int + Message string + Result interface{} + type Rule struct + Cover uint64 + CycleInterval uint64 + CycleStart *time.Time + CycleUnit string + Duration uint64 + Ignore map[uint64]bool + LastCycleStatus map[uint64]interface{} + Max float64 + Min float64 + NextTransferAt map[uint64]time.Time + Type string + func (rule Rule) GetTransferDurationEnd() time.Time + func (rule Rule) GetTransferDurationStart() time.Time + func (rule Rule) IsTransferDurationRule() bool + func (u *Rule) Snapshot(cycleTransferStats *CycleTransferStats, server *Server, db *gorm.DB) interface{} + type SensorTemperature struct + Name string + Temperature float64 + type Server struct + DDNSProfiles []uint64 + DDNSProfilesRaw string + DisplayIndex int + EnableDDNS bool + HideForGuest bool + Host *Host + LastActive time.Time + Name string + Note string + PrevTransferInSnapshot int64 + PrevTransferOutSnapshot int64 + PublicNote string + Secret string + State *HostState + Tag string + TaskClose chan error + TaskCloseLock *sync.Mutex + TaskStream pb.NezhaService_RequestTaskServer + func (s *Server) AfterFind(tx *gorm.DB) error + func (s *Server) CopyFromRunningServer(old *Server) + func (s Server) MarshalForDashboard() template.JS + type ServiceItemResponse struct + CurrentDown uint64 + CurrentUp uint64 + Delay *[30]float32 + Down *[30]int + Monitor *Monitor + TotalDown uint64 + TotalUp uint64 + Up *[30]int + func (r ServiceItemResponse) TotalUptime() float32 + type TaskFM struct + StreamID string + type TaskNAT struct + Host string + StreamID string + type TerminalTask struct + StreamID string + type Transfer struct + In uint64 + Out uint64 + ServerID uint64 + type User struct + AvatarURL string + Bio string + Blog string + Email string + Hireable bool + Login string + Name string + SuperAdmin bool + Token string + TokenExpired time.Time + func NewUserFromGitHub(gu *github.User) User + func NewUserFromGitea(gu *gitea.User) User + func NewUserFromGitlab(gu *gitlab.User) User + type V1AlertRule struct + Enable *bool + FailTriggerTasks []uint64 + Name string + NotificationGroupID uint64 + RecoverTriggerTasks []uint64 + Rules []*V1Rule + RulesRaw string + TriggerMode uint8 + func (s *V1AlertRule) GetID() uint64 + type V1Common struct + CreatedAt time.Time + ID uint64 + UpdatedAt time.Time + type V1CommonInterface interface + GetID func() uint64 + type V1Config struct + CustomCode string + CustomCodeDashboard string + Language string + SiteName string + type V1CreateFMResponse struct + SessionID string + type V1CreateTerminalResponse struct + ServerID uint64 + ServerName string + SessionID string + type V1CycleTransferStats struct + From time.Time + Max uint64 + Min uint64 + Name string + NextUpdate map[uint64]time.Time + ServerName map[uint64]string + To time.Time + Transfer map[uint64]uint64 + type V1GeoIP struct + CountryCode string + IP V1IP + type V1Host struct + Arch string + BootTime uint64 + CPU []string + DiskTotal uint64 + GPU []string + MemTotal uint64 + Platform string + PlatformVersion string + SwapTotal uint64 + Version string + Virtualization string + type V1HostState struct + CPU float64 + DiskUsed uint64 + GPU []float64 + Load1 float64 + Load15 float64 + Load5 float64 + MemUsed uint64 + NetInSpeed uint64 + NetInTransfer uint64 + NetOutSpeed uint64 + NetOutTransfer uint64 + ProcessCount uint64 + SwapUsed uint64 + TcpConnCount uint64 + Temperatures []SensorTemperature + UdpConnCount uint64 + Uptime uint64 + type V1IP struct + IPv4Addr string + IPv6Addr string + type V1LoginRequest struct + Password string + Username string + type V1LoginResponse struct + Expire string + Token string + type V1Notification struct + Name string + RequestBody string + RequestHeader string + RequestMethod uint8 + RequestType uint8 + URL string + VerifyTLS *bool + func (s *V1Notification) GetID() uint64 + type V1Profile struct + LoginIP string + type V1Rule struct + Cover uint64 + CycleInterval uint64 + CycleStart *time.Time + CycleUnit string + Duration uint64 + Ignore map[uint64]bool + Max float64 + Min float64 + Type string + type V1Server struct + DDNSProfiles []uint64 + DDNSProfilesRaw string + DisplayIndex int + EnableDDNS bool + GeoIP *V1GeoIP + HideForGuest bool + Host *V1Host + LastActive time.Time + Name string + Note string + PrevTransferInSnapshot int64 + PrevTransferOutSnapshot int64 + PublicNote string + State *V1HostState + TaskStream pb.NezhaService_RequestTaskServer + UUID string + func (s *V1Server) GetID() uint64 + type V1ServerGroup struct + Name string + func (s *V1ServerGroup) GetID() uint64 + type V1ServerGroupResponseItem struct + Group V1ServerGroup + Servers []uint64 + type V1Service struct + Cover uint8 + Duration uint64 + EnableShowInService bool + EnableTriggerTask bool + FailTriggerTasks []uint64 + LatencyNotify bool + MaxLatency float32 + MinLatency float32 + Name string + NotificationGroupID uint64 + Notify bool + RecoverTriggerTasks []uint64 + SkipServers map[uint64]bool + SkipServersRaw string + Target string + Type uint8 + func (s *V1Service) GetID() uint64 + type V1ServiceInfos struct + AvgDelay []float32 + CreatedAt []int64 + ServerID uint64 + ServerName string + ServiceID uint64 + ServiceName string + type V1ServiceResponse struct + CycleTransferStats map[uint64]V1CycleTransferStats + Services map[uint64]V1ServiceResponseItem + type V1ServiceResponseItem struct + CurrentDown uint64 + CurrentUp uint64 + Delay *[30]float32 + Down *[30]int + ServiceName string + TotalDown uint64 + TotalUp uint64 + Up *[30]int + type V1SettingResponse struct + Config T + Version string + type V1StreamServer struct + CountryCode string + DisplayIndex int + Host *V1Host + ID uint64 + LastActive time.Time + Name string + PublicNote string + State *V1HostState + type V1StreamServerData struct + Now int64 + Online uint64 + Servers []V1StreamServer + type V1TerminalForm struct + Protocol string + ServerID uint64 + type V1User struct + Password string + Username string