All checks were successful
Build Multi-Platform Binaries / build-frontend (push) Successful in 28s
Build Multi-Platform Binaries / build-binaries (amd64, linux, client, true) (push) Successful in 1m24s
Build Multi-Platform Binaries / build-binaries (amd64, darwin, server, false) (push) Successful in 1m33s
Build Multi-Platform Binaries / build-binaries (amd64, windows, client, true) (push) Successful in 1m17s
Build Multi-Platform Binaries / build-binaries (amd64, linux, server, true) (push) Successful in 1m54s
Build Multi-Platform Binaries / build-binaries (amd64, windows, server, true) (push) Successful in 1m40s
Build Multi-Platform Binaries / build-binaries (arm, 7, linux, client, true) (push) Successful in 1m8s
Build Multi-Platform Binaries / build-binaries (arm64, darwin, server, false) (push) Successful in 1m46s
Build Multi-Platform Binaries / build-binaries (arm, 7, linux, server, true) (push) Successful in 1m57s
Build Multi-Platform Binaries / build-binaries (arm64, linux, client, true) (push) Successful in 1m9s
Build Multi-Platform Binaries / build-binaries (arm64, linux, server, true) (push) Successful in 1m50s
Build Multi-Platform Binaries / build-binaries (arm64, windows, server, false) (push) Successful in 1m24s
48 lines
1.6 KiB
Go
48 lines
1.6 KiB
Go
package dto
|
|
|
|
// UpdateServerConfigRequest is the config update payload.
|
|
type UpdateServerConfigRequest struct {
|
|
Server *ServerConfigPart `json:"server"`
|
|
Web *WebConfigPart `json:"web"`
|
|
}
|
|
|
|
// ServerConfigPart is the server config subset.
|
|
type ServerConfigPart struct {
|
|
BindAddr string `json:"bind_addr" binding:"omitempty"`
|
|
BindPort int `json:"bind_port" binding:"omitempty,min=1,max=65535"`
|
|
Token string `json:"token" binding:"omitempty,min=8"`
|
|
HeartbeatSec int `json:"heartbeat_sec" binding:"omitempty,min=1,max=300"`
|
|
HeartbeatTimeout int `json:"heartbeat_timeout" binding:"omitempty,min=1,max=600"`
|
|
}
|
|
|
|
// WebConfigPart is the web console config subset.
|
|
type WebConfigPart struct {
|
|
Enabled bool `json:"enabled"`
|
|
BindPort int `json:"bind_port" binding:"omitempty,min=1,max=65535"`
|
|
Username string `json:"username" binding:"omitempty,min=3,max=32"`
|
|
Password string `json:"password" binding:"omitempty,min=6,max=64"`
|
|
}
|
|
|
|
// ServerConfigResponse is the config response payload.
|
|
type ServerConfigResponse struct {
|
|
Server ServerConfigInfo `json:"server"`
|
|
Web WebConfigInfo `json:"web"`
|
|
}
|
|
|
|
// ServerConfigInfo describes the server config.
|
|
type ServerConfigInfo struct {
|
|
BindAddr string `json:"bind_addr"`
|
|
BindPort int `json:"bind_port"`
|
|
Token string `json:"token"`
|
|
HeartbeatSec int `json:"heartbeat_sec"`
|
|
HeartbeatTimeout int `json:"heartbeat_timeout"`
|
|
}
|
|
|
|
// WebConfigInfo describes the web console config.
|
|
type WebConfigInfo struct {
|
|
Enabled bool `json:"enabled"`
|
|
BindPort int `json:"bind_port"`
|
|
Username string `json:"username"`
|
|
Password string `json:"password"`
|
|
}
|