Files
LokiStack/backend/models/host.go
T
Logan.LiandClaude 2a93de600d feat: LokiDeploy 初始提交 - 轻量级 K8s Loki 部署平台
Go(Gin) + React(Vite + shadcn/ui + Tailwind) 前后端分离,全中文 UI

- 集群管理:Kubeconfig / Token 双接入,kubectl + helm 部署
- 主机管理:SSH 密钥 / 密码双认证,CPU/内存/磁盘使用率监控,SSH 错误中文友好提示
- 存储配置、部署管理、系统设置
- Docker 镜像内置 kubectl + helm,开箱即用
- run.sh 一键启停(start/stop/restart/status)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-29 17:03:57 +08:00

39 lines
1005 B
Go

package models
import "time"
type Host struct {
ID uint `json:"id"`
Name string `json:"name"`
HostIP string `json:"hostIP"`
Port int `json:"port"`
User string `json:"user"`
AuthType string `json:"authType"`
Password string `json:"password"`
PrivateKey string `json:"privateKey"`
KeyPhrase string `json:"keyPhrase"`
OS string `json:"os"`
Arch string `json:"arch"`
Status string `json:"status"`
Labels string `json:"labels"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
func (h *Host) Sanitized() map[string]interface{} {
return map[string]interface{}{
"id": h.ID,
"name": h.Name,
"hostIP": h.HostIP,
"port": h.Port,
"user": h.User,
"authType": h.AuthType,
"os": h.OS,
"arch": h.Arch,
"status": h.Status,
"labels": h.Labels,
"createdAt": h.CreatedAt,
"updatedAt": h.UpdatedAt,
}
}