models

package
v0.8.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Table_ApiAuth_Name = "api_auth"
	API_AUTH_DELETE    = "1"
	API_AUTH_NORMAL    = "0"
)
View Source
const (
	CONFIGURE_DELETE = 1
	CONFIGURE_NORMAL = 0
	BLOCK_ENABLE     = "1"
	BLOCK_UNABLE     = "0"
)
View Source
const (
	GROUP_DELETE = 1
	GROUP_NORMAL = 0
)
View Source
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
)
View Source
const (
	NODE_DELETE = 1
	NODE_NORMAL = 0
)
View Source
const (
	NODES_DELETE = 1
	NODES_NORMAL = 0
)
View Source
const (
	NOTICE_DELETE = 1
	NOTICE_NORMAL = 0
)
View Source
const (
	PROJECT_DELETE = 1
	PROJECT_NORMAL = 0

	// 是否灰度发布
	PROJECT_GRAYSCALE_PUBLISH_TRUE   = 1
	PROJECT_GRAYSCALE_PUBLISH_FALASE = 0
)
View Source
const (
	TASKLOG_STATUS_CREATE = 0 // 任务状态,创建
	TASKLOG_STATUS_SATART = 1 // 任务状态,开始执行
	TASKLOG_STATUS_FINISH = 2 // 任务状态,执行完成

	TASKLOG_FAILED  = 0 // 执行结果状态,失败
	TASKLOG_SUCCESS = 1 // 执行结果状态,成功
)
View Source
const (
	USER_ROLE_ROOT  = 3
	USER_ROLE_ADMIN = 2
	USER_ROLE_USER  = 1

	USER_DELETE = 1
	USER_NORMAL = 0
)
View Source
const Table_Configure_Name = "configure"
View Source
const Table_Contact_Name = "contact"
View Source
const Table_Group_Name = "group"
View Source
const Table_Log_Name = "log"
View Source
const Table_NodeNodes_Name = "node_nodes"
View Source
const Table_Node_Name = "node"
View Source
const Table_Nodes_Name = "nodes"
View Source
const Table_Notice_Name = "notice"
View Source
const Table_ProjectNode_Name = "project_node"
View Source
const Table_Project_Name = "project"
View Source
const Table_TaskLog_Name = "task_log"
View Source
const Table_Task_Name = "task"
View Source
const Table_UserProject_Name = "user_project"
View Source
const Table_User_Name = "user"

Variables

View Source
var ApiAuthModel = ApiAuth{}
View Source
var ConfigureModel = Configure{}
View Source
var ContactModel = Contact{}
View Source
var GroupModel = Group{}
View Source
var LogModel = Log{}
View Source
var NodeModel = Node{}
View Source
var NodeNodesModel = NodeNodes{}
View Source
var NodesModel = Nodes{}
View Source
var NoticeModel = Notice{}
View Source
var ProjectModel = Project{}
View Source
var ProjectNodeModel = ProjectNode{}
View Source
var TaskLogModel = TaskLog{}
View Source
var TaskModel = Task{}
View Source
var UserModel = User{}
View Source
var UserProjectModel = UserProject{}

Functions

This section is empty.

Types

type ApiAuth

type ApiAuth struct {
}

func (*ApiAuth) CheckKeyExist

func (l *ApiAuth) CheckKeyExist(key, apiAuthId string) (exist bool, err error)

判断 key 是否存在

func (*ApiAuth) CountApiAuth

func (l *ApiAuth) CountApiAuth() (count int64, err error)

获取api_auth数量

func (*ApiAuth) DeleteByAuthApiId

func (l *ApiAuth) DeleteByAuthApiId(apiAuthId string) (affect int64, err error)

删除 api_auth

func (*ApiAuth) GetAllShowApiAuth

func (l *ApiAuth) GetAllShowApiAuth() (data []map[string]string, err error)

获取所有的api_auth

func (*ApiAuth) GetApiAuthByApiAuthId

func (l *ApiAuth) GetApiAuthByApiAuthId(apiAuthId string) (data map[string]string, err error)

根据 api_auth_id 获取 api_auth

