package main // type ispSetting struct { // // select name, value from isp_settings; // Name string `json:"name"` // Value string `json:"value"` // } type dciLocation struct { // select id,status,status_info,name,ssh_address,ssh_port,ssh_user,setup_info,params_dhcp,params_redis,params_nginx,params_netflow,settings,is_main,proxy_params,userspace,patch from dci_1.dci_location; Id int `json:"id"` Status string `json:"status"` StatusInfo string `json:"status_info"` Name string `json:"name"` SshAddress string `json:"ssh_address"` SshPort int `json:"ssh_port"` SshUser string `json:"ssh_user"` SetupInfo string `json:"setup_info"` ParamsDhcp string `json:"params_dhcp"` ParamsRedis string `json:"params_redis"` ParamsNginx string `json:"params_nginx"` ParamsNetflow string `json:"params_netflow"` Settings string `json:"settings"` IsMain int `json:"is_main"` ProxyParams string `json:"proxy_params"` Userspace int `json:"userspace"` Patch string `json:"patch"` } type dciLocationDockerCompose struct { // select id,name,docker_compose from dci_1.dci_location; Id int `json:"id"` Name string `json:"name"` DockerCompose string `json:"docker_compose"` } type taskManagerTask struct { // select id,name,status,registration_time from auth.taskmgr_task where status != 'complete' and registration_time >= NOW() - INTERVAL 1 MONTH; Id int `json:"id"` Name string `json:"name"` RegistrationTime string `json:"registration_time"` RequestInfo string `json:"request_info"` Output string `json:"output"` Status string `json:"status"` } type hwByLocation struct { // SELECT // (SELECT COUNT(id) from dci_server WHERE location = 2) as server, // (SELECT COUNT(id) from dci_switch WHERE location = 2) as switch, // (SELECT count(id) from dci_pdu WHERE location = 2) as pdu, // (SELECT COUNT(id) from dci_ups WHERE location = 2) as ups, // (SELECT COUNT(id) from dci_server WHERE location = 2) + // (SELECT COUNT(id) from dci_switch WHERE location = 2) + // (SELECT count(id) from dci_pdu WHERE location = 2) + // (SELECT COUNT(id) from dci_ups WHERE location = 2) as total_location_2; Location int `json:"location"` Server int `json:"server"` Switch int `json:"switch"` Pdu int `json:"pdu"` Ups int `json:"ups"` } type installedPlugin struct { // select name,status,version,current_version from ps_plugin; Name string `json:"name"` Status string `json:"string"` Version string `json:"version"` CurrentVersion string `json:"current_version"` } type users struct { Count int `json:"count"` } type ldap struct { Id int `json:"id"` Name string `json:"name"` LastSync string `json:"last_sync"` } type repo struct { // SELECT id,name,url FROM dci_repo Id int `json:"id"` Name string `json:"name"` Url string `json:"url"` } type osTemplate struct { // SELECT id,name,filename,macro,metainfo,directory_name,repository,size from dci_os_template where repo != 1 /* репозиторий ispsystem*/ Id int `json:"id"` Name string `json:"name"` Filename string `json:"filename"` Macro string `json:"macro"` Metainfo string `json:"metainfo"` DirectoryName string `json:"directory_name"` Repository int `json:"repository"` Size int `json:"size"` } // type processlist struct { // // SELECT * FROM information_schema.processlist WHERE COMMAND != 'Sleep' AND TIME > 0 ORDER BY TIME DESC; // Id int `json:"id"` // User string `json:"user"` // Host string `json:"host"` // Db string `json:"db"` // Command string `json:"command"` // Time int `json:"time"` // State string `json:"state"` // Info string `json:"info"` // } type realIP struct { // SELECT name, value FROM auth.isp_settings WHERE name = "trusted_servers" Name string `json:"name"` Value string `json:"value"` } type backupTask struct { // SELECT id,enabled,cron_expression,limit_count,limit_size_mib FROM backup_task Id int `json:"id"` Enabled int `json:"enabled"` CronExpression string `json:"cron_expression"` LimitCount int `json:"limit_count"` LimitSizeMib int `json:"limit_size_mib"` } type copiedFiles struct { FileNames []string `json:"file_names"` Config string `json:"config"` PlatformDockerCompose string `json:"platform_docker_compose"` InstallLog string `json:"install_log"` }