Documentation
¶
Index ¶
- Constants
- Variables
- func CreateDB(db *sql.DB, name string) error
- func ImportSQL(db *sql.DB, sqlPath string) error
- func Init()
- func Update(targetVerStr string) error
- func UserDB(db *sql.DB, name string) error
- type Chart
- type Charts
- type Cron
- type CronLog
- type CronLogs
- type Crons
- type Crontab
- type Crontabs
- type LoginLog
- type LoginLogs
- type Monitor
- func (m Monitor) AddRow() (int64, error)
- func (m Monitor) DeleteRow() error
- func (m Monitor) EditRow() error
- func (m Monitor) GetAllByState() (Monitors, error)
- func (m Monitor) GetData() (Monitor, error)
- func (m Monitor) GetList() (Monitors, error)
- func (m Monitor) Notify(errMsg string) (string, error)
- func (m Monitor) ToggleState() error
- func (m Monitor) TurnOff(errorContent string) error
- type Monitors
- type Namespace
- type NamespaceUser
- func (nu NamespaceUser) AddAdminByNamespaceID() error
- func (nu NamespaceUser) AddAdminByUserID() error
- func (nu NamespaceUser) DeleteByUserID() error
- func (nu NamespaceUser) DeleteRow() error
- func (nu NamespaceUser) GetAllUserByNamespaceID() (NamespaceUsers, error)
- func (nu NamespaceUser) GetBindUserListByNamespaceID() (NamespaceUsers, error)
- func (nu NamespaceUser) GetDataByRoleID() (NamespaceUser, error)
- func (nu NamespaceUser) GetDataByUserNamespace() (NamespaceUser, error)
- func (nu NamespaceUser) GetUserNamespaceList() (NamespaceUsers, error)
- type NamespaceUsers
- type Namespaces
- type OperationLog
- type OperationLogs
- type Pagination
- type Permission
- type Permissions
- type Project
- func (p Project) AddRow() (int64, error)
- func (p Project) DeployFail() error
- func (p Project) DeploySuccess() error
- func (p Project) EditRow() error
- func (p Project) GetData() (Project, error)
- func (p Project) GetDeployList() (Projects, error)
- func (p Project) GetList() (Projects, error)
- func (p Project) GetUserProjectData() (Project, error)
- func (p Project) Publish() error
- func (p Project) RemoveRow() error
- func (p Project) ResetState() error
- func (p Project) SetAutoDeploy() error
- type ProjectFile
- func (pf ProjectFile) AddRow() (int64, error)
- func (pf ProjectFile) DeleteRow() error
- func (pf ProjectFile) EditRow() error
- func (pf ProjectFile) GetData() (ProjectFile, error)
- func (pf ProjectFile) GetListByProjectID() (ProjectFiles, error)
- func (pf ProjectFile) GetTotalByProjectID() (int64, error)
- type ProjectFiles
- type ProjectProcess
- type ProjectProcesses
- type ProjectReview
- type ProjectReviews
- type ProjectServer
- type ProjectServers
- type ProjectTask
- type ProjectTasks
- type ProjectUser
- func (pu ProjectUser) AddAdminByUserID() error
- func (pu ProjectUser) AddNamespaceProjectInUserID(namespaceID int64, userIDs []int64) error
- func (pu ProjectUser) DeleteByProjectID() error
- func (pu ProjectUser) DeleteByUserID() error
- func (pu ProjectUser) DeleteRow() error
- func (pu ProjectUser) GetBindUserListByProjectID() (ProjectUsers, error)
- type ProjectUsers
- type Projects
- type PublishTrace
- func (pt PublishTrace) AddRow() (int64, error)
- func (pt PublishTrace) EditUpdateTimeByToken() error
- func (pt PublishTrace) GetDetail() (string, error)
- func (pt PublishTrace) GetList(page, limit uint64) (PublishTraces, error)
- func (pt PublishTrace) GetListByToken() (PublishTraces, error)
- func (pt PublishTrace) GetPreview(branch string, commit string, filename string, commitDate []string, ...) (PublishTraces, Pagination, error)
- func (pt PublishTrace) GetTotal() (int64, error)
- type PublishTraces
- type Role
- type RolePermission
- type RolePermissions
- type Roles
- type Server
- type ServerAgentLog
- type ServerAgentLogs
- type ServerMonitor
- func (sm ServerMonitor) AddRow() (int64, error)
- func (sm ServerMonitor) DeleteRow() error
- func (sm ServerMonitor) EditRow() error
- func (sm ServerMonitor) GetAll() (ServerMonitors, error)
- func (sm ServerMonitor) GetAllModBy(number int, time string) (ServerMonitors, error)
- func (sm ServerMonitor) Notify(server Server, cycleValue string) (string, error)
- type ServerMonitors
- type ServerProcess
- type ServerProcessItem
- type ServerProcessItems
- type ServerProcesses
- type Servers
- type SftpLog
- type SftpLogs
- type SystemConfig
- type TerminalLog
- type TerminalLogs
- type User
- func (u User) AddRow() (int64, error)
- func (u User) CreateToken() (string, error)
- func (u User) EditRow() error
- func (u User) GetAll() (Users, error)
- func (u User) GetData() (User, error)
- func (u User) GetDataByAccount() (User, error)
- func (u User) GetList() (Users, error)
- func (u User) GetTotal() (int64, error)
- func (u User) RemoveRow() error
- func (u User) UpdateLastLoginTime() error
- func (u User) UpdatePassword() error
- func (u User) Validate(inputPassword string) error
- type Users
Constants ¶
const ( Fail = iota Success )
state type
const ( Disable = iota Enable )
state type
const ( PENDING = iota APPROVE DENY )
review state type
const ( ProjectNotDeploy = 0 ProjectDeploying = 1 ProjectSuccess = 2 ProjectFail = 3 )
Project deploy state
const ( ProjectManualDeploy = 0 ProjectWebhookDeploy = 1 )
Project deploy type
const ( RepoGit = "git" RepoSVN = "svn" RepoFTP = "ftp" RepoSFTP = "sftp" )
const ( NotifyWeiXin = 1 NotifyDingTalk = 2 NotifyFeiShu = 3 NotifyCustom = 255 )
Project notify type
const ( NotRun = iota Run )
state type
const ( QUEUE = 0 BeforePull = 1 Pull = 2 AfterPull = 3 BeforeDeploy = 4 Deploy = 5 AfterDeploy = 6 )
publish trace state
const ( SftpLogTypeDownload = "DOWNLOAD" SftpLogTypeUpload = "UPLOAD" SftpLogTypeRead = "READ" SftpLogTypePreview = "PREVIEW" SftpLogTypeDelete = "DELETE" )
const ( SuperManager = 1 GeneralUser = 0 )
user role
Variables ¶
var DB *sql.DB
DB init when the program start
Functions ¶
Types ¶
type Chart ¶
type Chart struct { Hour int `json:"hour"` CommitNumber int `json:"commitNumber"` DeployNumber int `json:"deployNumber"` FailNumber int `json:"failNumber"` BackNumber int `json:"backNumber"` }
Chart struct
type Cron ¶ added in v1.4.0
type Cron struct { ID int64 `json:"id"` ServerID int64 `json:"serverId"` Expression string `json:"expression"` Command string `json:"command"` SingleMode uint8 `json:"singleMode"` LogLevel uint8 `json:"logLevel"` Description string `json:"description"` State uint8 `json:"state"` Creator string `json:"creator"` Editor string `json:"editor"` InsertTime string `json:"insertTime,omitempty"` UpdateTime string `json:"updateTime,omitempty"` }
type CronLog ¶ added in v1.4.0
type CronLog struct { ID int64 `json:"id"` CronID int64 `json:"cronId"` ServerID int64 `json:"serverId"` ExecCode int `json:"execCode"` Message string `json:"message"` ReportTime string `json:"reportTime"` InsertTime string `json:"insertTime"` }
CronLog -
type Crontab ¶
type Crontab struct { ID int64 `json:"id"` ServerID int64 `json:"serverId"` Expression string `json:"expression"` Description string `json:"description"` Save uint8 `json:"save"` State uint8 `json:"state"` InsertTime string `json:"insertTime,omitempty"` UpdateTime string `json:"updateTime,omitempty"` }
type LoginLog ¶ added in v1.4.6
type LoginLog struct { ID int64 `json:"id"` Account string `json:"account"` RemoteAddr string `json:"remoteAddr"` UserAgent string `json:"userAgent"` Referer string `json:"referer"` Reason string `json:"reason"` LoginTime string `json:"loginTime"` }
type Monitor ¶
type Monitor struct { ID int64 `json:"id"` NamespaceID int64 `json:"namespaceId"` Name string `json:"name"` Type int `json:"type"` Target string `json:"target"` Second int `json:"second"` Times uint16 `json:"times"` SilentCycle int `json:"silentCycle"` NotifyType uint8 `json:"notifyType"` NotifyTarget string `json:"notifyTarget"` Description string `json:"description"` ErrorContent string `json:"errorContent"` State uint8 `json:"state"` InsertTime string `json:"insertTime"` UpdateTime string `json:"updateTime"` }
func (Monitor) GetAllByState ¶
func (Monitor) ToggleState ¶
type Namespace ¶
type Namespace struct { ID int64 `json:"id"` Name string `json:"name"` UserID int64 `json:"-"` RoleID int64 `json:"role_id"` PermissionIDs []int64 `json:"permissionIds"` InsertTime string `json:"insertTime,omitempty"` UpdateTime string `json:"updateTime,omitempty"` }
func (Namespace) GetAllByUserID ¶
func (ns Namespace) GetAllByUserID() (Namespaces, error)
func (Namespace) GetList ¶ added in v1.6.0
func (ns Namespace) GetList() (Namespaces, error)
type NamespaceUser ¶
type NamespaceUser struct { ID int64 `json:"id,omitempty"` NamespaceID int64 `json:"namespaceId,omitempty"` NamespaceName string `json:"namespaceName,omitempty"` UserID int64 `json:"userId,omitempty"` UserName string `json:"userName,omitempty"` RoleID int64 `json:"roleId,omitempty"` RoleName string `json:"roleName,omitempty"` PermissionIDs map[int64]struct{} `json:"permissionIds,omitempty"` InsertTime string `json:"insertTime,omitempty"` UpdateTime string `json:"updateTime,omitempty"` }
NamespaceUser -
func (NamespaceUser) AddAdminByNamespaceID ¶
func (nu NamespaceUser) AddAdminByNamespaceID() error
func (NamespaceUser) AddAdminByUserID ¶
func (nu NamespaceUser) AddAdminByUserID() error
func (NamespaceUser) DeleteByUserID ¶
func (nu NamespaceUser) DeleteByUserID() error
func (NamespaceUser) DeleteRow ¶
func (nu NamespaceUser) DeleteRow() error
func (NamespaceUser) GetAllUserByNamespaceID ¶
func (nu NamespaceUser) GetAllUserByNamespaceID() (NamespaceUsers, error)
func (NamespaceUser) GetBindUserListByNamespaceID ¶
func (nu NamespaceUser) GetBindUserListByNamespaceID() (NamespaceUsers, error)
func (NamespaceUser) GetDataByRoleID ¶ added in v1.6.0
func (nu NamespaceUser) GetDataByRoleID() (NamespaceUser, error)
func (NamespaceUser) GetDataByUserNamespace ¶ added in v1.6.0
func (nu NamespaceUser) GetDataByUserNamespace() (NamespaceUser, error)
func (NamespaceUser) GetUserNamespaceList ¶ added in v1.4.6
func (nu NamespaceUser) GetUserNamespaceList() (NamespaceUsers, error)
type NamespaceUsers ¶
type NamespaceUsers []NamespaceUser
NamespaceUsers -
func (NamespaceUsers) AddMany ¶
func (nu NamespaceUsers) AddMany() error
type Namespaces ¶
type Namespaces []Namespace
type OperationLog ¶ added in v1.11.0
type OperationLog struct { ID int64 `json:"id"` NamespaceID int64 `json:"namespaceID"` UserID int64 `json:"userID"` Username string `json:"username"` Router string `json:"router"` API string `json:"api"` RequestTime string `json:"requestTime"` RequestData string `json:"requestData"` ResponseTime string `json:"responseTime"` ResponseData string `json:"responseData"` }
func (OperationLog) AddRow ¶ added in v1.11.0
func (ol OperationLog) AddRow() error
func (OperationLog) GetList ¶ added in v1.11.0
func (ol OperationLog) GetList(page, limit uint64) (OperationLogs, error)
func (OperationLog) GetTotal ¶ added in v1.11.0
func (ol OperationLog) GetTotal() (int64, error)
type OperationLogs ¶ added in v1.11.0
type OperationLogs []OperationLog
type Pagination ¶
type Pagination struct { Page uint64 `json:"page" schema:"page"` Rows uint64 `json:"rows" schema:"rows"` Total uint64 `json:"total" schema:"total"` }
Pagination struct
func PaginationFrom ¶
func PaginationFrom(param url.Values) (Pagination, error)
PaginationFrom param return pagination struct
type Permission ¶ added in v1.6.0
type Permission struct { ID int64 `json:"id"` PID int64 `json:"pid"` Name string `json:"name"` Sort int `json:"sort"` Description string `json:"description"` InsertTime string `json:"insertTime,omitempty"` UpdateTime string `json:"updateTime,omitempty"` }
func (Permission) GetIDs ¶ added in v1.6.0
func (p Permission) GetIDs() (map[int64]struct{}, error)
func (Permission) GetList ¶ added in v1.6.0
func (p Permission) GetList() (Permissions, error)
type Permissions ¶ added in v1.6.0
type Permissions []Permission
type Project ¶
type Project struct { ID int64 `json:"id"` NamespaceID int64 `json:"namespaceId"` UserID int64 `json:"userId,omitempty"` RepoType string `json:"repoType"` Name string `json:"name"` URL string `json:"url"` Path string `json:"path"` Environment uint8 `json:"environment"` Branch string `json:"branch"` SymlinkPath string `json:"symlinkPath"` SymlinkBackupNumber uint8 `json:"symlinkBackupNumber"` Review uint8 `json:"review"` ReviewURL string `json:"reviewURL"` AfterPullScriptMode string `json:"afterPullScriptMode"` AfterPullScript string `json:"afterPullScript"` AfterDeployScriptMode string `json:"afterDeployScriptMode"` AfterDeployScript string `json:"afterDeployScript"` TransferType string `json:"transferType"` TransferOption string `json:"transferOption"` DeployServerMode string `json:"deployServerMode"` AutoDeploy uint8 `json:"autoDeploy"` PublisherID int64 `json:"publisherId"` PublisherName string `json:"publisherName"` PublishExt string `json:"publishExt"` DeployState uint8 `json:"deployState"` LastPublishToken string `json:"lastPublishToken"` NotifyType uint8 `json:"notifyType"` NotifyTarget string `json:"notifyTarget"` State uint8 `json:"state"` InsertTime string `json:"insertTime"` UpdateTime string `json:"updateTime"` }
func (Project) DeploySuccess ¶
DeploySuccess set deploy_state to success
func (Project) GetDeployList ¶ added in v1.6.0
func (Project) GetUserProjectData ¶
func (Project) ResetState ¶ added in v1.0.7
ResetState set deploy_state to NotDeploy
func (Project) SetAutoDeploy ¶ added in v1.0.2
type ProjectFile ¶ added in v1.1.3
type ProjectFile struct { ID int64 `json:"id"` ProjectID int64 `json:"projectId"` Filename string `json:"filename"` InsertTime string `json:"insertTime"` UpdateTime string `json:"updateTime"` }
ProjectFile -
func (ProjectFile) AddRow ¶ added in v1.1.3
func (pf ProjectFile) AddRow() (int64, error)
AddRow return LastInsertId
func (ProjectFile) GetData ¶ added in v1.1.3
func (pf ProjectFile) GetData() (ProjectFile, error)
GetData -
func (ProjectFile) GetListByProjectID ¶ added in v1.1.3
func (pf ProjectFile) GetListByProjectID() (ProjectFiles, error)
GetListByProjectID -
func (ProjectFile) GetTotalByProjectID ¶ added in v1.1.3
func (pf ProjectFile) GetTotalByProjectID() (int64, error)
GetTotalByProjectID -
type ProjectProcess ¶ added in v1.4.4
type ProjectProcess struct { ID int64 `json:"id"` ProjectID int64 `json:"projectId"` Name string `json:"name"` Start string `json:"start"` Stop string `json:"stop"` Status string `json:"status"` Restart string `json:"restart"` InsertTime string `json:"insertTime,omitempty"` UpdateTime string `json:"updateTime,omitempty"` }
func (ProjectProcess) AddRow ¶ added in v1.4.4
func (pp ProjectProcess) AddRow() (int64, error)
func (ProjectProcess) DeleteRow ¶ added in v1.4.4
func (pp ProjectProcess) DeleteRow() error
func (ProjectProcess) EditRow ¶ added in v1.4.4
func (pp ProjectProcess) EditRow() error
func (ProjectProcess) GetData ¶ added in v1.4.4
func (pp ProjectProcess) GetData() (ProjectProcess, error)
GetData -
func (ProjectProcess) GetListByProjectID ¶ added in v1.4.4
func (pp ProjectProcess) GetListByProjectID(page, limit uint64) (ProjectProcesses, error)
type ProjectProcesses ¶ added in v1.4.4
type ProjectProcesses []ProjectProcess
type ProjectReview ¶ added in v1.0.4
type ProjectReview struct { ID int64 `json:"id"` ProjectID int64 `json:"projectId"` CommitID string `json:"commitId"` Branch string `json:"branch"` ReviewURL string `json:"reviewURL"` State uint8 `json:"state"` Creator string `json:"creator"` CreatorID int64 `json:"creatorId"` Editor string `json:"editor"` EditorID int64 `json:"editorId"` InsertTime string `json:"insertTime"` UpdateTime string `json:"updateTime"` }
ProjectReview -
func (ProjectReview) AddRow ¶ added in v1.0.4
func (pr ProjectReview) AddRow() (int64, error)
AddRow -
func (ProjectReview) GetData ¶ added in v1.0.4
func (pr ProjectReview) GetData() (ProjectReview, error)
GetData -
func (ProjectReview) GetListByProjectID ¶ added in v1.0.4
func (pr ProjectReview) GetListByProjectID(pagination Pagination) (ProjectReviews, Pagination, error)
GetListByProjectID -
type ProjectServer ¶
type ProjectServer struct { ID int64 `json:"id"` ProjectID int64 `json:"projectId"` ServerID int64 `json:"serverId"` ServerName string `json:"serverName"` ServerOS string `json:"serverOS"` ServerIP string `json:"serverIP"` ServerPort int `json:"serverPort"` ServerOwner string `json:"serverOwner"` ServerPassword string `json:"serverPassword"` ServerPath string `json:"serverPath"` ServerJumpIP string `json:"serverJumpIP"` ServerJumpPort int `json:"serverJumpPort"` ServerJumpOwner string `json:"serverJumpOwner"` ServerJumpPassword string `json:"serverJumpPassword"` ServerJumpPath string `json:"serverJumpPath"` ServerDescription string `json:"serverDescription"` InsertTime string `json:"insertTime"` UpdateTime string `json:"updateTime"` }
func (ProjectServer) DeleteByProjectID ¶ added in v1.5.0
func (ps ProjectServer) DeleteByProjectID() error
func (ProjectServer) DeleteRow ¶
func (ps ProjectServer) DeleteRow() error
func (ProjectServer) GetBindServerListByProjectID ¶
func (ps ProjectServer) GetBindServerListByProjectID() (ProjectServers, error)
func (ProjectServer) ToSSHConfig ¶ added in v1.7.1
func (ps ProjectServer) ToSSHConfig() utils.SSHConfig
func (ProjectServer) ToSSHOption ¶ added in v1.7.1
func (ps ProjectServer) ToSSHOption() string
type ProjectServers ¶
type ProjectServers []ProjectServer
func (ProjectServers) AddMany ¶
func (ps ProjectServers) AddMany() error
type ProjectTask ¶
type ProjectTask struct { ID int64 `json:"id"` ProjectID int64 `json:"projectId"` Branch string `json:"branch"` CommitID string `json:"commit"` Date string `json:"date"` State uint8 `json:"state"` IsRun uint8 `json:"isRun"` Creator string `json:"creator"` CreatorID int64 `json:"creatorId"` Editor string `json:"editor"` EditorID int64 `json:"editorId"` InsertTime string `json:"insertTime"` UpdateTime string `json:"updateTime"` }
ProjectTask -
func (ProjectTask) GetListByProjectID ¶
func (pt ProjectTask) GetListByProjectID(pagination Pagination) (ProjectTasks, Pagination, error)
GetListByProjectID -
func (ProjectTask) GetNotRunListLTDate ¶
func (pt ProjectTask) GetNotRunListLTDate(date string) (ProjectTasks, error)
GetNotRunListLTDate -
type ProjectUser ¶
type ProjectUser struct { ID int64 `json:"id"` NamespaceID int64 `json:"namespaceId,omitempty"` ProjectID int64 `json:"projectId"` ProjectName string `json:"projectName"` UserID int64 `json:"userId"` UserName string `json:"userName"` InsertTime string `json:"insertTime"` UpdateTime string `json:"updateTime"` }
func (ProjectUser) AddAdminByUserID ¶
func (pu ProjectUser) AddAdminByUserID() error
AddAdminByUserID add admin to table project_user
func (ProjectUser) AddNamespaceProjectInUserID ¶
func (pu ProjectUser) AddNamespaceProjectInUserID(namespaceID int64, userIDs []int64) error
AddNamespaceProjectInUserID add all project with namespace in user id
func (ProjectUser) DeleteByProjectID ¶ added in v1.5.0
func (pu ProjectUser) DeleteByProjectID() error
func (ProjectUser) DeleteByUserID ¶
func (pu ProjectUser) DeleteByUserID() error
func (ProjectUser) DeleteRow ¶
func (pu ProjectUser) DeleteRow() error
func (ProjectUser) GetBindUserListByProjectID ¶
func (pu ProjectUser) GetBindUserListByProjectID() (ProjectUsers, error)
type ProjectUsers ¶
type ProjectUsers []ProjectUser
func (ProjectUsers) AddMany ¶
func (pu ProjectUsers) AddMany() error
type PublishTrace ¶
type PublishTrace struct { ID int64 `json:"id"` Token string `json:"token"` NamespaceID int64 `json:"namespaceId"` ProjectID int64 `json:"projectId"` ProjectName string `json:"projectName"` Detail string `json:"detail"` State int `json:"state"` PublisherID int64 `json:"publisherId"` PublisherName string `json:"publisherName"` Type int `json:"type"` Ext string `json:"ext"` InsertTime string `json:"insertTime"` UpdateTime string `json:"updateTime"` }
PublishTrace -
func (PublishTrace) AddRow ¶
func (pt PublishTrace) AddRow() (int64, error)
AddRow return LastInsertId
func (PublishTrace) EditUpdateTimeByToken ¶ added in v1.1.6
func (pt PublishTrace) EditUpdateTimeByToken() error
EditUpdateTimeByToken -
func (PublishTrace) GetDetail ¶ added in v1.1.2
func (pt PublishTrace) GetDetail() (string, error)
func (PublishTrace) GetList ¶ added in v1.4.6
func (pt PublishTrace) GetList(page, limit uint64) (PublishTraces, error)
func (PublishTrace) GetListByToken ¶
func (pt PublishTrace) GetListByToken() (PublishTraces, error)
func (PublishTrace) GetPreview ¶
func (pt PublishTrace) GetPreview( branch string, commit string, filename string, commitDate []string, deployDate []string, pagination Pagination, ) (PublishTraces, Pagination, error)
func (PublishTrace) GetTotal ¶ added in v1.4.6
func (pt PublishTrace) GetTotal() (int64, error)
type Role ¶ added in v1.6.0
type RolePermission ¶ added in v1.6.0
type RolePermission struct { ID int64 `json:"id"` RoleID int64 `json:"roleId"` PermissionID int64 `json:"permissionId"` InsertTime string `json:"insertTime,omitempty"` UpdateTime string `json:"updateTime,omitempty"` }
func (RolePermission) DeleteByRoleID ¶ added in v1.6.0
func (rp RolePermission) DeleteByRoleID() error
func (RolePermission) GetData ¶ added in v1.6.0
func (rp RolePermission) GetData() (RolePermission, error)
func (RolePermission) GetList ¶ added in v1.6.0
func (rp RolePermission) GetList() (RolePermissions, error)
type RolePermissions ¶ added in v1.6.0
type RolePermissions []RolePermission
func (RolePermissions) AddMany ¶ added in v1.6.0
func (rps RolePermissions) AddMany() error
type Server ¶
type Server struct { ID int64 `json:"id"` Name string `json:"name"` IP string `json:"ip"` Port int `json:"port"` Owner string `json:"owner"` Path string `json:"path"` Password string `json:"password"` JumpIP string `json:"jumpIP"` JumpPort int `json:"jumpPort"` JumpOwner string `json:"jumpOwner"` JumpPath string `json:"jumpPath"` JumpPassword string `json:"jumpPassword"` NamespaceID int64 `json:"namespaceId"` Description string `json:"description"` OS string `json:"os"` OSInfo string `json:"osInfo"` State int8 `json:"state"` InsertTime string `json:"insertTime"` UpdateTime string `json:"updateTime"` }
func (Server) ToSSHConfig ¶ added in v1.7.0
type ServerAgentLog ¶ added in v1.3.7
type ServerAgentLog struct { ServerID int64 `json:"serverId,omitempty"` Type int `json:"type,omitempty"` Item string `json:"item"` Value string `json:"value"` ReportTime string `json:"reportTime"` }
ServerAgentLog -
func (ServerAgentLog) AddRow ¶ added in v1.3.7
func (sal ServerAgentLog) AddRow() error
AddRow return LastInsertId
func (ServerAgentLog) GetCycleValue ¶ added in v1.3.8
func (sal ServerAgentLog) GetCycleValue(groupCycle int, formula string) (value string, err error)
GetCycleValue -
func (ServerAgentLog) GetListBetweenTime ¶ added in v1.3.7
func (sal ServerAgentLog) GetListBetweenTime(low, high string) (ServerAgentLogs, error)
GetListBetweenTime -
type ServerMonitor ¶ added in v1.3.8
type ServerMonitor struct { ID int64 `json:"id"` ServerID int64 `json:"serverId"` Item string `json:"item"` Formula string `json:"formula"` Operator string `json:"operator"` Value string `json:"value"` GroupCycle int `json:"groupCycle"` LastCycle int `json:"lastCycle"` SilentCycle int `json:"silentCycle"` StartTime string `json:"startTime"` EndTime string `json:"endTime"` NotifyType uint8 `json:"notifyType"` NotifyTarget string `json:"notifyTarget"` InsertTime string `json:"insertTime"` UpdateTime string `json:"updateTime"` }
ServerMonitor -
func (ServerMonitor) AddRow ¶ added in v1.3.8
func (sm ServerMonitor) AddRow() (int64, error)
AddRow return LastInsertId
func (ServerMonitor) DeleteRow ¶ added in v1.3.8
func (sm ServerMonitor) DeleteRow() error
DeleteRow -
func (ServerMonitor) GetAll ¶ added in v1.3.8
func (sm ServerMonitor) GetAll() (ServerMonitors, error)
GetAll -
func (ServerMonitor) GetAllModBy ¶ added in v1.3.8
func (sm ServerMonitor) GetAllModBy(number int, time string) (ServerMonitors, error)
GetAllModBy -
type ServerProcess ¶ added in v1.10.0
type ServerProcess struct { ID int64 `json:"id"` NamespaceID int64 `json:"namespaceId"` Name string `json:"name"` Items string `json:"items"` InsertTime string `json:"insertTime,omitempty"` UpdateTime string `json:"updateTime,omitempty"` }
func (ServerProcess) AddRow ¶ added in v1.10.0
func (sp ServerProcess) AddRow() (int64, error)
func (ServerProcess) DeleteRow ¶ added in v1.10.0
func (sp ServerProcess) DeleteRow() error
func (ServerProcess) EditRow ¶ added in v1.10.0
func (sp ServerProcess) EditRow() error
func (ServerProcess) GetData ¶ added in v1.10.0
func (sp ServerProcess) GetData() (ServerProcess, error)
func (ServerProcess) GetList ¶ added in v1.12.0
func (sp ServerProcess) GetList() (ServerProcesses, error)
type ServerProcessItem ¶ added in v1.12.0
type ServerProcessItems ¶ added in v1.12.0
type ServerProcessItems []ServerProcessItem
type ServerProcesses ¶ added in v1.10.0
type ServerProcesses []ServerProcess
type SftpLog ¶ added in v1.4.6
type SftpLog struct { ID int64 `json:"id"` NamespaceID int64 `json:"namespaceID"` UserID int64 `json:"userID"` Username string `json:"username"` ServerID int64 `json:"serverID"` ServerName string `json:"serverName"` RemoteAddr string `json:"remoteAddr"` UserAgent string `json:"userAgent"` Type string `json:"type"` Path string `json:"path"` Reason string `json:"reason"` InsertTime string `json:"insertTime"` UpdateTime string `json:"updateTime"` }
type SystemConfig ¶ added in v1.3.4
type SystemConfig struct { ID int64 `json:"id"` Key string `json:"key"` Value string `json:"value"` }
SystemConfig -
func (SystemConfig) EditRowByKey ¶ added in v1.3.4
func (sc SystemConfig) EditRowByKey() error
EditRowByKey -
func (SystemConfig) GetDataByKey ¶ added in v1.3.4
func (sc SystemConfig) GetDataByKey() (SystemConfig, error)
GetDataByKey -
type TerminalLog ¶ added in v1.4.6
type TerminalLog struct { ID int64 `json:"id"` NamespaceID int64 `json:"namespaceID"` UserID int64 `json:"userID"` Username string `json:"username"` ServerID int64 `json:"serverID"` ServerName string `json:"serverName"` RemoteAddr string `json:"remoteAddr"` UserAgent string `json:"userAgent"` StartTime string `json:"startTime"` EndTime string `json:"endTime"` InsertTime string `json:"insertTime"` UpdateTime string `json:"updateTime"` }
func (TerminalLog) AddRow ¶ added in v1.4.6
func (tl TerminalLog) AddRow() (int64, error)
func (TerminalLog) EditRow ¶ added in v1.4.6
func (tl TerminalLog) EditRow() error
func (TerminalLog) GetData ¶ added in v1.4.6
func (tl TerminalLog) GetData() (TerminalLog, error)
func (TerminalLog) GetList ¶ added in v1.4.6
func (tl TerminalLog) GetList(page, limit uint64) (TerminalLogs, error)
func (TerminalLog) GetTotal ¶ added in v1.4.6
func (tl TerminalLog) GetTotal() (int64, error)
type TerminalLogs ¶ added in v1.4.6
type TerminalLogs []TerminalLog
type User ¶
type User struct { ID int64 `json:"id"` Account string `json:"account"` Password string `json:"password"` Name string `json:"name"` Contact string `json:"contact"` SuperManager int64 `json:"superManager"` State uint8 `json:"state"` InsertTime string `json:"insertTime"` UpdateTime string `json:"updateTime"` LastLoginTime string `json:"lastLoginTime"` }
User -
Source Files
¶
- ChartModel.go
- CronLogModel.go
- CronModel.go
- CrontabModel.go
- LoginLogModel.go
- Model.go
- MonitorModel.go
- NamespaceModel.go
- NamespaceUserModel.go
- OperationLogModel.go
- PermissionModel.go
- ProjectFileModel.go
- ProjectModel.go
- ProjectProcessModel.go
- ProjectReviewModel.go
- ProjectServerModel.go
- ProjectTaskModel.go
- ProjectUserModel.go
- PublishTraceModel.go
- RoleModel.go
- RolePermissionModel.go
- ServerAgentLogModel.go
- ServerModel.go
- ServerMonitorModel.go
- ServerProcessModel.go
- SftpLogModel.go
- SystemConfigModel.go
- TerminalLogModel.go
- UserModel.go