func (*ApiAuth) GetApiAuthByLimit

func (l *ApiAuth) GetApiAuthByLimit(number, limit int) (authApis []map[string]string, err error)

分页获取api_auth

func (*ApiAuth) Insert

func (l *ApiAuth) Insert(apiAuth map[string]interface{}) (apiAuthId int64, err error)

添加 auth_api

func (*ApiAuth) UpdateByAuthApiId

func (l *ApiAuth) UpdateByAuthApiId(apiAuth map[string]interface{}, apiAuthId string) (affect int64, err error)

修改 auth_api

type Configure

type Configure struct {
}

func (*Configure) CheckIsBlock

func (config *Configure) CheckIsBlock() (isBlock bool, block map[string]string, err error)

func (*Configure) GetBlock

func (config *Configure) GetBlock() (block map[string]string, err error)

获取封版信息

func (*Configure) GetEmail

func (config *Configure) GetEmail() (email map[string]string, err error)

func (*Configure) InsertBlock

func (config *Configure) InsertBlock(blockValue []map[string]interface{}) (err error)

修改封版信息

func (*Configure) InsertEmailConfig

func (config *Configure) InsertEmailConfig(emailValue []map[string]interface{}) (err error)

type Contact

type Contact struct {
}

func (*Contact) CountContact

func (c *Contact) CountContact() (count int64, err error)

获取联系人总数

func (*Contact) CountContactByName

func (c *Contact) CountContactByName(name string) (count int64, err error)

获取筛选名字查询结果条数

func (*Contact) DeleteByContactId

func (c *Contact) DeleteByContactId(contactId string) (affect int64, err error)

通过 contact_id 删除联系人信息

func (*Contact) GetAllContact

func (c *Contact) GetAllContact() (contacts []map[string]string, err error)

获取所有联系人信息

func (*Contact) GetContactByContactId

func (c *Contact) GetContactByContactId(contactId string) (contact map[string]string, err error)

通过 contact_id 获取联系人数据

func (*Contact) GetContactByLimit

func (c *Contact) GetContactByLimit(limit, number int) (contact []map[string]string, err error)

分页获取联系人

func (*Contact) GetContactByLimitAndName

func (c *Contact) GetContactByLimitAndName(name string, limit, number int) (contacts []map[string]string, err error)

分页筛选名字查询结果

func (*Contact) Insert

func (c *Contact) Insert(contact map[string]interface{}) (contactId int64, err error)

通过 contact_id 更新联系人信息

func (*Contact) UpdateByContactId

func (c *Contact) UpdateByContactId(contact map[string]interface{}, contactId string) (affect int64, err error)

通过 contact_id 更新联系人信息

type Group

type Group struct {
}

func (*Group) CountGroups

func (g *Group) CountGroups() (count int64, err error)

项目组总数

func (*Group) CountGroupsByKeyword

func (g *Group) CountGroupsByKeyword(keyword string) (count int64, err error)

根据关键字获取项目组总数

func (*Group) Delete

func (g *Group) Delete(groupId string) (err error)

删除项目组

func (*Group) GetGroupByGroupId

func (g *Group) GetGroupByGroupId(groupId string) (groups map[string]string, err error)

根据 group_id 获取项目组

func (*Group) GetGroupByName

func (g *Group) GetGroupByName(name string) (group map[string]string, err error)

根据 name 获取项目组

func (*Group) GetGroups

func (g *Group) GetGroups() (groups []map[string]string, err error)

获取所有的项目组

func (*Group) GetGroupsByGroupIds

func (g *Group) GetGroupsByGroupIds(groupIds []string) (groups []map[string]string, err error)

根据 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 (g *Group) GetGroupsByLimit(limit int, number int) (groups []map[string]string, err error)

分页获取项目组

func (*Group) HasGroupName

func (g *Group) HasGroupName(name string) (has bool, err error)

项目组名称是否存在

func (*Group) HasSameGroupName

func (g *Group) HasSameGroupName(groupId, name string) (has bool, err error)

项目组名称是否存在

func (*Group) Insert

