Documentation ¶
Index ¶
- Constants
- func CloseDB(db *gorm.DB)
- func GetDB() *gorm.DB
- type Domain
- func (domain *Domain) Add() (success bool)
- func (domain *Domain) Count(searchMap map[string]interface{}) (count int)
- func (domain *Domain) Delete() (success bool)
- func (domain *Domain) Get() (success bool)
- func (domain *Domain) GetByDomain() (success bool)
- func (domain *Domain) Gets(searchMap map[string]interface{}, page, rowsPerPage int, orderByDate bool) (results []Domain, count int)
- func (domain *Domain) GetsForBlackListDomain(blackDomain string, workspaceId int) (results []Domain)
- func (domain *Domain) SaveOrUpdate() (success bool, isAdd bool)
- func (*Domain) TableName() string
- func (domain *Domain) Update(updateMap map[string]interface{}) (success bool)
- type DomainAttr
- func (domainAttr *DomainAttr) Add() (success bool)
- func (domainAttr *DomainAttr) Delete() (success bool)
- func (domainAttr *DomainAttr) DeleteByRelatedIDAndSource() (success bool)
- func (domainAttr *DomainAttr) GetByDomainAttr() (success bool)
- func (domainAttr *DomainAttr) GetsByRelatedId() (results []DomainAttr)
- func (domainAttr *DomainAttr) SaveOrUpdate() bool
- func (*DomainAttr) TableName() string
- func (domainAttr *DomainAttr) Update(updatedMap map[string]interface{}) (success bool)
- type DomainColorTag
- type DomainHttp
- func (d *DomainHttp) Add() (success bool)
- func (d *DomainHttp) Delete() (success bool)
- func (d *DomainHttp) GetByRelatedIdAndPortAndTag() (success bool)
- func (d *DomainHttp) GetsByRelatedId() (results []DomainHttp)
- func (d *DomainHttp) GetsByRelatedIdAndTag() (results []DomainHttp)
- func (d *DomainHttp) SaveOrUpdate() (success bool)
- func (*DomainHttp) TableName() string
- func (d *DomainHttp) Update(updateMap map[string]interface{}) (success bool)
- type DomainMemo
- func (domainMemo *DomainMemo) Add() (success bool)
- func (domainMemo *DomainMemo) DeleteByRelatedId() (success bool)
- func (domainMemo *DomainMemo) GetByRelatedId() (success bool)
- func (*DomainMemo) TableName() string
- func (domainMemo *DomainMemo) Update(updateMap map[string]interface{}) (success bool)
- type Ip
- func (ip *Ip) Add() (success bool)
- func (ip *Ip) Count(searchMap map[string]interface{}) (count int)
- func (ip *Ip) Delete() (success bool)
- func (ip *Ip) Get() (success bool)
- func (ip *Ip) GetByIp() (success bool)
- func (ip *Ip) Gets(searchMap map[string]interface{}, page, rowsPerPage int, orderByDate bool) (results []Ip, count int)
- func (ip *Ip) SaveOrUpdate() (success bool, isAdd bool)
- func (*Ip) TableName() string
- func (ip *Ip) Update(updateMap map[string]interface{}) (success bool)
- type IpAttr
- func (ipAttr *IpAttr) Add() (success bool)
- func (ipAttr *IpAttr) Delete() (success bool)
- func (ipAttr *IpAttr) Get() (success bool)
- func (ipAttr *IpAttr) Gets(searchMap map[string]interface{}, page int, rowsPerPage int) (results []IpAttr)
- func (ipAttr *IpAttr) GetsByRelatedId() (results []IpAttr)
- func (*IpAttr) TableName() string
- func (ipAttr *IpAttr) Update(updatedMap map[string]interface{}) (success bool)
- type IpColorTag
- type IpHttp
- func (i *IpHttp) Add() (success bool)
- func (i *IpHttp) Delete() (success bool)
- func (i *IpHttp) GetByRelatedIdAndTag() (success bool)
- func (i *IpHttp) GetsByRelatedId() (results []IpHttp)
- func (i *IpHttp) SaveOrUpdate() (success bool)
- func (*IpHttp) TableName() string
- func (i *IpHttp) Update(updateMap map[string]interface{}) (success bool)
- type IpMemo
- type KeyWord
- func (t *KeyWord) Add() (success bool)
- func (t *KeyWord) Delete() (success bool)
- func (t *KeyWord) Get() (success bool)
- func (t *KeyWord) Gets(searchMap map[string]interface{}, page, rowsPerPage int) (results []KeyWord, count int)
- func (*KeyWord) TableName() string
- func (t *KeyWord) Update(updateMap map[string]interface{}) (success bool)
- type Organization
- func (org *Organization) Add() (success bool)
- func (org *Organization) Count(searchMap map[string]interface{}) (count int)
- func (org *Organization) Delete() (success bool)
- func (org *Organization) Get() (success bool)
- func (org *Organization) Gets(searchMap map[string]interface{}, page int, rowsPerPage int) (results []Organization)
- func (*Organization) TableName() string
- func (org *Organization) Update(updatedMap map[string]interface{}) (success bool)
- type Port
- func (port *Port) Add() (success bool)
- func (port *Port) GetByIPPort() (success bool)
- func (port *Port) GetsByIPId() (results []Port)
- func (port *Port) SaveOrUpdate() (success bool, isNew bool)
- func (*Port) TableName() string
- func (port *Port) Update(updatedMap map[string]interface{}) (success bool)
- type PortAttr
- func (portAttr *PortAttr) Add() (success bool)
- func (portAttr *PortAttr) Delete() (success bool)
- func (portAttr *PortAttr) GetByPortAttr() (success bool)
- func (portAttr *PortAttr) GetsByRelatedId() (results []PortAttr)
- func (portAttr *PortAttr) SaveOrUpdate() (success bool)
- func (*PortAttr) TableName() string
- func (portAttr *PortAttr) Update(updateMap map[string]interface{}) (success bool)
- type RuntimeLog
- func (l *RuntimeLog) Add() (success bool)
- func (l *RuntimeLog) Count(searchMap map[string]interface{}) (count int)
- func (l *RuntimeLog) Delete() (success bool)
- func (l *RuntimeLog) DeleteLogs(searchMap map[string]interface{}) (success bool)
- func (l *RuntimeLog) Get() (success bool)
- func (l *RuntimeLog) Gets(searchMap map[string]interface{}, page, rowsPerPage int) (results []RuntimeLog, count int)
- func (l *RuntimeLog) SaveOrUpdate() (success bool, isAdd bool)
- func (*RuntimeLog) TableName() string
- type TaskCron
- func (t *TaskCron) Add() (success bool)
- func (t *TaskCron) Count(searchMap map[string]interface{}) (count int)
- func (t *TaskCron) Delete() (success bool)
- func (t *TaskCron) Get() (success bool)
- func (t *TaskCron) GetByTaskId() (success bool)
- func (t *TaskCron) Gets(searchMap map[string]interface{}, page, rowsPerPage int) (results []TaskCron, count int)
- func (t *TaskCron) SaveOrUpdate() (success bool)
- func (*TaskCron) TableName() string
- func (t *TaskCron) Update(updateMap map[string]interface{}) (success bool)
- type TaskMain
- func (t *TaskMain) Add() (success bool)
- func (t *TaskMain) Count(searchMap map[string]interface{}) (count int)
- func (t *TaskMain) Delete() (success bool)
- func (t *TaskMain) Get() (success bool)
- func (t *TaskMain) GetByTaskId() (success bool)
- func (t *TaskMain) Gets(searchMap map[string]interface{}, page, rowsPerPage int) (results []TaskMain, count int)
- func (t *TaskMain) SaveOrUpdate() (success bool)
- func (*TaskMain) TableName() string
- func (t *TaskMain) Update(updateMap map[string]interface{}) (success bool)
- type TaskRun
- func (t *TaskRun) Add() (success bool)
- func (t *TaskRun) Count(searchMap map[string]interface{}) (count int)
- func (t *TaskRun) Delete() (success bool)
- func (t *TaskRun) DeleteByMainTaskId() (success bool)
- func (t *TaskRun) Get() (success bool)
- func (t *TaskRun) GetByTaskId() (success bool)
- func (t *TaskRun) Gets(searchMap map[string]interface{}, page, rowsPerPage int) (results []TaskRun, count int)
- func (t *TaskRun) SaveOrUpdate() (success bool)
- func (*TaskRun) TableName() string
- func (t *TaskRun) Update(updateMap map[string]interface{}) (success bool)
- type User
- func (u *User) Add() (success bool)
- func (u *User) Count(searchMap map[string]interface{}) (count int)
- func (u *User) Delete() (success bool)
- func (u *User) Get() (success bool)
- func (u *User) GetByUsername() (success bool)
- func (u *User) Gets(searchMap map[string]interface{}, page, rowsPerPage int) (results []User, count int)
- func (*User) TableName() string
- func (u *User) Update(updatedMap map[string]interface{}) (success bool)
- type UserWorkspace
- func (u *UserWorkspace) Add() (success bool)
- func (u *UserWorkspace) Get() (success bool)
- func (u *UserWorkspace) GetByUserAndWorkspaceId() bool
- func (u *UserWorkspace) GetsByUserId(userId int) (results []UserWorkspace)
- func (u *UserWorkspace) RemoveUserWorkspace(userId int)
- func (*UserWorkspace) TableName() string
- type Vulnerability
- func (vul *Vulnerability) Add() (success bool)
- func (vul *Vulnerability) Count(searchMap map[string]interface{}) (count int)
- func (vul *Vulnerability) Delete() (success bool)
- func (vul *Vulnerability) Get() (success bool)
- func (vul *Vulnerability) GetByVulnerability() (success bool)
- func (vul *Vulnerability) Gets(searchMap map[string]interface{}, page, rowsPerPage int) (results []Vulnerability, count int)
- func (vul *Vulnerability) GetsByTarget() (results []Vulnerability)
- func (vul *Vulnerability) SaveOrUpdate() (success bool, isAdd bool)
- func (*Vulnerability) TableName() string
- func (vul *Vulnerability) Update(updateMap map[string]interface{}) (success bool)
- type WikiDocs
- func (w *WikiDocs) Add() (success bool)
- func (w *WikiDocs) Count(searchMap map[string]interface{}) (count int)
- func (w *WikiDocs) Delete() (success bool)
- func (w *WikiDocs) Get() (success bool)
- func (w *WikiDocs) GetByNodeToken() (success bool)
- func (w *WikiDocs) Gets(searchMap map[string]interface{}, page, rowsPerPage int) (results []WikiDocs, count int)
- func (w *WikiDocs) GetsByIpOrDomain(ipId, domainId int) (results []WikiDocs)
- func (*WikiDocs) TableName() string
- func (w *WikiDocs) Update(updatedMap map[string]interface{}) (success bool)
- type WikiDocsDomain
- type WikiDocsIP
- type WikiSpace
- type Workspace
- func (w *Workspace) Add() (success bool)
- func (w *Workspace) Count(searchMap map[string]interface{}) (count int)
- func (w *Workspace) Delete() (success bool)
- func (w *Workspace) Get() (success bool)
- func (w *Workspace) GetByGUID() (success bool)
- func (w *Workspace) Gets(searchMap map[string]interface{}, page, rowsPerPage int) (results []Workspace, count int)
- func (*Workspace) TableName() string
- func (w *Workspace) Update(updatedMap map[string]interface{}) (success bool)
Constants ¶
const AttrContentSize = 4000
const HttpBodyContentSize = 16000 // 由于utf-8-mb4的mysql每行sizew不能超过16383(64K/4)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Domain ¶
type Domain struct { Id int `gorm:"primaryKey"` DomainName string `gorm:"column:domain"` OrgId *int `gorm:"column:org_id"` //使用指针可以处理数据库的NULL(go中传递nil) WorkspaceId int `gorm:"column:workspace_id"` PinIndex int `gorm:"column:pin_index"` CreateDatetime time.Time `gorm:"column:create_datetime"` UpdateDatetime time.Time `gorm:"column:update_datetime"` }
func (*Domain) GetByDomain ¶
GetByDomain 根据IP查询记录
func (*Domain) Gets ¶
func (domain *Domain) Gets(searchMap map[string]interface{}, page, rowsPerPage int, orderByDate bool) (results []Domain, count int)
Gets 根据指定的条件,查询满足要求的记录
func (*Domain) GetsForBlackListDomain ¶
func (domain *Domain) GetsForBlackListDomain(blackDomain string, workspaceId int) (results []Domain)
GetsForBlackListDomain 匹配查找黑名单的域名列表记录
func (*Domain) SaveOrUpdate ¶
SaveOrUpdate 保存、更新一条记录
type DomainAttr ¶
type DomainAttr struct { Id int `gorm:"primaryKey"` RelatedId int `gorm:"column:r_id"` Source string `gorm:"column:source"` Tag string `gorm:"column:tag"` Content string `gorm:"column:content"` Hash string `gorm:"column:hash"` CreateDatetime time.Time `gorm:"column:create_datetime"` UpdateDatetime time.Time `gorm:"column:update_datetime"` }
func (*DomainAttr) Add ¶
func (domainAttr *DomainAttr) Add() (success bool)
Add 插入一条新的记录,返回主键ID及成功标志
func (*DomainAttr) Delete ¶
func (domainAttr *DomainAttr) Delete() (success bool)
Delete 删除指定主键ID的一条记录
func (*DomainAttr) DeleteByRelatedIDAndSource ¶
func (domainAttr *DomainAttr) DeleteByRelatedIDAndSource() (success bool)
DeleteByRelatedIDAndSource 删除RID和source删除相应的属性
func (*DomainAttr) GetByDomainAttr ¶
func (domainAttr *DomainAttr) GetByDomainAttr() (success bool)
GetByDomainAttr 根据域名的属性查询一条记录
func (*DomainAttr) GetsByRelatedId ¶
func (domainAttr *DomainAttr) GetsByRelatedId() (results []DomainAttr)
GetsByRelatedId 根据查询条件执行数据库查询操作,返回查询结果数组
func (*DomainAttr) SaveOrUpdate ¶
func (domainAttr *DomainAttr) SaveOrUpdate() bool
SaveOrUpdate 保存、更新一条记录
func (*DomainAttr) TableName ¶
func (*DomainAttr) TableName() string
func (*DomainAttr) Update ¶
func (domainAttr *DomainAttr) Update(updatedMap map[string]interface{}) (success bool)
Update 更新指定ID的一条记录,列名和内容位于map中
type DomainColorTag ¶
type DomainColorTag struct { Id int `gorm:"primaryKey"` RelatedId int `gorm:"column:r_id"` Color string `gorm:"column:color"` CreateDatetime time.Time `gorm:"column:create_datetime"` UpdateDatetime time.Time `gorm:"column:update_datetime"` }
func (*DomainColorTag) DeleteByRelatedId ¶
func (dct *DomainColorTag) DeleteByRelatedId() (success bool)
DeleteByRelatedId 根据指定r_id删除指定记录
func (*DomainColorTag) GetByRelatedId ¶
func (dct *DomainColorTag) GetByRelatedId() (success bool)
GetByRelatedId 根据指定r_id查询一条记录
func (*DomainColorTag) TableName ¶
func (*DomainColorTag) TableName() string
func (*DomainColorTag) Update ¶
func (dct *DomainColorTag) Update(updatedMap map[string]interface{}) (success bool)
Update 更新指定ID的一条记录,列名和内容位于map中
type DomainHttp ¶
type DomainHttp struct { Id int `gorm:"primaryKey"` RelatedId int `gorm:"column:r_id"` Port int `gorm:"column:port"` Source string `gorm:"column:source"` Tag string `gorm:"column:tag"` Content string `gorm:"column:content"` CreateDatetime time.Time `gorm:"column:create_datetime"` UpdateDatetime time.Time `gorm:"column:update_datetime"` }
func (*DomainHttp) GetByRelatedIdAndPortAndTag ¶
func (d *DomainHttp) GetByRelatedIdAndPortAndTag() (success bool)
GetByRelatedIdAndPortAndTag 根据端口、port、tag查询一条记录
func (*DomainHttp) GetsByRelatedId ¶
func (d *DomainHttp) GetsByRelatedId() (results []DomainHttp)
GetsByRelatedId 根据查询条件执行数据库查询操作,返回查询结果数组
func (*DomainHttp) GetsByRelatedIdAndTag ¶
func (d *DomainHttp) GetsByRelatedIdAndTag() (results []DomainHttp)
GetsByRelatedIdAndTag 根据查询条件执行数据库查询操作,返回查询结果数组
func (*DomainHttp) SaveOrUpdate ¶
func (d *DomainHttp) SaveOrUpdate() (success bool)
SaveOrUpdate 保存、更新一条记录
func (*DomainHttp) TableName ¶
func (*DomainHttp) TableName() string
func (*DomainHttp) Update ¶
func (d *DomainHttp) Update(updateMap map[string]interface{}) (success bool)
Update 更新指定ID的一条记录,列名和内容位于map中
type DomainMemo ¶
type DomainMemo struct { Id int `gorm:"primaryKey"` RelatedId int `gorm:"column:r_id"` Content string `gorm:"column:content"` CreateDatetime time.Time `gorm:"column:create_datetime"` UpdateDatetime time.Time `gorm:"column:update_datetime"` }
func (*DomainMemo) DeleteByRelatedId ¶
func (domainMemo *DomainMemo) DeleteByRelatedId() (success bool)
DeleteByRelatedId 根据指定r_id删除指定记录
func (*DomainMemo) GetByRelatedId ¶
func (domainMemo *DomainMemo) GetByRelatedId() (success bool)
GetByRelatedId 根据指定r_id查询一条记录
func (*DomainMemo) TableName ¶
func (*DomainMemo) TableName() string
func (*DomainMemo) Update ¶
func (domainMemo *DomainMemo) Update(updateMap map[string]interface{}) (success bool)
Update 更新指定ID的一条记录,列名和内容位于map中
type Ip ¶
type Ip struct { Id int `gorm:"primaryKey"` IpName string `gorm:"column:ip"` IpInt uint64 `gorm:"column:ip_int"` OrgId *int `gorm:"column:org_id"` //使用指针可以处理数据库的NULL(go中传递nil) Location string `gorm:"column:location"` Status string `gorm:"column:status"` WorkspaceId int `gorm:"column:workspace_id"` PinIndex int `gorm:"column:pin_index"` CreateDatetime time.Time `gorm:"column:create_datetime"` UpdateDatetime time.Time `gorm:"column:update_datetime"` }
func (*Ip) Gets ¶
func (ip *Ip) Gets(searchMap map[string]interface{}, page, rowsPerPage int, orderByDate bool) (results []Ip, count int)
Gets 根据指定的条件,查询满足要求的记录
func (*Ip) SaveOrUpdate ¶
SaveOrUpdate 保存、更新一条记录
type IpAttr ¶
type IpAttr struct { Id int `gorm:"primaryKey"` RelatedId int `gorm:"column:r_id"` Source string `gorm:"column:source"` Tag string `gorm:"column:tag"` Content string `gorm:"column:content"` Hash string `gorm:"column:hash"` CreateDatetime time.Time `gorm:"column:create_datetime"` UpdateDatetime time.Time `gorm:"column:update_datetime"` }
func (*IpAttr) Gets ¶
func (ipAttr *IpAttr) Gets(searchMap map[string]interface{}, page int, rowsPerPage int) (results []IpAttr)
Gets 根据查询条件执行数据库查询操作,返回查询结果数组
func (*IpAttr) GetsByRelatedId ¶
GetsByRelatedId 根据查询条件执行数据库查询操作,返回查询结果数组
type IpColorTag ¶
type IpColorTag struct { Id int `gorm:"primaryKey"` RelatedId int `gorm:"column:r_id"` Color string `gorm:"column:color"` CreateDatetime time.Time `gorm:"column:create_datetime"` UpdateDatetime time.Time `gorm:"column:update_datetime"` }
func (*IpColorTag) DeleteByRelatedId ¶
func (ipct *IpColorTag) DeleteByRelatedId() (success bool)
DeleteByRelatedId 根据指定r_id删除指定记录
func (*IpColorTag) GetByRelatedId ¶
func (ipct *IpColorTag) GetByRelatedId() (success bool)
GetByRelatedId 根据指定r_id查询一条记录
func (*IpColorTag) TableName ¶
func (*IpColorTag) TableName() string
func (*IpColorTag) Update ¶
func (ipct *IpColorTag) Update(updatedMap map[string]interface{}) (success bool)
Update 更新指定ID的一条记录,列名和内容位于map中
type IpHttp ¶
type IpHttp struct { Id int `gorm:"primaryKey"` RelatedId int `gorm:"column:r_id"` Source string `gorm:"column:source"` Tag string `gorm:"column:tag"` Content string `gorm:"column:content"` CreateDatetime time.Time `gorm:"column:create_datetime"` UpdateDatetime time.Time `gorm:"column:update_datetime"` }
func (*IpHttp) GetByRelatedIdAndTag ¶
GetByRelatedIdAndTag 根据端口、tag查询一条记录
func (*IpHttp) GetsByRelatedId ¶
GetsByRelatedId 根据查询条件执行数据库查询操作,返回查询结果数组
type IpMemo ¶
type IpMemo struct { Id int `gorm:"primaryKey"` RelatedId int `gorm:"column:r_id"` Content string `gorm:"column:content"` CreateDatetime time.Time `gorm:"column:create_datetime"` UpdateDatetime time.Time `gorm:"column:update_datetime"` }
func (*IpMemo) DeleteByRelatedId ¶
DeleteByRelatedId 根据指定r_id删除指定记录
func (*IpMemo) GetByRelatedId ¶
GetByRelatedId 根据指定r_id查询一条记录
type KeyWord ¶
type KeyWord struct { Id int `gorm:"primaryKey"` OrgId int `gorm:"column:org_id"` KeyWord string `gorm:"column:key_word"` Engine string `gorm:"column:engine"` SearchTime string `gorm:"column:search_time"` ExcludeWords string `gorm:"column:exclude_words"` CheckMod string `gorm:"column:check_mod"` IsDelete bool `gorm:"column:is_delete"` Count int `gorm:"column:count"` WorkspaceId int `gorm:"column:workspace_id"` CreateDatetime time.Time `gorm:"column:create_datetime"` UpdateDatetime time.Time `gorm:"column:update_datetime"` }
type Organization ¶
type Organization struct { Id int `gorm:"primaryKey"` OrgName string `gorm:"column:org_name"` Status string `gorm:"column:status"` SortOrder int `gorm:"column:sort_order" ` WorkspaceId int `gorm:"column:workspace_id"` CreateDatetime time.Time `gorm:"column:create_datetime"` UpdateDatetime time.Time `gorm:"column:update_datetime" ` }
func (*Organization) Count ¶
func (org *Organization) Count(searchMap map[string]interface{}) (count int)
Count 统计指定查询条件的记录数量
func (*Organization) Gets ¶
func (org *Organization) Gets(searchMap map[string]interface{}, page int, rowsPerPage int) (results []Organization)
Gets 根据查询条件执行数据库查询操作,返回查询结果数组
func (*Organization) Update ¶
func (org *Organization) Update(updatedMap map[string]interface{}) (success bool)
Update 更新指定ID的一条记录,列名和内容位于map中
type Port ¶
type Port struct { Id int `gorm:"primaryKey"` IpId int `gorm:"column:ip_id"` PortNum int `gorm:"column:port"` Status string `gorm:"column:status"` CreateDatetime time.Time `gorm:"column:create_datetime"` UpdateDatetime time.Time `gorm:"column:update_datetime"` }
func (*Port) GetByIPPort ¶
GetByIPPort 根据IP和Port查询指定记录
func (*Port) GetsByIPId ¶
GetsByIPId 根据ip_id返回所有的端口记录
func (*Port) SaveOrUpdate ¶
SaveOrUpdate 保存、更新一条记录
type PortAttr ¶
type PortAttr struct { Id int `gorm:"primaryKey"` RelatedId int `gorm:"column:r_id"` Source string `gorm:"column:source"` Tag string `gorm:"column:tag"` Content string `gorm:"column:content"` Hash string `gorm:"column:hash"` CreateDatetime time.Time `gorm:"column:create_datetime"` UpdateDatetime time.Time `gorm:"column:update_datetime"` }
func (*PortAttr) GetByPortAttr ¶
GetByPortAttr 根据端口和属性查询一条记录
func (*PortAttr) GetsByRelatedId ¶
GetsByRelatedId 根据查询条件执行数据库查询操作,返回查询结果数组
func (*PortAttr) SaveOrUpdate ¶
SaveOrUpdate 保存、更新一条记录
type RuntimeLog ¶
type RuntimeLog struct { Id int `gorm:"primaryKey"` Source string `gorm:"column:source"` File string `gorm:"column:file"` Func string `gorm:"column:func"` Level string `gorm:"column:level"` LevelInt int `gorm:"level_int"` Message string `gorm:"column:message"` CreateDatetime time.Time `gorm:"column:create_datetime"` UpdateDatetime time.Time `gorm:"column:update_datetime"` }
func (*RuntimeLog) Count ¶
func (l *RuntimeLog) Count(searchMap map[string]interface{}) (count int)
Count 统计指定查询条件的记录数量
func (*RuntimeLog) DeleteLogs ¶
func (l *RuntimeLog) DeleteLogs(searchMap map[string]interface{}) (success bool)
DeleteLogs 批量删除指定条件的记录
func (*RuntimeLog) Gets ¶
func (l *RuntimeLog) Gets(searchMap map[string]interface{}, page, rowsPerPage int) (results []RuntimeLog, count int)
Gets 根据指定的条件,查询满足要求的记录
func (*RuntimeLog) SaveOrUpdate ¶
func (l *RuntimeLog) SaveOrUpdate() (success bool, isAdd bool)
SaveOrUpdate 保存、更新一条记录
func (*RuntimeLog) TableName ¶
func (*RuntimeLog) TableName() string
type TaskCron ¶
type TaskCron struct { Id int `gorm:"primaryKey"` TaskId string `gorm:"column:task_id"` TaskName string `gorm:"column:task_name"` KwArgs string `gorm:"column:kwargs"` CreateDatetime time.Time `gorm:"column:create_datetime"` UpdateDatetime time.Time `gorm:"column:update_datetime"` CronRule string `gorm:"column:cron_rule"` LastRunDatetime time.Time `gorm:"column:lastrun_datetime"` Status string `gorm:"column:status"` WorkspaceId int `gorm:"column:workspace_id"` RunCount int `gorm:"column:run_count"` Comment string `gorm:"column:comment"` }
func (*TaskCron) GetByTaskId ¶
GetByTaskId 根据TaskID(不是数据库ID)精确查询一条记录
func (*TaskCron) Gets ¶
func (t *TaskCron) Gets(searchMap map[string]interface{}, page, rowsPerPage int) (results []TaskCron, count int)
Gets 根据指定的条件,查询满足要求的记录
func (*TaskCron) SaveOrUpdate ¶
SaveOrUpdate 保存、更新一条记录
type TaskMain ¶
type TaskMain struct { Id int `gorm:"primaryKey"` TaskId string `gorm:"column:task_id"` TaskName string `gorm:"column:task_name"` KwArgs string `gorm:"column:kwargs"` State string `gorm:"column:state"` Result string `gorm:"column:result"` ReceivedTime time.Time `gorm:"column:received"` StartedTime *time.Time `gorm:"column:started"` SucceededTime *time.Time `gorm:"column:succeeded"` ProgressMessage string `gorm:"column:progress_message"` CronTaskId string `gorm:"column:cron_id"` WorkspaceId int `gorm:"column:workspace_id"` CreateDatetime time.Time `gorm:"column:create_datetime"` UpdateDatetime time.Time `gorm:"column:update_datetime"` }
func (*TaskMain) GetByTaskId ¶
GetByTaskId 根据TaskID(不是数据库ID)精确查询一条记录
func (*TaskMain) Gets ¶
func (t *TaskMain) Gets(searchMap map[string]interface{}, page, rowsPerPage int) (results []TaskMain, count int)
Gets 根据指定的条件,查询满足要求的记录
func (*TaskMain) SaveOrUpdate ¶
SaveOrUpdate 保存、更新一条记录
type TaskRun ¶
type TaskRun struct { Id int `gorm:"primaryKey"` TaskId string `gorm:"column:task_id"` TaskName string `gorm:"column:task_name"` KwArgs string `gorm:"column:kwargs"` Worker string `gorm:"column:worker"` State string `gorm:"column:state"` Result string `gorm:"column:result"` ReceivedTime *time.Time `gorm:"column:received"` RetriedTime *time.Time `gorm:"column:retried"` RevokedTime *time.Time `gorm:"column:revoked"` StartedTime *time.Time `gorm:"column:started"` SucceededTime *time.Time `gorm:"column:succeeded"` FailedTime *time.Time `gorm:"column:failed"` ProgressMessage string `gorm:"column:progress_message"` CreateDatetime time.Time `gorm:"column:create_datetime"` UpdateDatetime time.Time `gorm:"column:update_datetime"` MainTaskId string `gorm:"column:main_id"` LastRunTaskId string `gorm:"column:last_run_id"` WorkspaceId int `gorm:"column:workspace_id"` }
func (*TaskRun) DeleteByMainTaskId ¶
DeleteByMainTaskId 根据任务ID删除记录
func (*TaskRun) GetByTaskId ¶
GetByTaskId 根据TaskID(不是数据库ID)精确查询一条记录
func (*TaskRun) Gets ¶
func (t *TaskRun) Gets(searchMap map[string]interface{}, page, rowsPerPage int) (results []TaskRun, count int)
Gets 根据指定的条件,查询满足要求的记录
func (*TaskRun) SaveOrUpdate ¶
SaveOrUpdate 保存、更新一条记录
type User ¶
type User struct { Id int `gorm:"primaryKey"` UserName string `gorm:"column:user_name"` UserPassword string `gorm:"column:user_password"` UserDescription string `gorm:"column:user_description"` UserRole string `gorm:"column:user_role"` State string `gorm:"column:state"` SortOrder int `gorm:"column:sort_order"` CreateDatetime time.Time `gorm:"column:create_datetime"` UpdateDatetime time.Time `gorm:"column:update_datetime"` }
func (*User) GetByUsername ¶
GetByUsername 根据username查询记录
type UserWorkspace ¶
type UserWorkspace struct { Id int `gorm:"primaryKey"` UserId int `gorm:"column:user_id"` WorkspaceId int `gorm:"column:workspace_id"` CreateDatetime time.Time `gorm:"column:create_datetime"` UpdateDatetime time.Time `gorm:"column:update_datetime"` }
func (*UserWorkspace) GetByUserAndWorkspaceId ¶
func (u *UserWorkspace) GetByUserAndWorkspaceId() bool
GetByUserAndWorkspaceId 根据userId、workspaceId获取记录
func (*UserWorkspace) GetsByUserId ¶
func (u *UserWorkspace) GetsByUserId(userId int) (results []UserWorkspace)
GetsByUserId 根据userId获取workspace
func (*UserWorkspace) RemoveUserWorkspace ¶
func (u *UserWorkspace) RemoveUserWorkspace(userId int)
RemoveUserWorkspace 删除指定用户的全部工作空间
func (*UserWorkspace) TableName ¶
func (*UserWorkspace) TableName() string
type Vulnerability ¶
type Vulnerability struct { Id int `gorm:"primaryKey"` Target string `gorm:"column:target"` Url string `gorm:"column:url"` PocFile string `gorm:"column:poc_file"` Source string `gorm:"column:source"` Extra string `gorm:"column:extra"` Hash string `gorm:"column:hash"` WorkspaceId int `gorm:"column:workspace_id"` CreateDatetime time.Time `gorm:"column:create_datetime"` UpdateDatetime time.Time `gorm:"column:update_datetime"` }
func (*Vulnerability) Count ¶
func (vul *Vulnerability) Count(searchMap map[string]interface{}) (count int)
Count 统计指定查询条件的记录数量
func (*Vulnerability) Delete ¶
func (vul *Vulnerability) Delete() (success bool)
Delete 删除指定主键ID的一条记录
func (*Vulnerability) GetByVulnerability ¶
func (vul *Vulnerability) GetByVulnerability() (success bool)
GetByVulnerability 根据HASH精确查询一条记录
func (*Vulnerability) Gets ¶
func (vul *Vulnerability) Gets(searchMap map[string]interface{}, page, rowsPerPage int) (results []Vulnerability, count int)
Gets 根据指定的条件,查询满足要求的记录
func (*Vulnerability) GetsByTarget ¶
func (vul *Vulnerability) GetsByTarget() (results []Vulnerability)
GetsByTarget 根据Target查询记录,返回查询结果数组
func (*Vulnerability) SaveOrUpdate ¶
func (vul *Vulnerability) SaveOrUpdate() (success bool, isAdd bool)
SaveOrUpdate 保存、更新一条记录
func (*Vulnerability) TableName ¶
func (*Vulnerability) TableName() string
func (*Vulnerability) Update ¶
func (vul *Vulnerability) Update(updateMap map[string]interface{}) (success bool)
Update 更新指定ID的一条记录,列名和内容位于map中
type WikiDocs ¶
type WikiDocs struct { Id int `gorm:"primaryKey"` SpaceID string `gorm:"column:space_id"` NodeToken string `gorm:"column:node_token"` ObjType string `gorm:"column:obj_type"` ObjToken string `gorm:"column:obj_token"` Title string `gorm:"column:title"` Comment string `gorm:"column:comment"` PinIndex int `gorm:"column:pin_index"` CreateDatetime time.Time `gorm:"column:create_datetime"` UpdateDatetime time.Time `gorm:"column:update_datetime"` }
func (*WikiDocs) GetByNodeToken ¶
GetByNodeToken 根据node_token查询记录
func (*WikiDocs) Gets ¶
func (w *WikiDocs) Gets(searchMap map[string]interface{}, page, rowsPerPage int) (results []WikiDocs, count int)
Gets 根据指定的条件,查询满足要求的记录
func (*WikiDocs) GetsByIpOrDomain ¶
GetsByIpOrDomain 根据指定的IP或Domain条件,查询满足要求的记录
type WikiDocsDomain ¶
type WikiDocsDomain struct { Id int `gorm:"primaryKey"` DocumentId int `gorm:"column:doc_id"` DomainId int `gorm:"column:domain_id"` CreateDatetime time.Time `gorm:"column:create_datetime"` UpdateDatetime time.Time `gorm:"column:update_datetime"` }
func (*WikiDocsDomain) Add ¶
func (w *WikiDocsDomain) Add() (success bool)
func (*WikiDocsDomain) Get ¶
func (w *WikiDocsDomain) Get() (success bool)
func (*WikiDocsDomain) RemoveByDocument ¶
func (w *WikiDocsDomain) RemoveByDocument(documentId int) (success bool)
func (*WikiDocsDomain) TableName ¶
func (*WikiDocsDomain) TableName() string
type WikiDocsIP ¶
type WikiDocsIP struct { Id int `gorm:"primaryKey"` DocumentId int `gorm:"column:doc_id"` IpId int `gorm:"column:ip_id"` CreateDatetime time.Time `gorm:"column:create_datetime"` UpdateDatetime time.Time `gorm:"column:update_datetime"` }
func (*WikiDocsIP) Add ¶
func (w *WikiDocsIP) Add() (success bool)
func (*WikiDocsIP) Get ¶
func (w *WikiDocsIP) Get() (success bool)
func (*WikiDocsIP) RemoveByDocId ¶
func (w *WikiDocsIP) RemoveByDocId(documentId int) (success bool)
func (*WikiDocsIP) TableName ¶
func (*WikiDocsIP) TableName() string
type WikiSpace ¶
type WikiSpace struct { Id int `gorm:"primaryKey"` WorkspaceId int `gorm:"column:workspace_id"` WikiSpaceId string `gorm:"column:wiki_space_id"` CreateDatetime time.Time `gorm:"column:create_datetime"` UpdateDatetime time.Time `gorm:"column:update_datetime"` }
func (*WikiSpace) GetByWorkspaceId ¶
GetByWorkspaceId 根据workspace_id查询记录
type Workspace ¶
type Workspace struct { Id int `gorm:"primaryKey"` WorkspaceName string `gorm:"column:workspace_name"` WorkspaceGUID string `gorm:"column:workspace_guid"` WorkspaceDescription string `gorm:"column:workspace_description"` State string `gorm:"column:state"` SortOrder int `gorm:"column:sort_order"` CreateDatetime time.Time `gorm:"column:create_datetime"` UpdateDatetime time.Time `gorm:"column:update_datetime"` }
Source Files ¶
- conn.go
- domain.go
- domainattr.go
- domaincolortag.go
- domainhttp.go
- domainmemo.go
- ip.go
- ipattr.go
- ipcolortag.go
- iphttp.go
- ipmemo.go
- key_word.go
- organization.go
- port.go
- portattr.go
- runtimelog.go
- task_cron.go
- task_main.go
- task_run.go
- user.go
- user_workspace.go
- vulnerability.go
- wiki_docs.go
- wiki_docs_domain.go
- wiki_docs_ip.go
- wiki_space.go
- workspace.go