Documentation
¶
Overview ¶
Copyright (c) KylinSoft Co., Ltd. 2024.All rights reserved.
PilotGo licensed under the Mulan Permissive Software License, Version 2.
See LICENSE file for more details.
Author: zhanghan2021 <zhanghan@kylinos.cn>
Date: Tue Jul 23 15:50:05 2024 +0800
Copyright (c) KylinSoft Co., Ltd. 2024.All rights reserved.
PilotGo licensed under the Mulan Permissive Software License, Version 2.
See LICENSE file for more details.
Author: Gzx1999 <guozhengxin@kylinos.cn>
Date: Tue Nov 7 15:01:17 2023 +0800
Copyright (c) KylinSoft Co., Ltd. 2024.All rights reserved.
PilotGo licensed under the Mulan Permissive Software License, Version 2.
See LICENSE file for more details.
Author: zhanghan2021 <zhanghan@kylinos.cn>
Date: Wed Sep 27 17:35:12 2023 +0800
Copyright (c) KylinSoft Co., Ltd. 2024.All rights reserved.
PilotGo licensed under the Mulan Permissive Software License, Version 2.
See LICENSE file for more details.
Author: wubijie <wubijie@kylinos.cn>
Date: Thu Jan 11 20:24:26 2024 +0800
Copyright (c) KylinSoft Co., Ltd. 2024.All rights reserved.
PilotGo licensed under the Mulan Permissive Software License, Version 2.
See LICENSE file for more details.
Author: Gzx1999 <guozhengxin@kylinos.cn>
Date: Wed Oct 11 16:18:11 2023 +0800
Copyright (c) KylinSoft Co., Ltd. 2024.All rights reserved.
PilotGo licensed under the Mulan Permissive Software License, Version 2.
See LICENSE file for more details.
Author: zhanghan2021 <zhanghan@kylinos.cn>
Date: Wed Sep 27 17:35:12 2023 +0800
Copyright (c) KylinSoft Co., Ltd. 2024.All rights reserved.
PilotGo licensed under the Mulan Permissive Software License, Version 2.
See LICENSE file for more details.
Author: zhanghan2021 <zhanghan@kylinos.cn>
Date: Wed Sep 27 17:35:12 2023 +0800
提供公共数据结构定义
- Copyright (c) KylinSoft Co., Ltd. 2024.All rights reserved.
- PilotGo licensed under the Mulan Permissive Software License, Version 2.
- See LICENSE file for more details.
- Author: wubijie <wubijie@kylinos.cn>
- Date: Thu Nov 2 16:38:53 2023 +0800
Index ¶
- Constants
- type AsyncCmdResult
- type Batch
- type BatchExtention
- type BatchList
- type CmdResult
- type CmdStruct
- type CommonResult
- type EventCallback
- type EventMessage
- type Extention
- type File
- type MachineExtention
- type MachineNode
- type MessageData
- type NodeResult
- type PageExtention
- type Permission
- type Result
- type ServiceInfo
- type ServiceResult
- type ServiceStruct
- type Tag
Constants ¶
const ( // 单机/多机操作扩展,增加选择单机/多机时对机器的操作功能 ExtentionMachine = "machine" // 批处理扩展,增加选择批次时对批次的操作 ExtentionBatch = "batch" // 主页面扩展,增加侧边栏入口及主页面 ExtentionPage = "page" )
const ( ServiceActiveStatusRunning = "running" ServiceActiveStatusExited = "exited" ServiceActiveStatusWaiting = "waiting" ServiceActiveStatusInactive = "inactive" ServiceActiveStatusUnknown = "unknown" ServiceLoadedStatusEnabled = "enabled" ServiceLoadedStatusDisabled = "disabled" ServiceLoadedStatusStatic = "static" ServiceLoadedStatusMask = "mask" ServiceLoadedStatusUnknown = "unknown" )
const ( ServiceUnit = "service" SocketUnit = "socket" TargetUnit = "target" MountUnit = "mount" AutomountUnit = "automount" PathUnit = "path" TimeUnit = "time" )
const ( // 插件正在运行 StatusRunning = "running" // 插件已加载,但未运行 StatusLoaded = "loaded" // 插件离线,无法访问 StatusOffline = "offline" )
const ( TypeOk = "ok" TypeWarn = "warn" TypeError = "error" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AsyncCmdResult ¶
type BatchExtention ¶
type BatchExtention struct {
Type string `json:"type"`
Name string `json:"name"`
URL string `json:"url"`
Permission string `json:"permission"`
}
func (*BatchExtention) Clone ¶
func (be *BatchExtention) Clone() Extention
type CommonResult ¶
type CommonResult struct {
Code int `json:"code"`
Message string `json:"msg"`
Data json.RawMessage `json:"data"`
}
func (*CommonResult) ParseData ¶
func (r *CommonResult) ParseData(d interface{}) error
type EventCallback ¶
type EventCallback func(e *EventMessage)
type EventMessage ¶
type Extention ¶
type Extention interface {
Clone() Extention
}
func ParseParameters ¶
解析extentions参数
type MachineExtention ¶
type MachineExtention struct {
Type string `json:"type"`
Name string `json:"name"`
URL string `json:"url"`
Permission string `json:"permission"`
}
func (*MachineExtention) Clone ¶
func (me *MachineExtention) Clone() Extention
type MachineNode ¶
type MessageData ¶
type MessageData struct {
MsgType int `json:"msg_type_id"`
MessageType string `json:"msg_type"`
TimeStamp time.Time `json:"timestamp"`
Data interface{} `json:"data"`
}
func (*MessageData) ToMessageDataString ¶
func (msgData *MessageData) ToMessageDataString() (string, error)
type NodeResult ¶
type PageExtention ¶
type PageExtention struct {
Type string `json:"type"`
Name string `json:"name"`
URL string `json:"url"`
Permission string `json:"permission"`
}
func (*PageExtention) Clone ¶
func (pe *PageExtention) Clone() Extention
type Permission ¶
type Result ¶
type Result struct {
Code int `json:"code"`
Mseeage string `json:"msg"`
Data []*ServiceResult `json:"data"`
}
type ServiceInfo ¶
type ServiceInfo struct {
ServiceName string
UnitName string
UnitType string
ServicePath string //配置文件放置的目录
ServiceAfter string //在什么服务启动后启动
ServiceBefore string //在什么服务启动前启动
ServiceRequires string //需要的daemon
ServiceWants string //与requires相反
ServiceEnvironmentFile string //启动脚本的环境配置文件
ServiceExectStart string //实际执行daemon的指令或脚本程序
ServiceActiveStatus string
ServiceLoadedStatus string
StartTime string
}
type ServiceResult ¶
type ServiceResult struct {
MachineUUID string
MachineIP string
ServiceSample ServiceInfo
}