func (g *Group) Insert(group map[string]interface{}) (id int64, err error)

插入项目组

func (*Group) Update

func (g *Group) Update(groupId string, group map[string]interface{}) (id int64, err error)

修改项目组

type Log

type Log struct {
}

func (*Log) CountLogs

func (l *Log) CountLogs() (count int64, err error)

获取日志总数

func (*Log) CountLogsByKeyword

func (l *Log) CountLogsByKeyword(level, message, username string) (count int64, err error)

根据关键字获取日志总数

func (*Log) GetLogByLogId

func (l *Log) GetLogByLogId(logId string) (log map[string]string, err error)

根据 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

func (l *Log) GetLogsByLimit(limit int, number int) (logs []map[string]string, err error)

分页获取日志

func (*Log) Insert

func (l *Log) Insert(log map[string]interface{}) (id int64, err error)

插入

type Node

type Node struct {
}

func (*Node) CountNodes

func (node *Node) CountNodes() (count int64, err error)

节点总数

func (*Node) CountNodesByKeywords

func (node *Node) CountNodesByKeywords(keywords map[string]string) (count int64, err error)

根据关键字获取节点总数

func (*Node) GetNodeByNodeId

func (node *Node) GetNodeByNodeId(nodeId string) (nodes map[string]string, err error)

通过nodeId获取节点数据

func (*Node) GetNodeByNodeIds

func (node *Node) GetNodeByNodeIds(nodeIds []string) (nodes []map[string]string, err error)

通过多个 node_id 获取节点数据

func (*Node) GetNodeByNotNodeIds

func (node *Node) GetNodeByNotNodeIds(nodeIds []string) (nodes []map[string]string, err error)

除 node_ids 的节点数据

func (*Node) GetNodes

func (node *Node) GetNodes() (nodes []map[string]string, err error)

获取所有的节点

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 *Node) GetNodesByLimit(limit int, number int) (nodes []map[string]string, err error)

分页获取节点

func (*Node) HasNodeByIpAndPort

func (node *Node) HasNodeByIpAndPort(nodeId, ip string, port int) (has bool, err error)

是否存在节点

func (*Node) Insert

func (node *Node) Insert(nodeValue map[string]interface{}) (id int64, err error)

插入节点

func (*Node) Update

func (node *Node) Update(nodeId string, nodeValue map[string]interface{}) (id int64, err error)

修改节点

type NodeNodes

type NodeNodes struct {
}

func (*NodeNodes) DeleteByNodeIdAndNodesId

func (p *NodeNodes) DeleteByNodeIdAndNodesId(nodeId string, nodesId string) (err error)

根据 node_id 和 nodes_id 删除关系

func (*NodeNodes) DeleteNodeNodesByNodeId

func (p *NodeNodes) DeleteNodeNodesByNodeId(nodeId string) (err error)

根据 node_id 删除关系

func (*NodeNodes) DeleteNodeNodesByNodeNodesId

func (p *NodeNodes) DeleteNodeNodesByNodeNodesId(nodeNodesId string) (err error)

根据 node_nodes_id 删除关系

func (*NodeNodes) GetNodeNodes

func (p *NodeNodes) GetNodeNodes() (nodeNodes []map[string]string, err error)

所有的节点节点组关系

func (*NodeNodes) GetNodeNodesByNodeId

func (p *NodeNodes) GetNodeNodesByNodeId(nodeId string) (nodeNodes []map[string]string, err error)

根据 node_id 获取节点节点组关系

func (*NodeNodes) GetNodeNodesByNodeIds added in v0.8.3

func (p *NodeNodes) GetNodeNodesByNodeIds(nodeIds []string) (nodeNodes []map[string]string, err error)

根据多个 node_id 获取节点节点组关系

func (*NodeNodes) GetNodeNodesByNodesId

func (p *NodeNodes) GetNodeNodesByNodesId(nodesId string) (nodeNodes []map[string]string, err error)

根据 nodes_id 获取节点节点组关系

func (*NodeNodes) InsertBatch

func (n *NodeNodes) InsertBatch(insertValues []map[string]interface{}) (id int64, err error)

