Documentation ¶
Index ¶
- Constants
- Variables
- func ClearTable(table string) error
- func CreatePerformanceTable(table string)
- func CreateTable(table string) error
- func DBInit()
- func Delete(table, key string) error
- func Get(table, key string, data interface{}) error
- func HasTable(table string) bool
- func OpenDB() *bolt.DB
- func OpenPerformanceDB() *bolt.DB
- func Set(table, key string, data interface{}) error
- type DaoExecutable
- type DaoGateway
- type DaoHttpsProxy
- type DaoMonitorRule
- func (dao *DaoMonitorRule) DeleteAlarm(key string) error
- func (dao *DaoMonitorRule) Get(key string) (*entity.MonitorRule, error)
- func (dao *DaoMonitorRule) GetALL() ([]*entity.MonitorRule, []string)
- func (dao *DaoMonitorRule) GetAlarm(key []byte) *entity.Alarm
- func (dao *DaoMonitorRule) GetAlarmALL() ([]*entity.Alarm, []string)
- func (dao *DaoMonitorRule) GetAlarmALLPage(pg int) []*entity.Alarm
- func (dao *DaoMonitorRule) Set(key string, data *entity.MonitorRule) error
- func (dao *DaoMonitorRule) SetAlarm(key string, data *entity.Alarm) error
- type DaoOperate
- type DaoPerformance
- type DaoProjectDocker
- func (dao *DaoProjectDocker) DelProjectDockerContainer(project, containerId string) error
- func (dao *DaoProjectDocker) Delete(key string) error
- func (dao *DaoProjectDocker) Get(key string) (*entity.ProjectDocker, error)
- func (dao *DaoProjectDocker) GetALL() ([]*entity.ProjectDocker, []string)
- func (dao *DaoProjectDocker) GetProjectDockerContainer(project string) ([]*entity.DockerContainerDeploy, []string, error)
- func (dao *DaoProjectDocker) Set(key string, data *entity.ProjectDocker) error
- func (dao *DaoProjectDocker) SetProjectDockerContainer(project, containerId string, value *entity.DockerContainerDeploy) error
- type DaoProjectExecutable
- func (dao *DaoProjectExecutable) Delete(key string) error
- func (dao *DaoProjectExecutable) Get(key string) (*entity.ProjectExecutable, error)
- func (dao *DaoProjectExecutable) GetALL() ([]*entity.ProjectExecutable, []string)
- func (dao *DaoProjectExecutable) GetProjectExecutableProcess(project string) ([]*entity.ExecutableProcess, []string, error)
- func (dao *DaoProjectExecutable) Set(key string, data *entity.ProjectExecutable) error
- func (dao *DaoProjectExecutable) SetProjectExecutableProcess(project, TaskId string, value *entity.ExecutableProcess) error
- type DaoSlave
- type DaoSlaveExecutableTask
- func (dao *DaoSlaveExecutableTask) Delete(key string) error
- func (dao *DaoSlaveExecutableTask) Get(key string) (*entity.ExecutableDeployTask, error)
- func (dao *DaoSlaveExecutableTask) GetALL() ([]*entity.ExecutableDeployTask, []string)
- func (dao *DaoSlaveExecutableTask) Set(key string, data *entity.ExecutableDeployTask) error
- type DaoSocket5Proxy
- type DaoTCPForward
- type DaoTask
- func (dao *DaoTask) Del(key string) error
- func (dao *DaoTask) Get(key string) (*entity.Task, error)
- func (dao *DaoTask) GetALL() ([]*entity.Task, []string)
- func (dao *DaoTask) GetALLPage(pg int) []*entity.Task
- func (dao *DaoTask) Set(key string, data *entity.Task) error
- func (dao *DaoTask) SetBreakOffRse(slave, key, rse string)
- func (dao *DaoTask) SetCompleteRse(slave, key, rse string)
- func (dao *DaoTask) SetDefaultCreate(slave, key, note string)
- type DaoUser
Constants ¶
View Source
const SlaveTABLE_ExecutableTask = "exceutable_task"
表 exceutable_task slave執行任務數據持久化 key:任務ID value:執行任務
View Source
const TABLE_Executable = "executable"
View Source
const TABLE_Gateway = "gateway"
表 gateway 网关表 key:项目 value:网关信息
View Source
const TABLE_HttpsProxy = "https_proxy"
========== 表 https_proxy http/s代理表 key:名称 value:https_proxy数据
View Source
const TABLE_MonitorAlarm = "monitor_alarm" // key:id(随机)
View Source
const TABLE_MonitorRule = "monitor"
监控规则表 key:slave ip value: 监控规则
View Source
const TABLE_Operate = "operate"
表 操作记录 数据持久化 key:操作时间 value: 操作数据
View Source
const TABLE_Project_Docker = "project_docker"
View Source
const TABLE_Project_Executable = "project_executable"
View Source
const TABLE_Slave = "slave"
表 slave salve数据的持久化 key:slave的ip value:slave的基础信息
View Source
const TABLE_Socket5Proxy = "socket5_proxy"
========== 表 socket5_proxy socket5代理表 key:名称 value:socket5_proxy数据
View Source
const TABLE_TCPForward = "tcp_forward"
========== 表 tcp_forward tcp转发 key:名称 value:tcp_forward数据
View Source
const TABLE_Task = "task"
表 task 任务数据持久化 key:任务id value: 任务数据
View Source
const TABLE_User = "user"
Variables ¶
View Source
var OperateUrlMap map[string]string = map[string]string{
"/login": "登录操作",
"/register": "注册操作",
"/api/slave/process/kill": "结束一个进程",
"/api/docker/stop": "docker stop 操作",
"/api/docker/rm": "docker rm 操作",
"/api/docker/rmi": "docker rmi 操作",
"/api/docker/pull": "docker pull 操作",
"/api/docker/run": "dcoker run 操作",
"/api/docker/top": "查看容器进程 docker top 操作",
"/api/docker/rename": "修改容器名称 docker rename 操作",
"/api/docker/restart": "容器重启 docker restart 操作",
"/api/docker/pause": "容器暂停 docker pause 操作",
"/api/docker/state": "实时监控容器性能 操作",
"/api/executable/upload": "上传可执行文件 操作",
"/api/executable/download": "下载可执行文件 操作",
"/api/executable/delete": "删除可执行文件 操作",
"/api/executable/deploy": "部署可执行文件操作",
"/api/executable/task/delete": "刪除已經執行的可执行文件任務 如果正在執行無法刪除 操作",
"/api/executable/task/run": "启动可执行文件任务操作",
"/api/executable/task/kill": "停止已經執行的可執行文件 操作",
"/api/executable/task/restart": "重啓已經執行的可执行文件進程 操作",
"/api/monitor/rule/create": "新增监控标准 操作",
"/api/monitor/alarm/del": "报警删除 操作",
"/api/project/executable/create": "新建 executable项目操作",
"/api/project/executable/run": " 部署executable项目操作",
"/api/project/executable/download": "下载executable项目操作",
"/api/project/docker/create": "新建docker容器项目 操作",
"/api/project/docker/update": "更新并重启容器项目操作",
"/api/project/docker/update/image": "更新项目的镜像,并重启操作",
"/api/project/docker/update/duplicate": "更新副本数量操作",
"/api/project/docker/run": "部署docker项目操作",
"/api/project/docker/container": "查看项目下的docker容器 操作",
"/api/project/docker/list": "docker容器项目列表操作",
"/api/gateway/run": "启动一个网关操作",
"/api/gateway/list": "网关列表操作",
"/api/gateway/delete": "删除一个网关操作",
"/api/gateway/update/port": "修改网关端口映射操作",
"/api/cache/delete": "删除缓存操作",
"/api/slave/hosts/update": "修改 hosts 文件",
}
View Source
var PerformanceBucketName = "Performance_%s"
View Source
var ProjectDockerContainerBucketName = "ProjectDockerContainer_%s" // %s 是项目
View Source
var ProjectExecutableProcessBucketName = "ProjectExecutableProcess_%s" // %s 是项目
Functions ¶
Types ¶
type DaoExecutable ¶
type DaoExecutable struct{}
表 executable 可执行文件 key:可执行文件名 value:可执行文件名信息
func (*DaoExecutable) Get ¶
func (dao *DaoExecutable) Get(key []byte) (*entity.ExecutableFile, error)
func (*DaoExecutable) GetALL ¶
func (dao *DaoExecutable) GetALL() ([]*entity.ExecutableFile, []string)
func (*DaoExecutable) Set ¶
func (dao *DaoExecutable) Set(key string, data *entity.ExecutableFile) error
type DaoGateway ¶
type DaoGateway struct{}
func (*DaoGateway) Get ¶
func (dao *DaoGateway) Get(key string) (*entity.GatewayBase, error)
func (*DaoGateway) GetALL ¶
func (dao *DaoGateway) GetALL() ([]*entity.GatewayBase, []string)
func (*DaoGateway) Set ¶
func (dao *DaoGateway) Set(key string, data *entity.GatewayBase) error
type DaoHttpsProxy ¶
type DaoHttpsProxy struct{}
func (*DaoHttpsProxy) Get ¶
func (dao *DaoHttpsProxy) Get(key string) (*entity.HttpsProxy, error)
func (*DaoHttpsProxy) GetALL ¶
func (dao *DaoHttpsProxy) GetALL() ([]*entity.HttpsProxy, []string)
func (*DaoHttpsProxy) Set ¶
func (dao *DaoHttpsProxy) Set(key string, data *entity.HttpsProxy) error
type DaoMonitorRule ¶
type DaoMonitorRule struct{}
func (*DaoMonitorRule) DeleteAlarm ¶
func (dao *DaoMonitorRule) DeleteAlarm(key string) error
delete
func (*DaoMonitorRule) Get ¶
func (dao *DaoMonitorRule) Get(key string) (*entity.MonitorRule, error)
func (*DaoMonitorRule) GetALL ¶
func (dao *DaoMonitorRule) GetALL() ([]*entity.MonitorRule, []string)
func (*DaoMonitorRule) GetAlarmALL ¶
func (dao *DaoMonitorRule) GetAlarmALL() ([]*entity.Alarm, []string)
func (*DaoMonitorRule) GetAlarmALLPage ¶
func (dao *DaoMonitorRule) GetAlarmALLPage(pg int) []*entity.Alarm
func (*DaoMonitorRule) Set ¶
func (dao *DaoMonitorRule) Set(key string, data *entity.MonitorRule) error
type DaoOperate ¶
type DaoOperate struct{}
func (*DaoOperate) Del ¶
func (dao *DaoOperate) Del(key string) error
type DaoPerformance ¶
type DaoPerformance struct { }
func (*DaoPerformance) GetNowPerformance ¶
func (*DaoPerformance) GetNowPerformance(slave string) (*entity.SlavePerformance, error)
GetNowPerformance 获取最近一条
func (*DaoPerformance) GetPerformanceMinute ¶
func (*DaoPerformance) GetPerformanceMinute(slave string) (map[string]*entity.SlavePerformance, error)
GetPerformanceMinute 指定时间段获取
func (*DaoPerformance) SetPerformance ¶
func (*DaoPerformance) SetPerformance(slave string, value *entity.SlavePerformance) error
SetPerformance
type DaoProjectDocker ¶
type DaoProjectDocker struct{}
func (*DaoProjectDocker) DelProjectDockerContainer ¶
func (dao *DaoProjectDocker) DelProjectDockerContainer(project, containerId string) error
delete
func (*DaoProjectDocker) Get ¶
func (dao *DaoProjectDocker) Get(key string) (*entity.ProjectDocker, error)
func (*DaoProjectDocker) GetALL ¶
func (dao *DaoProjectDocker) GetALL() ([]*entity.ProjectDocker, []string)
func (*DaoProjectDocker) GetProjectDockerContainer ¶
func (dao *DaoProjectDocker) GetProjectDockerContainer(project string) ([]*entity.DockerContainerDeploy, []string, error)
func (*DaoProjectDocker) Set ¶
func (dao *DaoProjectDocker) Set(key string, data *entity.ProjectDocker) error
func (*DaoProjectDocker) SetProjectDockerContainer ¶
func (dao *DaoProjectDocker) SetProjectDockerContainer(project, containerId string, value *entity.DockerContainerDeploy) error
type DaoProjectExecutable ¶
type DaoProjectExecutable struct{}
func (*DaoProjectExecutable) Delete ¶
func (dao *DaoProjectExecutable) Delete(key string) error
delete
func (*DaoProjectExecutable) Get ¶
func (dao *DaoProjectExecutable) Get(key string) (*entity.ProjectExecutable, error)
func (*DaoProjectExecutable) GetALL ¶
func (dao *DaoProjectExecutable) GetALL() ([]*entity.ProjectExecutable, []string)
func (*DaoProjectExecutable) GetProjectExecutableProcess ¶
func (dao *DaoProjectExecutable) GetProjectExecutableProcess(project string) ([]*entity.ExecutableProcess, []string, error)
func (*DaoProjectExecutable) Set ¶
func (dao *DaoProjectExecutable) Set(key string, data *entity.ProjectExecutable) error
func (*DaoProjectExecutable) SetProjectExecutableProcess ¶
func (dao *DaoProjectExecutable) SetProjectExecutableProcess(project, TaskId string, value *entity.ExecutableProcess) error
部署时候分配的 TaskId
type DaoSlaveExecutableTask ¶
type DaoSlaveExecutableTask struct{}
func (*DaoSlaveExecutableTask) Delete ¶
func (dao *DaoSlaveExecutableTask) Delete(key string) error
delete
func (*DaoSlaveExecutableTask) Get ¶
func (dao *DaoSlaveExecutableTask) Get(key string) (*entity.ExecutableDeployTask, error)
func (*DaoSlaveExecutableTask) GetALL ¶
func (dao *DaoSlaveExecutableTask) GetALL() ([]*entity.ExecutableDeployTask, []string)
func (*DaoSlaveExecutableTask) Set ¶
func (dao *DaoSlaveExecutableTask) Set(key string, data *entity.ExecutableDeployTask) error
type DaoSocket5Proxy ¶
type DaoSocket5Proxy struct{}
func (*DaoSocket5Proxy) Delete ¶
func (dao *DaoSocket5Proxy) Delete(key string) error
func (*DaoSocket5Proxy) Get ¶
func (dao *DaoSocket5Proxy) Get(key string) (*entity.Socket5Proxy, error)
func (*DaoSocket5Proxy) GetALL ¶
func (dao *DaoSocket5Proxy) GetALL() ([]*entity.Socket5Proxy, []string)
func (*DaoSocket5Proxy) Set ¶
func (dao *DaoSocket5Proxy) Set(key string, data *entity.Socket5Proxy) error
type DaoTCPForward ¶
type DaoTCPForward struct{}
func (*DaoTCPForward) Delete ¶
func (dao *DaoTCPForward) Delete(key string) error
func (*DaoTCPForward) Get ¶
func (dao *DaoTCPForward) Get(key string) (*entity.TCPForward, error)
func (*DaoTCPForward) GetALL ¶
func (dao *DaoTCPForward) GetALL() ([]*entity.TCPForward, []string)
func (*DaoTCPForward) Set ¶
func (dao *DaoTCPForward) Set(key string, data *entity.TCPForward) error
type DaoTask ¶
type DaoTask struct{}
func (*DaoTask) SetBreakOffRse ¶
SetBreakOffRse
func (*DaoTask) SetCompleteRse ¶
SetCompleteRse
func (*DaoTask) SetDefaultCreate ¶
SetDefaultCreate
Click to show internal directories.
Click to hide internal directories.