Documentation ¶
Index ¶
- Constants
- Variables
- type ApiAuth
- func (l *ApiAuth) CheckKeyExist(key, apiAuthId string) (exist bool, err error)
- func (l *ApiAuth) CountApiAuth() (count int64, err error)
- func (l *ApiAuth) DeleteByAuthApiId(apiAuthId string) (affect int64, err error)
- func (l *ApiAuth) GetAllShowApiAuth() (data []map[string]string, err error)
- func (l *ApiAuth) GetApiAuthByApiAuthId(apiAuthId string) (data map[string]string, err error)
- func (l *ApiAuth) GetApiAuthByLimit(number, limit int) (authApis []map[string]string, err error)
- func (l *ApiAuth) Insert(apiAuth map[string]interface{}) (apiAuthId int64, err error)
- func (l *ApiAuth) UpdateByAuthApiId(apiAuth map[string]interface{}, apiAuthId string) (affect int64, err error)
- type Configure
- func (config *Configure) CheckIsBlock() (isBlock bool, block map[string]string, err error)
- func (config *Configure) GetBlock() (block map[string]string, err error)
- func (config *Configure) GetEmail() (email map[string]string, err error)
- func (config *Configure) InsertBlock(blockValue []map[string]interface{}) (err error)
- func (config *Configure) InsertEmailConfig(emailValue []map[string]interface{}) (err error)
- type Contact
- func (c *Contact) CountContact() (count int64, err error)
- func (c *Contact) CountContactByName(name string) (count int64, err error)
- func (c *Contact) DeleteByContactId(contactId string) (affect int64, err error)
- func (c *Contact) GetAllContact() (contacts []map[string]string, err error)
- func (c *Contact) GetContactByContactId(contactId string) (contact map[string]string, err error)
- func (c *Contact) GetContactByLimit(limit, number int) (contact []map[string]string, err error)
- func (c *Contact) GetContactByLimitAndName(name string, limit, number int) (contacts []map[string]string, err error)
- func (c *Contact) Insert(contact map[string]interface{}) (contactId int64, err error)
- func (c *Contact) UpdateByContactId(contact map[string]interface{}, contactId string) (affect int64, err error)
- type Group
- func (g *Group) CountGroups() (count int64, err error)
- func (g *Group) CountGroupsByKeyword(keyword string) (count int64, err error)
- func (g *Group) Delete(groupId string) (err error)
- func (g *Group) GetGroupByGroupId(groupId string) (groups map[string]string, err error)
- func (g *Group) GetGroupByName(name string) (group map[string]string, err error)
- func (g *Group) GetGroups() (groups []map[string]string, err error)
- func (g *Group) GetGroupsByGroupIds(groupIds []string) (groups []map[string]string, err error)
- func (g *Group) GetGroupsByKeywordAndLimit(keyword string, limit int, number int) (groups []map[string]string, err error)
- func (g *Group) GetGroupsByLimit(limit int, number int) (groups []map[string]string, err error)
- func (g *Group) HasGroupName(name string) (has bool, err error)
- func (g *Group) HasSameGroupName(groupId, name string) (has bool, err error)
- func (g *Group) Insert(group map[string]interface{}) (id int64, err error)
- func (g *Group) Update(groupId string, group map[string]interface{}) (id int64, err error)
- type Log
- func (l *Log) CountLogs() (count int64, err error)
- func (l *Log) CountLogsByKeyword(level, message, username string) (count int64, err error)
- func (l *Log) GetLogByLogId(logId string) (log map[string]string, err error)
- func (l *Log) GetLogsByKeywordAndLimit(level, message, username string, limit int, number int) (logs []map[string]string, err error)
- func (l *Log) GetLogsByLimit(limit int, number int) (logs []map[string]string, err error)
- func (l *Log) Insert(log map[string]interface{}) (id int64, err error)
- type Node
- func (node *Node) CountNodes() (count int64, err error)
- func (node *Node) CountNodesByKeywords(keywords map[string]string) (count int64, err error)
- func (node *Node) GetNodeByNodeId(nodeId string) (nodes map[string]string, err error)
- func (node *Node) GetNodeByNodeIds(nodeIds []string) (nodes []map[string]string, err error)
- func (node *Node) GetNodeByNotNodeIds(nodeIds []string) (nodes []map[string]string, err error)
- func (node *Node) GetNodes() (nodes []map[string]string, err error)
- func (node *Node) GetNodesByKeywordsAndLimit(keywords map[string]string, limit int, number int) (nodes []map[string]string, err error)
- func (node *Node) GetNodesByLimit(limit int, number int) (nodes []map[string]string, err error)
- func (node *Node) HasNodeByIpAndPort(nodeId, ip string, port int) (has bool, err error)
- func (node *Node) Insert(nodeValue map[string]interface{}) (id int64, err error)
- func (node *Node) Update(nodeId string, nodeValue map[string]interface{}) (id int64, err error)
- type NodeNodes
- func (p *NodeNodes) DeleteByNodeIdAndNodesId(nodeId string, nodesId string) (err error)
- func (p *NodeNodes) DeleteNodeNodesByNodeId(nodeId string) (err error)
- func (p *NodeNodes) DeleteNodeNodesByNodeNodesId(nodeNodesId string) (err error)
- func (p *NodeNodes) GetNodeNodes() (nodeNodes []map[string]string, err error)
- func (p *NodeNodes) GetNodeNodesByNodeId(nodeId string) (nodeNodes []map[string]string, err error)
- func (p *NodeNodes) GetNodeNodesByNodeIds(nodeIds []string) (nodeNodes []map[string]string, err error)
- func (p *NodeNodes) GetNodeNodesByNodesId(nodesId string) (nodeNodes []map[string]string, err error)
- func (n *NodeNodes) InsertBatch(insertValues []map[string]interface{}) (id int64, err error)
- type Nodes
- func (nodes *Nodes) CountNodeGroups() (count int64, err error)
- func (nodes *Nodes) CountNodeGroupsByKeyword(keyword string) (count int64, err error)
- func (p *Nodes) Delete(nodesId string) (err error)
- func (p *Nodes) GetNodeGroupByNodesId(nodesId string) (nodes map[string]string, err error)
- func (p *Nodes) GetNodeGroups() (nodes []map[string]string, err error)
- func (nodes *Nodes) GetNodeGroupsByKeywordAndLimit(keyword string, limit int, number int) (nodeGroups []map[string]string, err error)
- func (nodes *Nodes) GetNodeGroupsByLimit(limit int, number int) (nodeGroups []map[string]string, err error)
- func (p *Nodes) GetNodeGroupsByNodesIds(nodesIds []string) (nodes []map[string]string, err error)
- func (p *Nodes) GetNodesByName(name string) (nodes map[string]string, err error)
- func (p *Nodes) HasNodesName(name string) (has bool, err error)
- func (p *Nodes) HasSameNodesName(nodesId, name string) (has bool, err error)
- func (p *Nodes) Insert(nodes map[string]interface{}) (id int64, err error)
- func (p *Nodes) Update(nodesId string, nodes map[string]interface{}) (id int64, err error)
- type Notice
- func (notice *Notice) CountNotices() (count int64, err error)
- func (notice *Notice) CountNoticesByKeyword(keyword string) (count int64, err error)
- func (p *Notice) Delete(noticeId string) (err error)
- func (p *Notice) GetNoticeByNoticeId(noticeId string) (notice map[string]string, err error)
- func (p *Notice) GetNoticeByTitle(title string) (notice map[string]string, err error)
- func (notice *Notice) GetNoticesByKeywordAndLimit(keyword string, limit int, number int) (notices []map[string]string, err error)
- func (notice *Notice) GetNoticesByLimit(limit int, number int) (notices []map[string]string, err error)
- func (p *Notice) Insert(notice map[string]interface{}) (id int64, err error)
- func (p *Notice) Update(noticeId string, notice map[string]interface{}) (id int64, err error)
- type Project
- func (p *Project) CountGroupByProjectIds(projectIds []string) (total int64, err error)
- func (project *Project) CountProjects() (count int64, err error)
- func (project *Project) CountProjectsByKeywords(keywords map[string]string) (count int64, err error)
- func (p *Project) Delete(projectId string) (err error)
- func (p *Project) GetGroupIdsByProjectIds(projectIds []string) (groupIds []string, err error)
- func (p *Project) GetProjectByName(name string) (project map[string]string, err error)
- func (p *Project) GetProjectByProjectId(projectId string) (project map[string]string, err error)
- func (p *Project) GetProjectByProjectIds(projectIds []string) (projects []map[string]string, err error)
- func (p *Project) GetProjectByProjectIdsAndKeywords(projectIds []string, keywords map[string]string) (projects []map[string]string, err error)
- func (project *Project) GetProjects() (projects []map[string]string, err error)
- func (project *Project) GetProjectsByKeywords(keywords map[string]string) (projects []map[string]string, err error)
- func (p *Project) GetProjectsByKeywordsAndLimit(keywords map[string]string, limit int, number int) (projects []map[string]string, err error)
- func (project *Project) GetProjectsByLikeName(name string) (projects []map[string]string, err error)
- func (project *Project) GetProjectsByLimit(limit int, number int) (projects []map[string]string, err error)
- func (p *Project) HasProjectName(name string) (has bool, err error)
- func (p *Project) HasSameProjectName(projectId, name string) (has bool, err error)
- func (p *Project) Insert(project map[string]interface{}) (id int64, err error)
- func (p *Project) Update(projectId string, project map[string]interface{}) (id int64, err error)
- type ProjectNode
- func (p *ProjectNode) DeleteByProjectId(projectId string) (err error)
- func (p *ProjectNode) DeleteByProjectIdNodeIds(projectId string, nodeIds []string) (err error)
- func (p *ProjectNode) DeleteProjectNodeByNodeId(nodeId string) (err error)
- func (p *ProjectNode) GetProjectNodeByProjectId(projectId string) (projectNodes []map[string]string, err error)
- func (n *ProjectNode) InsertBatch(insertValues []map[string]interface{}) (id int64, err error)
- type Task
- func (l *Task) CountTask() (count int64, err error)
- func (l *Task) CountTaskAndUserByCreateTime(startTime int64, endTime int64) (total int64, userTotal int64, err error)
- func (l *Task) CountTaskByProjectId(projectId string) (count int64, err error)
- func (l *Task) CountTaskByProjectIdAndUserId(projectId, userId string) (count int64, err error)
- func (l *Task) CountTaskByUserIdsAndProjectIds(userName, projectName string, userIds, projectIds []string) (count int64, err error)
- func (l *Task) GetAllTask() (tasks []map[string]string, err error)
- func (t *Task) GetProjectIdsOrderByCountProjectLimit(limit int) (tasks []map[string]string, err error)
- func (l *Task) GetTaskByProjectId(projectId string, limit, number int) (tasks []map[string]string, err error)
- func (l *Task) GetTaskByProjectIdAndUserId(projectId, userId string, limit, number int) (tasks []map[string]string, err error)
- func (l *Task) GetTaskByProjectIdNoLimit(projectId string) (tasks []map[string]string, err error)
- func (l *Task) GetTaskByProjectIdsAndTaskIds(projectIds, taskIds []string) (task []map[string]string, err error)
- func (t *Task) GetTaskByTaskId(taskId string) (tasks map[string]string, err error)
- func (t *Task) GetTaskByTaskIds(taskIds []string) (tasks []map[string]string, err error)
- func (l *Task) GetTasksByLimit(limit, number int) (tasks []map[string]string, err error)
- func (t *Task) GetTasksByUserId(userId string) (tasks []map[string]string, err error)
- func (l *Task) GetTasksByUserIdsAndProjectIdsAndLimit(userName, projectName string, userIds, projectIds []string, limit, number int) (tasks []map[string]string, err error)
- func (l *Task) Insert(task map[string]interface{}) (id int64, err error)
- type TaskLog
- func (l *TaskLog) CountByCreateTimeGroupByIsSuccess(startTime int64, endTime int64) (successTotal int64, failedTotal int64, err error)
- func (t *TaskLog) CountTaskLogByTaskIdsAndIsSuccess(taskIds []string, isSuccess int) (total int64, err error)
- func (l *TaskLog) DeleteByNodeId(nodeId string) (err error)
- func (t *TaskLog) GetAllTaskLog() (taskLogs []map[string]string, err error)
- func (l *TaskLog) GetExcutingTaskIdByTaskLog() (taskIds []string, err error)
- func (t *TaskLog) GetFailedTaskLogByTaskIds(taskIds []string) (tasLogs []map[string]string, err error)
- func (t *TaskLog) GetTaskLogByStatus(status int) (tasLogs []map[string]string, err error)
- func (t *TaskLog) GetTaskLogBySuccess(isSuccess int) (tasLogs []map[string]string, err error)
- func (t *TaskLog) GetTaskLogByTaskId(taskId string) (tasLogs []map[string]string, err error)
- func (t *TaskLog) GetTaskLogByTaskIds(taskIds []string) (tasLogs []map[string]string, err error)
- func (t *TaskLog) GetTaskLogByTaskLogId(taskLogId string) (tasLogs map[string]string, err error)
- func (t *TaskLog) GetTaskLogsByTaskLogIds(taskLogIds []string) (taskLogs []map[string]string, err error)
- func (l *TaskLog) Insert(taskLog map[string]interface{}) (id int64, err error)
- func (l *TaskLog) InsertBatch(taskLogs []map[string]interface{}) (err error)
- func (t *TaskLog) Update(taskLogId string, taskLogValue map[string]interface{}) (id int64, err error)
- type User
- func (p *User) ChangePassword(userId, newpassword, oldpassword string) (err error)
- func (user *User) CountUsers() (count int64, err error)
- func (user *User) CountUsersByKeyword(keyword string) (count int64, err error)
- func (p *User) Delete(userId string) (err error)
- func (p *User) EncodePassword(password string) (passwordHash string)
- func (p *User) GetUserByLikeName(username string) (user []map[string]string, err error)
- func (p *User) GetUserByName(username, appAuthID string) (user map[string]string, err error)
- func (p *User) GetUserByUserId(userId string) (user map[string]string, err error)
- func (p *User) GetUserByUserIds(userIds []string) (users []map[string]string, err error)
- func (p *User) GetUserByUserIdsAndNoLimit(userIds []string) (users []map[string]string, err error)
- func (user *User) GetUsersByKeywordAndLimit(keyword string, limit int, number int) (users []map[string]string, err error)
- func (user *User) GetUsersByLimit(limit int, number int) (users []map[string]string, err error)
- func (p *User) HasSameUsername(userId, username string) (has bool, err error)
- func (p *User) HasUsername(username string) (has bool, err error)
- func (p *User) Insert(user map[string]interface{}) (id int64, err error)
- func (p *User) Review(userId string) (err error)
- func (p *User) Update(userId string, user map[string]interface{}) (id int64, err error)
- func (p *User) UpdateUserByUsername(user map[string]interface{}) (affect int64, err error)
- type UserProject
- func (p *UserProject) CountProjectByUserId(userId string) (total int64, err error)
- func (p *UserProject) DeleteByProjectId(projectId string) (err error)
- func (p *UserProject) DeleteByUserIdProjectIds(userId string, projectIds []string) (err error)
- func (p *UserProject) DeleteUserProjectByUserId(userId string) (err error)
- func (p *UserProject) GetUserProjectByProjectId(projectId string) (userProjects []map[string]string, err error)
- func (p *UserProject) GetUserProjectByUserId(userId string) (userProjects []map[string]string, err error)
- func (n *UserProject) InsertBatch(insertValues []map[string]interface{}) (id int64, err error)
Constants ¶
const ( Table_ApiAuth_Name = "api_auth" API_AUTH_DELETE = "1" API_AUTH_NORMAL = "0" )
const ( CONFIGURE_DELETE = 1 CONFIGURE_NORMAL = 0 BLOCK_ENABLE = "1" BLOCK_UNABLE = "0" )
const ( GROUP_DELETE = 1 GROUP_NORMAL = 0 )
const ( Log_Level_Emegergency = iota Log_Level_Alaert Log_Level_Critical Log_Level_Error Log_Level_Warning Log_Level_Notice Log_Level_Info Log_Level_Debug )
const ( NODE_DELETE = 1 NODE_NORMAL = 0 )
const ( NODES_DELETE = 1 NODES_NORMAL = 0 )
const ( NOTICE_DELETE = 1 NOTICE_NORMAL = 0 )
const ( PROJECT_DELETE = 1 PROJECT_NORMAL = 0 // 是否灰度发布 PROJECT_GRAYSCALE_PUBLISH_TRUE = 1 PROJECT_GRAYSCALE_PUBLISH_FALASE = 0 )
const ( TASKLOG_STATUS_CREATE = 0 // 任务状态,创建 TASKLOG_STATUS_SATART = 1 // 任务状态,开始执行 TASKLOG_STATUS_FINISH = 2 // 任务状态,执行完成 TASKLOG_FAILED = 0 // 执行结果状态,失败 TASKLOG_SUCCESS = 1 // 执行结果状态,成功 )
const ( USER_ROLE_ROOT = 3 USER_ROLE_ADMIN = 2 USER_ROLE_USER = 1 USER_DELETE = 1 USER_NORMAL = 0 )
const Table_Configure_Name = "configure"
const Table_Contact_Name = "contact"
const Table_Group_Name = "group"
const Table_Log_Name = "log"
const Table_NodeNodes_Name = "node_nodes"
const Table_Node_Name = "node"
const Table_Nodes_Name = "nodes"
const Table_Notice_Name = "notice"
const Table_ProjectNode_Name = "project_node"
const Table_Project_Name = "project"
const Table_TaskLog_Name = "task_log"
const Table_Task_Name = "task"
const Table_UserProject_Name = "user_project"
const Table_User_Name = "user"
Variables ¶
var ApiAuthModel = ApiAuth{}
var ConfigureModel = Configure{}
var ContactModel = Contact{}
var G *mysql.DBGroup
var GroupModel = Group{}
var LogModel = Log{}
var NodeModel = Node{}
var NodeNodesModel = NodeNodes{}
var NodesModel = Nodes{}
var NoticeModel = Notice{}
var ProjectModel = Project{}
var ProjectNodeModel = ProjectNode{}
var TaskLogModel = TaskLog{}
var TaskModel = Task{}
var UserModel = User{}
var UserProjectModel = UserProject{}
Functions ¶
This section is empty.
Types ¶
type ApiAuth ¶
type ApiAuth struct { }
func (*ApiAuth) CheckKeyExist ¶
判断 key 是否存在
func (*ApiAuth) CountApiAuth ¶
获取api_auth数量
func (*ApiAuth) DeleteByAuthApiId ¶
删除 api_auth
func (*ApiAuth) GetAllShowApiAuth ¶
获取所有的api_auth
func (*ApiAuth) GetApiAuthByApiAuthId ¶
根据 api_auth_id 获取 api_auth
func (*ApiAuth) GetApiAuthByLimit ¶
分页获取api_auth
type Configure ¶
type Configure struct { }
func (*Configure) CheckIsBlock ¶
func (*Configure) InsertBlock ¶
修改封版信息
func (*Configure) InsertEmailConfig ¶
type Contact ¶
type Contact struct { }
func (*Contact) CountContactByName ¶
获取筛选名字查询结果条数
func (*Contact) DeleteByContactId ¶
通过 contact_id 删除联系人信息
func (*Contact) GetAllContact ¶
获取所有联系人信息
func (*Contact) GetContactByContactId ¶
通过 contact_id 获取联系人数据
func (*Contact) GetContactByLimit ¶
分页获取联系人
func (*Contact) GetContactByLimitAndName ¶
func (c *Contact) GetContactByLimitAndName(name string, limit, number int) (contacts []map[string]string, err error)
分页筛选名字查询结果
type Group ¶
type Group struct { }
func (*Group) CountGroupsByKeyword ¶
根据关键字获取项目组总数
func (*Group) GetGroupByGroupId ¶
根据 group_id 获取项目组
func (*Group) GetGroupByName ¶
根据 name 获取项目组
func (*Group) GetGroupsByGroupIds ¶
根据 group_ids 获取项目组
func (*Group) GetGroupsByKeywordAndLimit ¶
func (g *Group) GetGroupsByKeywordAndLimit(keyword string, limit int, number int) (groups []map[string]string, err error)
根据关键字分页获取项目组
func (*Group) GetGroupsByLimit ¶
分页获取项目组
func (*Group) HasGroupName ¶
项目组名称是否存在
func (*Group) HasSameGroupName ¶
项目组名称是否存在
type Log ¶
type Log struct { }
func (*Log) CountLogsByKeyword ¶
根据关键字获取日志总数
func (*Log) GetLogByLogId ¶
根据 log_id 获取日志
func (*Log) GetLogsByKeywordAndLimit ¶
func (l *Log) GetLogsByKeywordAndLimit(level, message, username string, limit int, number int) (logs []map[string]string, err error)
根据关键字分页获取日志
func (*Log) GetLogsByLimit ¶
分页获取日志
type Node ¶
type Node struct { }
func (*Node) CountNodesByKeywords ¶
根据关键字获取节点总数
func (*Node) GetNodeByNodeId ¶
通过nodeId获取节点数据
func (*Node) GetNodeByNodeIds ¶
通过多个 node_id 获取节点数据
func (*Node) GetNodeByNotNodeIds ¶
除 node_ids 的节点数据
func (*Node) GetNodesByKeywordsAndLimit ¶
func (node *Node) GetNodesByKeywordsAndLimit(keywords map[string]string, limit int, number int) (nodes []map[string]string, err error)
根据关键字分页获取节点
func (*Node) GetNodesByLimit ¶
分页获取节点
func (*Node) HasNodeByIpAndPort ¶
是否存在节点
type NodeNodes ¶
type NodeNodes struct { }
func (*NodeNodes) DeleteByNodeIdAndNodesId ¶
根据 node_id 和 nodes_id 删除关系
func (*NodeNodes) DeleteNodeNodesByNodeId ¶
根据 node_id 删除关系
func (*NodeNodes) DeleteNodeNodesByNodeNodesId ¶
根据 node_nodes_id 删除关系
func (*NodeNodes) GetNodeNodes ¶
所有的节点节点组关系
func (*NodeNodes) GetNodeNodesByNodeId ¶
根据 node_id 获取节点节点组关系
func (*NodeNodes) GetNodeNodesByNodeIds ¶ added in v0.8.3
func (p *NodeNodes) GetNodeNodesByNodeIds(nodeIds []string) (nodeNodes []map[string]string, err error)
根据多个 node_id 获取节点节点组关系
type Nodes ¶
type Nodes struct { }
func (*Nodes) CountNodeGroups ¶
节点组总数
func (*Nodes) CountNodeGroupsByKeyword ¶
根据关键字获取节点组总数
func (*Nodes) GetNodeGroupByNodesId ¶
根据 nodes_id 获取节点组
func (*Nodes) GetNodeGroups ¶
获取所有的节点组
func (*Nodes) GetNodeGroupsByKeywordAndLimit ¶
func (nodes *Nodes) GetNodeGroupsByKeywordAndLimit(keyword string, limit int, number int) (nodeGroups []map[string]string, err error)
根据关键字分页获取节点组
func (*Nodes) GetNodeGroupsByLimit ¶
func (nodes *Nodes) GetNodeGroupsByLimit(limit int, number int) (nodeGroups []map[string]string, err error)
分页获取节点组
func (*Nodes) GetNodeGroupsByNodesIds ¶ added in v0.8.3
根据多个 nodes_id 获取节点组
func (*Nodes) GetNodesByName ¶
根据 name 获取节点组
func (*Nodes) HasNodesName ¶
节点组名称是否存在
func (*Nodes) HasSameNodesName ¶
节点组名称是否存在
type Notice ¶
type Notice struct { }
func (*Notice) CountNoticesByKeyword ¶
根据关键字获取公告总数
func (*Notice) GetNoticeByNoticeId ¶
根据 notice_id 获取公告
func (*Notice) GetNoticeByTitle ¶
根据公告标题查找公告
func (*Notice) GetNoticesByKeywordAndLimit ¶
func (notice *Notice) GetNoticesByKeywordAndLimit(keyword string, limit int, number int) (notices []map[string]string, err error)
根据关键字分页获取公告
func (*Notice) GetNoticesByLimit ¶
func (notice *Notice) GetNoticesByLimit(limit int, number int) (notices []map[string]string, err error)
分页获取公告
type Project ¶
type Project struct { }
func (*Project) CountGroupByProjectIds ¶
根据 project_ids 获取项目组数量
func (*Project) CountProjects ¶
项目总数
func (*Project) CountProjectsByKeywords ¶
func (project *Project) CountProjectsByKeywords(keywords map[string]string) (count int64, err error)
根据关键字获取项目总数
func (*Project) GetGroupIdsByProjectIds ¶
根据 project_ids 获取 groupIds
func (*Project) GetProjectByName ¶
根据 name 获取项目
func (*Project) GetProjectByProjectId ¶
根据 project_id 获取项目
func (*Project) GetProjectByProjectIds ¶
func (p *Project) GetProjectByProjectIds(projectIds []string) (projects []map[string]string, err error)
根据 project_ids 获取项目
func (*Project) GetProjectByProjectIdsAndKeywords ¶
func (p *Project) GetProjectByProjectIdsAndKeywords(projectIds []string, keywords map[string]string) (projects []map[string]string, err error)
根据 project_ids 获取项目
func (*Project) GetProjects ¶
获取所有的项目
func (*Project) GetProjectsByKeywords ¶
func (project *Project) GetProjectsByKeywords(keywords map[string]string) (projects []map[string]string, err error)
根据关键字获取项目总数
func (*Project) GetProjectsByKeywordsAndLimit ¶
func (p *Project) GetProjectsByKeywordsAndLimit(keywords map[string]string, limit int, number int) (projects []map[string]string, err error)
根据关键字分页获取项目
func (*Project) GetProjectsByLikeName ¶
func (project *Project) GetProjectsByLikeName(name string) (projects []map[string]string, err error)
name模糊搜索
func (*Project) GetProjectsByLimit ¶
func (project *Project) GetProjectsByLimit(limit int, number int) (projects []map[string]string, err error)
分页获取项目
func (*Project) HasProjectName ¶
项目名称是否存在
func (*Project) HasSameProjectName ¶
项目名称是否存在
type ProjectNode ¶
type ProjectNode struct { }
func (*ProjectNode) DeleteByProjectId ¶
func (p *ProjectNode) DeleteByProjectId(projectId string) (err error)
func (*ProjectNode) DeleteByProjectIdNodeIds ¶
func (p *ProjectNode) DeleteByProjectIdNodeIds(projectId string, nodeIds []string) (err error)
func (*ProjectNode) DeleteProjectNodeByNodeId ¶
func (p *ProjectNode) DeleteProjectNodeByNodeId(nodeId string) (err error)
func (*ProjectNode) GetProjectNodeByProjectId ¶
func (p *ProjectNode) GetProjectNodeByProjectId(projectId string) (projectNodes []map[string]string, err error)
func (*ProjectNode) InsertBatch ¶
func (n *ProjectNode) InsertBatch(insertValues []map[string]interface{}) (id int64, err error)
批量插入
type Task ¶
type Task struct { }
func (*Task) CountTaskAndUserByCreateTime ¶
func (l *Task) CountTaskAndUserByCreateTime(startTime int64, endTime int64) (total int64, userTotal int64, err error)
根据创建时间获取 task 数量
func (*Task) CountTaskByProjectId ¶
func (*Task) CountTaskByProjectIdAndUserId ¶
func (*Task) CountTaskByUserIdsAndProjectIds ¶
func (l *Task) CountTaskByUserIdsAndProjectIds(userName, projectName string, userIds, projectIds []string) (count int64, err error)
通过 user_id 和 project_id 获取task的数量
func (*Task) GetProjectIdsOrderByCountProjectLimit ¶
func (*Task) GetTaskByProjectId ¶
func (*Task) GetTaskByProjectIdAndUserId ¶
func (*Task) GetTaskByProjectIdNoLimit ¶
func (*Task) GetTaskByProjectIdsAndTaskIds ¶
func (l *Task) GetTaskByProjectIdsAndTaskIds(projectIds, taskIds []string) (task []map[string]string, err error)
通过project_id和task_id查找task
func (*Task) GetTaskByTaskId ¶
根据 task_id 获取任务
func (*Task) GetTaskByTaskIds ¶
根据 task_ids 获取任务
func (*Task) GetTasksByLimit ¶
func (*Task) GetTasksByUserId ¶
根据 user_id 获取任务
func (*Task) GetTasksByUserIdsAndProjectIdsAndLimit ¶
type TaskLog ¶
type TaskLog struct { }
func (*TaskLog) CountByCreateTimeGroupByIsSuccess ¶
func (l *TaskLog) CountByCreateTimeGroupByIsSuccess(startTime int64, endTime int64) (successTotal int64, failedTotal int64, err error)
根据创建时间获取 task_log 数量
func (*TaskLog) CountTaskLogByTaskIdsAndIsSuccess ¶
func (*TaskLog) DeleteByNodeId ¶ added in v0.8.3
根据 node_id 删除关系
func (*TaskLog) GetAllTaskLog ¶
获取全部的 task_log
func (*TaskLog) GetExcutingTaskIdByTaskLog ¶
查找未执行完的日志
func (*TaskLog) GetFailedTaskLogByTaskIds ¶
func (t *TaskLog) GetFailedTaskLogByTaskIds(taskIds []string) (tasLogs []map[string]string, err error)
获取失败的 task_log
func (*TaskLog) GetTaskLogByStatus ¶
根据状态获取任务日志
func (*TaskLog) GetTaskLogBySuccess ¶
根据 is_success 获取任务日志
func (*TaskLog) GetTaskLogByTaskId ¶
根据 task_id 获取任务日志
func (*TaskLog) GetTaskLogByTaskIds ¶
根据多个 task_id 获取任务日志
func (*TaskLog) GetTaskLogByTaskLogId ¶
根据 task_log_id 获取任务日志
func (*TaskLog) GetTaskLogsByTaskLogIds ¶
func (t *TaskLog) GetTaskLogsByTaskLogIds(taskLogIds []string) (taskLogs []map[string]string, err error)
根据 task_log_ids 获取任务日志
func (*TaskLog) InsertBatch ¶
插入多条任务日志
type User ¶
type User struct { }
func (*User) ChangePassword ¶
修改密码
func (*User) CountUsersByKeyword ¶
根据关键字获取用户总数
func (*User) EncodePassword ¶
加密password
func (*User) GetUserByLikeName ¶
根据用户名模糊查找用户
func (*User) GetUserByName ¶
根据用户名查找用户
func (*User) GetUserByUserId ¶
根据 user_id 获取用户
func (*User) GetUserByUserIds ¶
根据 user_ids 获取用户
func (*User) GetUserByUserIdsAndNoLimit ¶ added in v0.8.3
func (*User) GetUsersByKeywordAndLimit ¶
func (user *User) GetUsersByKeywordAndLimit(keyword string, limit int, number int) (users []map[string]string, err error)
根据关键字分页获取用户
func (*User) GetUsersByLimit ¶
分页获取用户
func (*User) HasSameUsername ¶
用户名是否存在
func (*User) HasUsername ¶
用户名是否存在
type UserProject ¶
type UserProject struct { }
func (*UserProject) CountProjectByUserId ¶
func (p *UserProject) CountProjectByUserId(userId string) (total int64, err error)
func (*UserProject) DeleteByProjectId ¶
func (p *UserProject) DeleteByProjectId(projectId string) (err error)
func (*UserProject) DeleteByUserIdProjectIds ¶
func (p *UserProject) DeleteByUserIdProjectIds(userId string, projectIds []string) (err error)
func (*UserProject) DeleteUserProjectByUserId ¶
func (p *UserProject) DeleteUserProjectByUserId(userId string) (err error)
func (*UserProject) GetUserProjectByProjectId ¶
func (p *UserProject) GetUserProjectByProjectId(projectId string) (userProjects []map[string]string, err error)
func (*UserProject) GetUserProjectByUserId ¶
func (p *UserProject) GetUserProjectByUserId(userId string) (userProjects []map[string]string, err error)
func (*UserProject) InsertBatch ¶
func (n *UserProject) InsertBatch(insertValues []map[string]interface{}) (id int64, err error)
批量插入