批量插入

type Nodes

type Nodes struct {
}

func (*Nodes) CountNodeGroups

func (nodes *Nodes) CountNodeGroups() (count int64, err error)

节点组总数

func (*Nodes) CountNodeGroupsByKeyword

func (nodes *Nodes) CountNodeGroupsByKeyword(keyword string) (count int64, err error)

根据关键字获取节点组总数

func (*Nodes) Delete

func (p *Nodes) Delete(nodesId string) (err error)

删除节点组

func (*Nodes) GetNodeGroupByNodesId

func (p *Nodes) GetNodeGroupByNodesId(nodesId string) (nodes map[string]string, err error)

根据 nodes_id 获取节点组

func (*Nodes) GetNodeGroups

func (p *Nodes) GetNodeGroups() (nodes []map[string]string, err error)

获取所有的节点组

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

func (p *Nodes) GetNodeGroupsByNodesIds(nodesIds []string) (nodes []map[string]string, err error)

根据多个 nodes_id 获取节点组

func (*Nodes) GetNodesByName

func (p *Nodes) GetNodesByName(name string) (nodes map[string]string, err error)

根据 name 获取节点组

func (*Nodes) HasNodesName

func (p *Nodes) HasNodesName(name string) (has bool, err error)

节点组名称是否存在

func (*Nodes) HasSameNodesName

func (p *Nodes) HasSameNodesName(nodesId, name string) (has bool, err error)

节点组名称是否存在

func (*Nodes) Insert

func (p *Nodes) Insert(nodes map[string]interface{}) (id int64, err error)

插入节点组

func (*Nodes) Update

func (p *Nodes) Update(nodesId string, nodes map[string]interface{}) (id int64, err error)

修改节点组

type Notice

type Notice struct {
}

func (*Notice) CountNotices

func (notice *Notice) CountNotices() (count int64, err error)

获取公告总数

func (*Notice) CountNoticesByKeyword

func (notice *Notice) CountNoticesByKeyword(keyword string) (count int64, err error)

根据关键字获取公告总数

func (*Notice) Delete

func (p *Notice) Delete(noticeId string) (err error)

删除

func (*Notice) GetNoticeByNoticeId

func (p *Notice) GetNoticeByNoticeId(noticeId string) (notice map[string]string, err error)

根据 notice_id 获取公告

func (*Notice) GetNoticeByTitle

func (p *Notice) GetNoticeByTitle(title string) (notice map[string]string, err error)

根据公告标题查找公告

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)

分页获取公告

func (*Notice) Insert

func (p *Notice) Insert(notice map[string]interface{}) (id int64, err error)

插入

func (*Notice) Update

func (p *Notice) Update(noticeId string, notice map[string]interface{}) (id int64, err error)

修改

type Project

type Project struct {
}

func (*Project) CountGroupByProjectIds

func (p *Project) CountGroupByProjectIds(projectIds []string) (total int64, err error)

根据 project_ids 获取项目组数量

func (*Project) CountProjects

func (project *Project) CountProjects() (count int64, err error)

项目总数

func (*Project) CountProjectsByKeywords

func (project *Project) CountProjectsByKeywords(keywords map[string]string) (count int64, err error)

根据关键字获取项目总数

func (*Project) Delete

func (p *Project) Delete(projectId string) (err error)

删除项目

func (*Project) GetGroupIdsByProjectIds

func (p *Project) GetGroupIdsByProjectIds(projectIds []string) (groupIds []string, err error)

根据 project_ids 获取 groupIds

func (*Project) GetProjectByName

func (p *Project) GetProjectByName(name string) (project map[string]string, err error)

根据 name 获取项目

func (*Project) GetProjectByProjectId

func (p *Project) GetProjectByProjectId(projectId string) (project map[string]string, err error)

根据 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 *Project) GetProjects() (projects []map[string]string, err error)

获取所有的项目

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 (p *Project) HasProjectName(name string) (has bool, err error)

项目名称是否存在

func (*Project) HasSameProjectName

func (p *Project) HasSameProjectName(projectId, name string) (has bool, err error)

项目名称是否存在

