Documentation
¶
Index ¶
- type APPModel
- type AppAnalyse
- type CasaOSGlobalVariables
- type CasaOSHeart
- type ConnectState
- type CustomizationPostData
- type Devices
- type DockerStatsModel
- type Drive
- type DriveUSB
- type Env
- type EnvArray
- type Envs
- type FileDetailModel
- type FileSummaryModel
- type GoDaddyModel
- type IOCountersStat
- type JSON
- type LSBLKModel
- type MapStrings
- type MessageModel
- type NotifyMssage
- type Path
- type PathArray
- type PathMap
- type PersionModel
- type PortArray
- type PortMap
- type Ports
- type RedisModel
- type Result
- type SearchFileInfo
- type ServerAppList
- type ServerCategoryList
- type ServerModel
- type SmartctlA
- type Storage
- type Strings
- type Summary
- type SysInfoModel
- type SystemConfig
- type TcpPorts
- type TranFileModel
- type UdpPorts
- type UserModel
- type Version
- type Volume
- type ZeroTierConfig
- type ZeroTierModel
- type ZeroTierUpData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APPModel ¶
type APPModel struct {
LogSavePath string
LogSaveName string
LogFileExt string
DateStrFormat string
DateTimeFormat string
TimeFormat string
DateFormat string
ProjectPath string
}
服务配置
type AppAnalyse ¶ added in v0.2.10
type CasaOSGlobalVariables ¶ added in v0.2.3
type CasaOSGlobalVariables struct {
AppChange bool
}
type CasaOSHeart ¶ added in v0.2.9
type ConnectState ¶ added in v0.2.9
type ConnectState struct {
From string `json:"from"`
To string `json:"to"`
Type string `json:"type"` //current state 1:ready 2:ok
CreatedAt time.Time `json:"created_at"`
UUId string `json:"uuid"` //对接标识
}
记录链接状态
type CustomizationPostData ¶
type CustomizationPostData struct {
Origin string `json:"origin"`
NetworkModel string `json:"network_model"`
Index string `json:"index"`
Icon string `json:"icon"`
Image string `json:"image"`
Envs EnvArray `json:"envs"`
Ports PortArray `json:"ports"`
Volumes PathArray `json:"volumes"`
Devices PathArray `json:"devices"`
//Port string `json:"port,omitempty"`
PortMap string `json:"port_map"`
Memory int64 `json:"memory"`
Restart string `json:"restart"`
EnableUPNP bool `json:"enable_upnp"`
Label string `json:"label"`
Description string `json:"description"`
Position bool `json:"position"`
HostName string `json:"host_name"`
Privileged bool `json:"privileged"`
CapAdd []string `json:"cap_add"`
Cmd []string `json:"cmd"`
}
type DockerStatsModel ¶ added in v0.2.3
type FileDetailModel ¶ added in v0.2.10
type FileDetailModel struct {
Path string `json:"path"`
}
需要获取文件详情
type FileSummaryModel ¶ added in v0.2.10
type FileSummaryModel struct {
Hash string `json:"hash"` //Verify file
Name string `json:"name"`
Path string `json:"path"`
BlockSize int `json:"block_size"`
Length int `json:"length"`
Size int64 `json:"size"`
}
返回文件详情
type GoDaddyModel ¶
type IOCountersStat ¶
type IOCountersStat struct {
Name string `json:"name"` // interface name
BytesSent uint64 `json:"bytesSent"` // number of bytes sent
BytesRecv uint64 `json:"bytesRecv"` // number of bytes received
PacketsSent uint64 `json:"packetsSent"` // number of packets sent
PacketsRecv uint64 `json:"packetsRecv"` // number of packets received
Errin uint64 `json:"errin"` // total number of errors while receiving
Errout uint64 `json:"errout"` // total number of errors while sending
Dropin uint64 `json:"dropin"` // total number of incoming packets which were dropped
Dropout uint64 `json:"dropout"` // total number of outgoing packets which were dropped (always 0 on OSX and BSD)
Fifoin uint64 `json:"fifoin"` // total number of FIFO buffers errors while receiving
Fifoout uint64 `json:"fifoout"` // total number of FIFO buffers errors while sending
State string `json:"state"`
DateTime time.Time `json:"date_time"`
}
type JSON ¶
type JSON json.RawMessage
type LSBLKModel ¶
type LSBLKModel struct {
Name string `json:"name"`
FsType string `json:"fstype"`
Size uint64 `json:"size"`
FSSize string `json:"fssize"`
Path string `json:"path"`
Model string `json:"model"` //设备标识符
RM bool `json:"rm"` //是否为可移动设备
RO bool `json:"ro"` //是否为只读设备
State string `json:"state"`
PhySec int `json:"phy-sec"` //物理扇区大小
Type string `json:"type"`
Vendor string `json:"vendor"` //供应商
Rev string `json:"rev"` //修订版本
FSAvail string `json:"fsavail"` //可用空间
FSUse string `json:"fsuse%"` //已用百分比
MountPoint string `json:"mountpoint"`
Format string `json:"format"`
Health string `json:"health"`
HotPlug bool `json:"hotplug"`
UUID string `json:"uuid"`
FSUsed string `json:"fsused"`
Temperature int `json:"temperature"`
Tran string `json:"tran"`
MinIO uint64 `json:"min-io"`
UsedPercent float64 `json:"used_percent"`
Serial string `json:"serial"`
Children []LSBLKModel `json:"children"`
SubSystems string `json:"subsystems"`
//详情特有
StartSector uint64 `json:"start_sector,omitempty"`
Rota bool `json:"rota"` //true(hhd) false(ssd)
DiskType string `json:"disk_type"`
EndSector uint64 `json:"end_sector,omitempty"`
}
type MapStrings ¶
***************使gorm支持[]string结构******************
func (*MapStrings) Scan ¶
func (c *MapStrings) Scan(input interface{}) error
type MessageModel ¶ added in v0.2.10
type NotifyMssage ¶ added in v0.2.9
type PersionModel ¶ added in v0.2.9
type RedisModel ¶
type RedisModel struct {
Host string
Password string
MaxIdle int
MaxActive int
IdleTimeout time.Duration
}
redis配置文件
type Result ¶
type Result struct {
Success int `json:"success" example:"200"`
Message string `json:"message" example:"ok"`
Data interface{} `json:"data" example:"返回结果"`
}
公共返回模型
type SearchFileInfo ¶
type ServerAppList ¶
type ServerAppList struct {
Id uint `gorm:"column:id;primary_key" json:"id"`
Title string `json:"title"`
Description string `json:"description"`
Tagline string `json:"tagline"`
Tags Strings `gorm:"type:json" json:"tags"`
Icon string `json:"icon"`
ScreenshotLink Strings `gorm:"type:json" json:"screenshot_link"`
Category string `json:"category"`
CategoryFont string `json:"category_font"`
PortMap string `json:"port_map"`
ImageVersion string `json:"image_version"`
Tip string `json:"tip"`
Envs EnvArray `json:"envs"`
Ports PortArray `json:"ports"`
Volumes PathArray `json:"volumes"`
Devices PathArray `json:"devices"`
NetworkModel string `json:"network_model"`
Image string `json:"image"`
Index string `json:"index"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
State string `json:"state"`
Author string `json:"author"`
MinMemory int `json:"min_memory"`
MinDisk int `json:"min_disk"`
MaxMemory uint64 `json:"max_memory"`
Thumbnail string `json:"thumbnail"`
Healthy string `json:"healthy"`
Plugins Strings `json:"plugins"`
Origin string `json:"origin"`
Type int `json:"type"`
Developer string `json:"developer"`
HostName string `json:"host_name"`
Privileged bool `json:"privileged"`
CapAdd Strings `json:"cap_add"`
Cmd Strings `json:"cmd"`
}
type ServerCategoryList ¶
type ServerModel ¶
type ServerModel struct {
HttpPort string
RunMode string
ServerApi string
LockAccount bool
Handshake string
Token string
}
服务配置
type SmartctlA ¶ added in v0.2.6
type SmartctlA struct {
Smartctl struct {
Version []int `json:"version"`
SvnRevision string `json:"svn_revision"`
PlatformInfo string `json:"platform_info"`
BuildInfo string `json:"build_info"`
Argv []string `json:"argv"`
ExitStatus int `json:"exit_status"`
} `json:"smartctl"`
Device struct {
Name string `json:"name"`
InfoName string `json:"info_name"`
Type string `json:"type"`
Protocol string `json:"protocol"`
} `json:"device"`
ModelName string `json:"model_name"`
SerialNumber string `json:"serial_number"`
FirmwareVersion string `json:"firmware_version"`
UserCapacity struct {
Blocks int `json:"blocks"`
Bytes int64 `json:"bytes"`
} `json:"user_capacity"`
SmartStatus struct {
Passed bool `json:"passed"`
} `json:"smart_status"`
AtaSmartData struct {
OfflineDataCollection struct {
Status struct {
Value int `json:"value"`
String string `json:"string"`
} `json:"status"`
CompletionSeconds int `json:"completion_seconds"`
} `json:"offline_data_collection"`
SelfTest struct {
Status struct {
Value int `json:"value"`
String string `json:"string"`
Passed bool `json:"passed"`
} `json:"status"`
PollingMinutes struct {
Short int `json:"short"`
Extended int `json:"extended"`
Conveyance int `json:"conveyance"`
} `json:"polling_minutes"`
} `json:"self_test"`
Capabilities struct {
Values []int `json:"values"`
ExecOfflineImmediateSupported bool `json:"exec_offline_immediate_supported"`
OfflineIsAbortedUponNewCmd bool `json:"offline_is_aborted_upon_new_cmd"`
OfflineSurfaceScanSupported bool `json:"offline_surface_scan_supported"`
SelfTestsSupported bool `json:"self_tests_supported"`
ConveyanceSelfTestSupported bool `json:"conveyance_self_test_supported"`
SelectiveSelfTestSupported bool `json:"selective_self_test_supported"`
AttributeAutosaveEnabled bool `json:"attribute_autosave_enabled"`
ErrorLoggingSupported bool `json:"error_logging_supported"`
GpLoggingSupported bool `json:"gp_logging_supported"`
} `json:"capabilities"`
} `json:"ata_smart_data"`
PowerOnTime struct {
Hours int `json:"hours"`
} `json:"power_on_time"`
PowerCycleCount int `json:"power_cycle_count"`
Temperature struct {
Current int `json:"current"`
} `json:"temperature"`
}
type SystemConfig ¶
type TranFileModel ¶ added in v0.2.10
type UserModel ¶
type UserModel struct {
UserName string
PWD string
Token string
Head string
Email string
Description string
Initialized bool
}
用户相关
type ZeroTierConfig ¶
type ZeroTierConfig struct {
Private bool `json:"private"`
}
type ZeroTierModel ¶
zeritier相关
type ZeroTierUpData ¶
type ZeroTierUpData struct {
Config ZeroTierConfig `json:"config"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.