功能:新增云管API与Web控制台并完成现场接入
This commit is contained in:
1 parent
18a9ce995d
commit
3fb7b4da8c
79 files changed
+17367
-3
No files matched your search
@@ -0,0 +1,91 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
type Administrator struct {
|
||||
ID string `json:"id" db:"id"`
|
||||
Username string `json:"username" db:"username"`
|
||||
DisplayName string `json:"displayName" db:"display_name"`
|
||||
Role string `json:"role" db:"role"`
|
||||
PasswordHash string `json:"-" db:"password_hash"`
|
||||
}
|
||||
type Desktop struct {
|
||||
ID string `json:"id" db:"id"`
|
||||
Name string `json:"name" db:"name"`
|
||||
OS string `json:"os" db:"os"`
|
||||
Node string `json:"node" db:"node"`
|
||||
VMID int `json:"vmid" db:"vmid"`
|
||||
Pool string `json:"pool" db:"pool"`
|
||||
PowerState string `json:"powerState" db:"power_state"`
|
||||
ServiceState string `json:"serviceState" db:"service_state"`
|
||||
Provider string `json:"provider" db:"provider"`
|
||||
Endpoint string `json:"endpoint" db:"endpoint"`
|
||||
App string `json:"app" db:"app"`
|
||||
Width int `json:"width" db:"width"`
|
||||
Height int `json:"height" db:"height"`
|
||||
FPS int `json:"fps" db:"fps"`
|
||||
UpdatedAt time.Time `json:"updatedAt" db:"updated_at"`
|
||||
}
|
||||
type Terminal struct {
|
||||
ID string `json:"id" db:"id"`
|
||||
SN string `json:"sn" db:"sn"`
|
||||
Name string `json:"name" db:"name"`
|
||||
Group string `json:"group" db:"group_name"`
|
||||
Status string `json:"status" db:"status"`
|
||||
AgentVersion string `json:"agentVersion" db:"agent_version"`
|
||||
LastSeen *time.Time `json:"lastSeen" db:"last_seen"`
|
||||
SessionDesktopID *string `json:"sessionDesktopId" db:"session_desktop_id"`
|
||||
SessionState string `json:"sessionState" db:"session_state"`
|
||||
ConfigVersion int `json:"configVersion" db:"config_version"`
|
||||
FPS *float64 `json:"fps" db:"fps"`
|
||||
RTT *float64 `json:"rtt" db:"rtt"`
|
||||
}
|
||||
type User struct {
|
||||
ID string `json:"id" db:"id"`
|
||||
Username string `json:"username" db:"username"`
|
||||
DisplayName string `json:"displayName" db:"display_name"`
|
||||
Enabled bool `json:"enabled" db:"enabled"`
|
||||
TerminalID *string `json:"terminalId" db:"terminal_id"`
|
||||
DesktopIDs []string `json:"desktopIds"`
|
||||
}
|
||||
type Resource struct {
|
||||
ID string `json:"id" db:"id"`
|
||||
Name string `json:"name" db:"name"`
|
||||
Status string `json:"status" db:"status"`
|
||||
CPU float64 `json:"cpu" db:"cpu"`
|
||||
Memory float64 `json:"memory" db:"memory"`
|
||||
Storage float64 `json:"storage" db:"storage"`
|
||||
Provider string `json:"provider" db:"provider"`
|
||||
UpdatedAt time.Time `json:"updatedAt" db:"updated_at"`
|
||||
}
|
||||
type Task struct {
|
||||
ID string `json:"id" db:"id"`
|
||||
Kind string `json:"kind" db:"kind"`
|
||||
Action string `json:"action" db:"action"`
|
||||
TargetID string `json:"targetId" db:"target_id"`
|
||||
TargetName string `json:"targetName" db:"target_name"`
|
||||
Actor string `json:"actor" db:"actor"`
|
||||
Status string `json:"status" db:"status"`
|
||||
Message string `json:"message" db:"message"`
|
||||
ProviderRef string `json:"providerRef" db:"provider_ref"`
|
||||
CreatedAt time.Time `json:"createdAt" db:"created_at"`
|
||||
UpdatedAt time.Time `json:"updatedAt" db:"updated_at"`
|
||||
IdempotencyKey string `json:"-" db:"idempotency_key"`
|
||||
}
|
||||
type Audit struct {
|
||||
ID string `json:"id" db:"id"`
|
||||
Actor string `json:"actor" db:"actor"`
|
||||
Action string `json:"action" db:"action"`
|
||||
Target string `json:"target" db:"target"`
|
||||
Result string `json:"result" db:"result"`
|
||||
RequestID string `json:"requestId" db:"request_id"`
|
||||
CreatedAt time.Time `json:"createdAt" db:"created_at"`
|
||||
}
|
||||
|
||||
type DeviceDiagnostics struct {
|
||||
AgentVersion string `json:"agentVersion" binding:"required,max=80"`
|
||||
BootID string `json:"bootId" binding:"required,max=80"`
|
||||
UptimeSeconds float64 `json:"uptimeSeconds" binding:"min=0"`
|
||||
KioskState string `json:"kioskState" binding:"required,max=80"`
|
||||
LogTail string `json:"logTail" binding:"max=16384"`
|
||||
}
|
||||
Reference in new issue
Block a user