func (*Project) Insert

func (p *Project) Insert(project map[string]interface{}) (id int64, err error)

插入项目

func (*Project) Update

func (p *Project) Update(projectId string, project map[string]interface{}) (id int64, err error)

修改项目

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) CountTask

func (l *Task) CountTask() (count int64, err error)

获取task的数量

func (*Task) CountTaskAndUserByCreateTime

func (l *Task) CountTaskAndUserByCreateTime(startTime int64, endTime int64) (total int64, userTotal int64, err error)

根据创建时间获取 task 数量

func (*Task) CountTaskByProjectId

func (l *Task) CountTaskByProjectId(projectId string) (count int64, err error)

func (*Task) CountTaskByProjectIdAndUserId

func (l *Task) CountTaskByProjectIdAndUserId(projectId, userId string) (count int64, err error)

func (*Task) CountTaskByUserIdsAndProjectIds

func (l *Task) CountTaskByUserIdsAndProjectIds(userName, projectName string, userIds, projectIds []string) (count int64, err error)

通过 user_id 和 project_id 获取task的数量

func (*Task) GetAllTask

func (l *Task) GetAllTask() (tasks []map[string]string, err error)

func (*Task) GetProjectIdsOrderByCountProjectLimit

func (t *Task) GetProjectIdsOrderByCountProjectLimit(limit int) (tasks []map[string]string, err error)

func (*Task) GetTaskByProjectId

func (l *Task) GetTaskByProjectId(projectId string, limit, number int) (tasks []map[string]string, err error)

func (*Task) GetTaskByProjectIdAndUserId

func (l *Task) GetTaskByProjectIdAndUserId(projectId, userId string, limit, number int) (tasks []map[string]string, err error)

func (*Task) GetTaskByProjectIdNoLimit

func (l *Task) GetTaskByProjectIdNoLimit(projectId string) (tasks []map[string]string, err error)

func (*Task) GetTaskByProjectIdsAndTaskIds

func (l *Task) GetTaskByProjectIdsAndTaskIds(projectIds, taskIds []string) (task []map[string]string, err error)

通过project_id和task_id查找task

func (*Task) GetTaskByTaskId

func (t *Task) GetTaskByTaskId(taskId string) (tasks map[string]string, err error)

根据 task_id 获取任务

func (*Task) GetTaskByTaskIds

func (t *Task) GetTaskByTaskIds(taskIds []string) (tasks []map[string]string, err error)

根据 task_ids 获取任务

func (*Task) GetTasksByLimit

func (l *Task) GetTasksByLimit(limit, number int) (tasks []map[string]string, err error)

func (*Task) GetTasksByUserId

func (t *Task) GetTasksByUserId(userId string) (tasks []map[string]string, err error)

根据 user_id 获取任务

func (*Task) GetTasksByUserIdsAndProjectIdsAndLimit

func (l *Task) GetTasksByUserIdsAndProjectIdsAndLimit(userName, projectName string, userIds, projectIds []string, limit, number int) (tasks []map[string]string, err error)

func (*Task) Insert

func (l *Task) Insert(task map[string]interface{}) (id int64, err error)

插入一条任务

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 (t *TaskLog) CountTaskLogByTaskIdsAndIsSuccess(taskIds []string, isSuccess int) (total int64, err error)

func (*TaskLog) DeleteByNodeId added in v0.8.3

func (l *TaskLog) DeleteByNodeId(nodeId string) (err error)

根据 node_id 删除关系

func (*TaskLog) GetAllTaskLog

func (t *TaskLog) GetAllTaskLog() (taskLogs []map[string]string, err error)

获取全部的 task_log

func (*TaskLog) GetExcutingTaskIdByTaskLog

func (l *TaskLog) GetExcutingTaskIdByTaskLog() (taskIds []string, err error)

查找未执行完的日志

func (*TaskLog) GetFailedTaskLogByTaskIds

func (t *TaskLog) GetFailedTaskLogByTaskIds(taskIds []string) (tasLogs []map[string]string, err error)

获取失败的 task_log

func (*TaskLog) GetTaskLogByStatus

func (t *TaskLog) GetTaskLogByStatus(status int) (tasLogs []map[string]string, err error)

根据状态获取任务日志

func (*TaskLog) GetTaskLogBySuccess

func (t *TaskLog) GetTaskLogBySuccess(isSuccess int) (tasLogs []map[string]string, err error)

根据 is_success 获取任务日志

func (*TaskLog) GetTaskLogByTaskId

func (t *TaskLog) GetTaskLogByTaskId(taskId string) (tasLogs []map[string]string, err error)

根据 task_id 获取任务日志

func (*TaskLog) GetTaskLogByTaskIds

func (t *TaskLog) GetTaskLogByTaskIds(taskIds []string) (tasLogs []map[string]string, err error)

根据多个 task_id 获取任务日志

func (*TaskLog) GetTaskLogByTaskLogId

func (t *TaskLog) GetTaskLogByTaskLogId(taskLogId string) (tasLogs map[string]string, err error)

根据 task_log_id 获取任务日志

func (*TaskLog) GetTaskLogsByTaskLogIds

func (t *TaskLog) GetTaskLogsByTaskLogIds(taskLogIds []string) (taskLogs []map[string]string, err error)

根据 task_log_ids 获取任务日志

func (*TaskLog) Insert

func (l *TaskLog) Insert(taskLog map[string]interface{}) (id int64, err error)

插入一条任务日志

func (*TaskLog) InsertBatch

func (l *TaskLog) InsertBatch(taskLogs []map[string]interface{}) (err error)

插入多条任务日志

func (*TaskLog) Update

func (t *TaskLog) Update(taskLogId string, taskLogValue map[string]interface{}) (id int64, err error)

修改task_log

type User

type User struct {
}

func (*User) ChangePassword

func (p *User) ChangePassword(userId, newpassword, oldpassword string) (err error)

修改密码

func (*User) CountUsers

func (user *User) CountUsers() (count int64, err error)

获取用户总数

func (*User) CountUsersByKeyword

func (user *User) CountUsersByKeyword(keyword string) (count int64, err error)

根据关键字获取用户总数

func (*User) Delete

func (p *User) Delete(userId string) (err error)

删除

func (*User) EncodePassword

func (p *User) EncodePassword(password string) (passwordHash string)

加密password

func (*User) GetUserByLikeName

func (p *User) GetUserByLikeName(username string) (user []map[string]string, err error)

根据用户名模糊查找用户

func (*User) GetUserByName

func (p *User) GetUserByName(username, appAuthID string) (user map[string]string, err error)

根据用户名查找用户

func (*User) GetUserByUserId

func (p *User) GetUserByUserId(userId string) (user map[string]string, err error)

根据 user_id 获取用户

func (*User) GetUserByUserIds

func (p *User) GetUserByUserIds(userIds []string) (users []map[string]string, err error)

根据 user_ids 获取用户

func (*User) GetUserByUserIdsAndNoLimit added in v0.8.3

func (p *User) GetUserByUserIdsAndNoLimit(userIds []string) (users []map[string]string, err error)

func (*User) GetUsersByKeywordAndLimit

func (user *User) GetUsersByKeywordAndLimit(keyword string, limit int, number int) (users []map[string]string, err error)

根据关键字分页获取用户

func (*User) GetUsersByLimit

func (user *User) GetUsersByLimit(limit int, number int) (users []map[string]string, err error)

分页获取用户

func (*User) HasSameUsername

func (p *User) HasSameUsername(userId, username string) (has bool, err error)

用户名是否存在

func (*User) HasUsername

func (p *User) HasUsername(username string) (has bool, err error)

用户名是否存在

func (*User) Insert

func (p *User) Insert(user map[string]interface{}) (id int64, err error)

插入

func (*User) Review

func (p *User) Review(userId string) (err error)

恢复

func (*User) Update

func (p *User) Update(userId string, user map[string]interface{}) (id int64, err error)

修改

func (*User) UpdateUserByUsername

func (p *User) UpdateUserByUsername(user map[string]interface{}) (affect int64, err error)

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)

批量插入

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL