controllers

package
v3.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Success = "success"
	Fail    = "fail"
)
View Source
const (
	SecuritySalt = "3B67E54AB99B0A34EC0CAA750ABCCF7C"

	User       = "User"
	UserRole   = "UserRole"
	Workspace  = "Workspace"
	Admin      = "admin"
	SuperAdmin = "superadmin"
	Guest      = "guest"
)

Variables

View Source
var (
	// OnlineUserMutex 在线用户Mutex
	OnlineUserMutex sync.Mutex
	// OnlineUser 在线用户信息
	OnlineUser = make(map[string]*OnlineUserInfo)
)

Functions

func FormatDateTime

func FormatDateTime(dt time.Time) string

FormatDateTime 日期统一格式化

func GetDateBeforeNow

func GetDateBeforeNow(delta int) time.Time

func IsSafeFilename added in v3.1.0

func IsSafeFilename(filename string) bool

IsSafeFilename 检查文件名是否安全

func PasswordEncrypt

func PasswordEncrypt(password string) string

func SanitizeFilename added in v3.1.0

func SanitizeFilename(filename string) string

SanitizeFilename 清理文件名,返回安全的文件名

func ValidLoginUser

func ValidLoginUser(username, password string) (bool, *db.UserDocument)

ValidLoginUser 校验用户名和密码

Types

type AccessLogController

type AccessLogController struct {
	BaseController
}

func (*AccessLogController) AccessLogFilesAction

func (c *AccessLogController) AccessLogFilesAction()

AccessLogFilesAction 获取日志文件列表

func (*AccessLogController) IndexAction

func (c *AccessLogController) IndexAction()

IndexAction 显示列表页

func (*AccessLogController) ListAction

func (c *AccessLogController) ListAction()

ListAction 列表的数据

type AssetController

type AssetController struct {
	BaseController
}

func (*AssetController) AssetHttpContentAction

func (c *AssetController) AssetHttpContentAction()

func (*AssetController) AssetMemoAction

func (c *AssetController) AssetMemoAction()

func (*AssetController) AssetStatisticsAction

func (c *AssetController) AssetStatisticsAction()

func (*AssetController) BlockAssetAction

func (c *AssetController) BlockAssetAction()

func (*AssetController) DeleteAction

func (c *AssetController) DeleteAction()

func (*AssetController) ExportAction

func (c *AssetController) ExportAction()

func (*AssetController) ImportIndexAction

func (c *AssetController) ImportIndexAction()

func (*AssetController) ImportSaveAction

func (c *AssetController) ImportSaveAction()

func (*AssetController) IndexAction

func (c *AssetController) IndexAction()

func (*AssetController) ListAction

func (c *AssetController) ListAction()

ListAction 获取列表显示的数据

func (*AssetController) UpdateMemoAction

func (c *AssetController) UpdateMemoAction()

type AssetListData

type AssetListData struct {
	Id        string `json:"id"`
	Index     int    `json:"index"`
	Authority string `json:"authority"`

	Host string `json:"host"`
	//Domain         string   `json:"domain"`
	IP       []string `json:"ip"`
	Port     string   `json:"port"`
	Status   string   `json:"status"`
	Location []string `json:"location"`
	Org      string   `json:"org"`

	Service      string   `json:"service"`
	Title        string   `json:"title"`
	Header       string   `json:"header"`
	Cert         string   `json:"cert"`
	Banner       string   `json:"banner"`
	App          []string `json:"app"`
	Memo         string   `json:"memo"`
	IconHash     string   `json:"icon_hash"`
	IsNew        bool     `json:"new"`
	IsUpdate     bool     `json:"update"`
	IsCDNOrCloud bool     `json:"cdn"`
	IsHoneypot   bool     `json:"honeypot"`

	ScreenshotFile []string `json:"screenshot"` //base64编码的图片文件
	IconImage      []string `json:"iconimage"`  //base64编码的icon图片文件

	Vul []string `json:"vul"` // 漏洞列表

	Icp        string `json:"icp"` // 备案信息
	IcpCompany string `json:"icp_company"`

	WorkspaceId string `json:"workspace"`
	UpdateTime  string `json:"update_time"`
}

type AssetStatistics

type AssetStatistics struct {
	TotalAssetCount  int `json:"total"`
	IpAssetCount     int `json:"ip"`
	DomainAssetCount int `json:"domain"`
	VulCount         int `json:"vul"`
}

type BaseController

type BaseController struct {
	web.Controller
}

func (*BaseController) CheckErrorAndStatus

func (c *BaseController) CheckErrorAndStatus(isSuccess bool, err error) bool

func (*BaseController) CheckMultiAccessRequest

func (c *BaseController) CheckMultiAccessRequest(roleList []RequestRole, forceRedirect bool) (isPermit bool)

CheckMultiAccessRequest 检查用户当前登录是否满足请求的角色要求

func (*BaseController) CheckOneAccessRequest

func (c *BaseController) CheckOneAccessRequest(role RequestRole, forceRedirect bool) (isPermit bool)

CheckOneAccessRequest 检查用户当前登录是否满足请求的角色要求

func (*BaseController) DeleteOnlineUser

func (c *BaseController) DeleteOnlineUser()

DeleteOnlineUser 用户注销或过期,清除在线用户

func (*BaseController) FailedStatus

func (c *BaseController) FailedStatus(msg string)

FailedStatus 返回fail结果的JSON格式消息

func (*BaseController) GetCurrentUser

func (c *BaseController) GetCurrentUser() (userName string)

GetCurrentUser 获取保存在session或jwt中的username

func (*BaseController) GetWorkspace

func (c *BaseController) GetWorkspace() (workspaceId string)

GetWorkspace 获取保存在session或jwt中的workspaceId

func (*BaseController) MakeStatusResponse

func (c *BaseController) MakeStatusResponse(isSuccess bool)

MakeStatusResponse 生成默认的状态返回JSON

func (*BaseController) Prepare

func (c *BaseController) Prepare()

func (*BaseController) SucceededStatus

func (c *BaseController) SucceededStatus(msg string)

SucceededStatus 返回success结果的JSON格式消息

func (*BaseController) UpdateOnlineUser

func (c *BaseController) UpdateOnlineUser()

UpdateOnlineUser 更新在线用户IP和时间

type ConfigController

type ConfigController struct {
	BaseController
}

func (*ConfigController) ChangePasswordAction

func (c *ConfigController) ChangePasswordAction()

func (*ConfigController) LoadServerVersionAction

func (c *ConfigController) LoadServerVersionAction()

func (*ConfigController) LoadWorkerConfigAction

func (c *ConfigController) LoadWorkerConfigAction()

func (*ConfigController) SaveWorkerConfigAction

func (c *ConfigController) SaveWorkerConfigAction()

func (*ConfigController) ServerIndexAction

func (c *ConfigController) ServerIndexAction()

func (*ConfigController) TestLLMAPIKeyAction

func (c *ConfigController) TestLLMAPIKeyAction()

func (*ConfigController) TestOnlineAPIKeyAction

func (c *ConfigController) TestOnlineAPIKeyAction()

TestOnlineAPIKeyAction 在线测试API的key是否可用

func (*ConfigController) WorkerIndexAction

func (c *ConfigController) WorkerIndexAction()

type CustomController

type CustomController struct {
	BaseController
}

func (*CustomController) IndexAction

func (c *CustomController) IndexAction()

func (*CustomController) LoadAction

func (c *CustomController) LoadAction()

func (*CustomController) SaveAction

func (c *CustomController) SaveAction()

type CustomData

type CustomData struct {
	Id          string `json:"id" form:"id"`
	Category    string `json:"category" form:"category"`
	Description string `json:"description" form:"description"`
	Data        string `json:"data" form:"data"`
}

type DashboardController

type DashboardController struct {
	BaseController
}

func (*DashboardController) AssetChartDataAction

func (c *DashboardController) AssetChartDataAction()

func (*DashboardController) ChangeUserWorkspaceAction

func (c *DashboardController) ChangeUserWorkspaceAction()

func (*DashboardController) GetUserAvailableWorkspaceAction

func (c *DashboardController) GetUserAvailableWorkspaceAction() (workspaceList []WorkspaceList)

func (*DashboardController) IndexAction

func (c *DashboardController) IndexAction()

func (*DashboardController) StatisticsAssetAction

func (c *DashboardController) StatisticsAssetAction()

func (*DashboardController) TaskChartDataAction

func (c *DashboardController) TaskChartDataAction()

func (*DashboardController) UserChartDataAction

func (c *DashboardController) UserChartDataAction()

func (*DashboardController) VulChartDataAction

func (c *DashboardController) VulChartDataAction()

type DataTableResponseData

type DataTableResponseData struct {
	Draw            int           `json:"draw"`
	RecordsTotal    int           `json:"recordsTotal"`
	RecordsFiltered int           `json:"recordsFiltered"`
	Data            []interface{} `json:"data"`
}

DataTableResponseData DataTable列表的返回数据

type DatableRequestParam

type DatableRequestParam struct {
	Draw   int `form:"draw"`
	Start  int `form:"start"`
	Length int `form:"length"`
}

DatableRequestParam DataTable列表的请求数据的公共部份

type ExecutorTaskInfoData

type ExecutorTaskInfoData struct {
	Id             string `json:"id"`
	Index          int    `json:"index"`
	Executor       string `json:"executor"`
	Target         string `json:"target"`
	Status         string `json:"status"`
	Result         string `json:"result"`
	Worker         string `json:"worker"`
	CreateDatetime string `json:"create_time"`
	UpdateDatetime string `json:"update_time"`
	StartDatetime  string `json:"start_time"`
	Runtime        string `json:"runtime"`
	EndDatetime    string `json:"end_time"`
}

type FileContentResponse added in v3.1.0

type FileContentResponse struct {
	StatusResponseData
	Content string `json:"content"`
}

FileContentResponse 文件内容响应

type FileInfo added in v3.1.0

type FileInfo struct {
	Name      string `json:"name"`
	Path      string `json:"path"`
	Size      int64  `json:"size"`
	ModTime   string `json:"mod_time"`
	IsDir     bool   `json:"is_dir"`
	Extension string `json:"extension"`
	MD5       string `json:"md5"`
}

FileInfo 文件信息结构体

type FileListResponse added in v3.1.0

type FileListResponse struct {
	StatusResponseData
	Data []FileInfo `json:"data"`
}

FileListResponse 文件列表响应

type GlobalSessionData

type GlobalSessionData struct {
	IpAddressIp     string `json:"ip_address_ip"`
	IpAddressDomain string `json:"ip_address_domain"`
	DomainAddress   string `json:"domain_address"`
	Port            string `json:"port"`
	OrgId           string `json:"session_org_id"`
}

GlobalSessionData 用于保存查询过程中的一些参数

type ICPController added in v3.2.0

type ICPController struct {
	BaseController
}

func (*ICPController) DeleteAction added in v3.2.0

func (c *ICPController) DeleteAction()

DeleteAction 删除一条记录

func (*ICPController) IndexAction added in v3.2.0

func (c *ICPController) IndexAction()

func (*ICPController) ListAction added in v3.2.0

func (c *ICPController) ListAction()

ListAction 获取列表显示的数据

func (*ICPController) OnlineAPISearchAction added in v3.2.0

func (c *ICPController) OnlineAPISearchAction()

type ICPData added in v3.2.0

type ICPData struct {
	Id             string `json:"id" form:"id"`
	Index          int    `json:"index" form:"-"`
	UnitName       string `json:"unit_name" form:"unit_name"`
	Domain         string `json:"domain" form:"domain"`
	CompanyType    string `json:"company_type" form:"company_type"`
	SiteLicense    string `json:"site_license" form:"site_license"`
	ServiceLicence string `json:"service_licence" form:"service_licence"`
	VerifyTime     string `json:"verify_time" form:"verify_time"`
	CreateDatetime string `json:"create_time" form:"-"`
	UpdateDatetime string `json:"update_time" form:"-"`
}

type LoginController

type LoginController struct {
	BaseController
}

func (*LoginController) IndexAction

func (c *LoginController) IndexAction()

IndexAction 登录首页

func (*LoginController) LoginAction

func (c *LoginController) LoginAction()

LoginAction 登录验证

func (*LoginController) LogoutAction

func (c *LoginController) LogoutAction()

LogoutAction 退出登录

type MainTaskController

type MainTaskController struct {
	BaseController
}

func (*MainTaskController) AddIndexAction

func (c *MainTaskController) AddIndexAction()

func (*MainTaskController) AddSaveAction

func (c *MainTaskController) AddSaveAction()

func (*MainTaskController) ChangeCronTaskStatusAction

func (c *MainTaskController) ChangeCronTaskStatusAction()

ChangeCronTaskStatusAction 更改定时任务状态

func (*MainTaskController) DeleteAction

func (c *MainTaskController) DeleteAction()

DeleteAction 删除一条记录

func (*MainTaskController) DeleteExecutorTaskAction

func (c *MainTaskController) DeleteExecutorTaskAction()

DeleteExecutorTaskAction 删除一条记录

func (*MainTaskController) GetProfileInfoAction

func (c *MainTaskController) GetProfileInfoAction()

func (*MainTaskController) GetTaskProfileListAction

func (c *MainTaskController) GetTaskProfileListAction()

func (*MainTaskController) IndexAction

func (c *MainTaskController) IndexAction()

IndexAction 显示列表页面

func (*MainTaskController) InfoAction

func (c *MainTaskController) InfoAction()

func (*MainTaskController) InfoExecutorTaskAction

func (c *MainTaskController) InfoExecutorTaskAction()

func (*MainTaskController) InfoIndexAction

func (c *MainTaskController) InfoIndexAction()

func (*MainTaskController) ListAction

func (c *MainTaskController) ListAction()

ListAction 获取列表显示的数据

func (*MainTaskController) MaintaskReportAction added in v3.2.0

func (c *MainTaskController) MaintaskReportAction()

func (*MainTaskController) MaintaskTreeAction

func (c *MainTaskController) MaintaskTreeAction()

func (*MainTaskController) MaintaskTreeDataAction

func (c *MainTaskController) MaintaskTreeDataAction()

func (*MainTaskController) ParseStringTargetAction added in v3.2.0

func (c *MainTaskController) ParseStringTargetAction()

func (*MainTaskController) RedoExecutorTaskAction added in v3.2.0

func (c *MainTaskController) RedoExecutorTaskAction()

RedoExecutorTaskAction 重新执行一Executor任务

func (*MainTaskController) RedoMaintaskAction

func (c *MainTaskController) RedoMaintaskAction()

RedoMaintaskAction 重新执行一次任务

type MainTaskDetailInfoData

type MainTaskDetailInfoData struct {
	TaskId        string `json:"task_id"`
	Name          string `json:"name"`
	ProfileName   string `json:"profile_name"`
	Description   string `json:"description"`
	Target        string `json:"target"`
	ExcludeTarget string `json:"exclude_target"`
	TargetSplit   string `json:"target_split"`
	OrgName       string `json:"org_name"`
	IsCronTask    bool   `json:"is_cron_task" form:"is_cron_task"`
	CronTask      string `json:"cron_task"`
	Proxy         string `json:"proxy"`
	WorkspaceName string `json:"workspace"`
	Args          string `json:"args"`

	Status         string `json:"status"`
	Result         string `json:"result"`
	ReportLLMApi   string `json:"report_llmapi"`
	Report         string `json:"report"`
	Progress       string `json:"progress"`
	ProgressRate   string `json:"progress_rate"`
	CreateDatetime string `json:"create_time"`
	StartDatetime  string `json:"start_time"`
	Runtime        string `json:"runtime"`
	EndDatetime    string `json:"end_time"`
}

type MainTaskInfoData

type MainTaskInfoData struct {
	Id             string `json:"id" form:"id"`
	Name           string `json:"name" form:"name"`
	ProfileName    string `json:"profile_name" form:"profile_name"`
	ProfileId      string `json:"profile_id" form:"profile_id"`
	Description    string `json:"description" form:"description"`
	Target         string `json:"target" form:"target"`
	ExcludeTarget  string `json:"exclude_target" form:"exclude_target"`
	TargetSplit    int    `json:"target_split" form:"target_split"`
	TargetSplitNum int    `json:"target_split_num" form:"target_split_num"`
	OrgId          string `json:"org_id" form:"org_id"`
	IsCronTask     bool   `json:"is_cron_task" form:"is_cron_task"`
	CronExpr       string `json:"cron_expr" form:"cron_expr"`
	IsProxy        bool   `json:"is_proxy" form:"is_proxy"`
	ReportLLMApi   string `json:"report_llmapi" form:"report_llmapi"`
}

type NotifyController

type NotifyController struct {
	BaseController
}

func (*NotifyController) AddIndexAction

func (c *NotifyController) AddIndexAction()

AddIndexAction 新增页面显示

func (*NotifyController) AddSaveAction

func (c *NotifyController) AddSaveAction()

AddSaveAction 保存新增的记录

func (*NotifyController) DeleteAction

func (c *NotifyController) DeleteAction()

DeleteAction 删除一条记录

func (*NotifyController) GetAction

func (c *NotifyController) GetAction()

GetAction 根据ID获取一个记录

func (*NotifyController) IndexAction

func (c *NotifyController) IndexAction()

IndexAction 显示列表页面

func (*NotifyController) ListAction

func (c *NotifyController) ListAction()

ListAction 获取列表显示的数据

func (*NotifyController) ListSelectNotifyAction

func (c *NotifyController) ListSelectNotifyAction()

ListSelectNotifyAction 获取可用的通知列表

func (*NotifyController) UpdateAction

func (c *NotifyController) UpdateAction()

UpdateAction 更新一个记录

func (*NotifyController) UpdateIndexAction

func (c *NotifyController) UpdateIndexAction()

type NotifyInfoData

type NotifyInfoData struct {
	Id          string `json:"id" form:"id"`
	Name        string `json:"name" form:"name"`
	Description string `json:"description" form:"description"`
	Category    string `json:"category" form:"category"`
	Token       string `json:"token" form:"token"`
	Template    string `json:"template" form:"template"`
	Status      string `json:"status" form:"status"`
	SortNumber  int    `json:"sort_number" form:"sort_number"`
}

type NotifyListData

type NotifyListData struct {
	Id             string `json:"id" form:"id"`
	Index          int    `json:"index" form:"-"`
	Name           string `json:"name" form:"name"`
	Category       string `json:"category" form:"category"`
	Status         string `json:"status" form:"status"`
	SortNumber     int    `json:"sort_number" form:"sort_number"`
	CreateDatetime string `json:"create_time" form:"-"`
	UpdateDatetime string `json:"update_time" form:"-"`
}

type NotifySelectData

type NotifySelectData struct {
	Id   string `json:"id" form:"id"`
	Name string `json:"name" form:"name"`
}

type OnlineUserInfo

type OnlineUserInfo struct {
	IP           string
	LoginTime    time.Time
	UpdateTime   time.Time
	UpdateNumber int64
}

OnlineUserInfo 在线用户

type OrganizationController

type OrganizationController struct {
	BaseController
}

func (*OrganizationController) AddIndexAction

func (c *OrganizationController) AddIndexAction()

AddIndexAction 新增页面显示

func (*OrganizationController) AddSaveAction

func (c *OrganizationController) AddSaveAction()

AddSaveAction 保存新增的记录

func (*OrganizationController) DeleteAction

func (c *OrganizationController) DeleteAction()

DeleteAction 删除一条记录

func (*OrganizationController) GetAction

func (c *OrganizationController) GetAction()

GetAction 根据ID获取一个记录

func (*OrganizationController) GetAllAction

func (c *OrganizationController) GetAllAction()

GetAllAction 获取所有的记录

func (*OrganizationController) IndexAction

func (c *OrganizationController) IndexAction()

IndexAction 显示列表页面

func (*OrganizationController) ListAction

func (c *OrganizationController) ListAction()

ListAction 获取列表显示的数据

func (*OrganizationController) UpdateAction

func (c *OrganizationController) UpdateAction()

UpdateAction 更新一个记录

type OrganizationData

type OrganizationData struct {
	Id             string `json:"id" form:"id"`
	Index          int    `json:"index" form:"-"`
	OrgName        string `json:"org_name" form:"org_name"`
	Description    string `json:"description" form:"description"`
	Status         string `json:"status" form:"status"`
	SortNumber     int    `json:"sort_number" form:"sort_number"`
	CreateDatetime string `json:"create_time" form:"-"`
	UpdateDatetime string `json:"update_time" form:"-"`
}

type OrganizationSelectData

type OrganizationSelectData struct {
	Id      string `json:"id"`
	OrgName string `json:"name"`
}

type PocFileController added in v3.1.0

type PocFileController struct {
	BaseController
}

func (*PocFileController) CreateFolderAction added in v3.1.0

func (c *PocFileController) CreateFolderAction()

CreateFolderAction 创建新目录

func (*PocFileController) DeleteFileAction added in v3.1.0

func (c *PocFileController) DeleteFileAction()

DeleteFileAction 删除文件或目录

func (*PocFileController) DownloadFileAction added in v3.1.0

func (c *PocFileController) DownloadFileAction()

DownloadFileAction 下载文件

func (*PocFileController) IndexAction added in v3.1.0

func (c *PocFileController) IndexAction()

func (*PocFileController) ListFilesAction added in v3.1.0

func (c *PocFileController) ListFilesAction()

ListFilesAction 列出目录下的文件

func (*PocFileController) SearchFilesAction added in v3.1.0

func (c *PocFileController) SearchFilesAction()

SearchFilesAction 搜索文件

func (*PocFileController) UploadFileAction added in v3.1.0

func (c *PocFileController) UploadFileAction()

UploadFileAction 上传文件

type ProfileController

type ProfileController struct {
	BaseController
}

func (*ProfileController) AddIndexAction

func (c *ProfileController) AddIndexAction()

AddIndexAction 新增页面显示

func (*ProfileController) DeleteAction

func (c *ProfileController) DeleteAction()

DeleteAction 删除一条记录

func (*ProfileController) EditIndexAction

func (c *ProfileController) EditIndexAction()

EditIndexAction 编辑页面显示

func (*ProfileController) GetAction

func (c *ProfileController) GetAction()

GetAction 根据ID获取一个记录

func (*ProfileController) IndexAction

func (c *ProfileController) IndexAction()

IndexAction 显示列表页面

func (*ProfileController) ListAction

func (c *ProfileController) ListAction()

ListAction 获取列表显示的数据

func (*ProfileController) SaveAction

func (c *ProfileController) SaveAction()

SaveAction 保存新记录、更新原记录

type ProfileData

type ProfileData struct {
	Id             string   `json:"id" form:"id"`
	Index          int      `json:"index" form:"-"`
	Name           string   `json:"name" form:"name"`
	Description    string   `json:"description" form:"description"`
	Status         string   `json:"status" form:"status"`
	SortNumber     int      `json:"sort_number" form:"sort_number"`
	Executors      []string `json:"executors" form:"executors"`
	CreateDatetime string   `json:"create_time" form:"-"`
	UpdateDatetime string   `json:"update_time" form:"-"`
}

type ProfileInfoData

type ProfileInfoData struct {
	Id              string          `json:"id" form:"id"`
	Name            string          `json:"name" form:"name"`
	Description     string          `json:"description" form:"description"`
	Status          string          `json:"status" form:"status"`
	SortNumber      int             `json:"sort_number" form:"sort_number"`
	ConfigType      string          `json:"config_type" form:"config_type"`
	ICPData         icpData         `json:"icp" form:"icp"`
	PortscanData    portscanData    `json:"portscan" form:"portscan"`
	DomainscanData  domainscanData  `json:"domainscan" form:"domainscan"`
	OnlineapiData   onlineapiData   `json:"onlineapi" form:"onlineapi"`
	FingerprintData fingerprintData `json:"fingerprint" form:"fingerprint"`
	PocscanData     pocscanData     `json:"pocscan" form:"pocscan"`
	StandaloneData  standaloneData  `json:"standalone" form:"standalone"`
}

type RequestRole

type RequestRole string

type RuntimeLogController

type RuntimeLogController struct {
	BaseController
}

func (*RuntimeLogController) BatchDeleteAction

func (c *RuntimeLogController) BatchDeleteAction()

BatchDeleteAction 批量清除记录

func (*RuntimeLogController) DeleteAction

func (c *RuntimeLogController) DeleteAction()

DeleteAction 删除一个记录

func (*RuntimeLogController) IndexAction

func (c *RuntimeLogController) IndexAction()

func (*RuntimeLogController) ListAction

func (c *RuntimeLogController) ListAction()

ListAction 列表的数据

type RuntimeLogData

type RuntimeLogData struct {
	Id         string `json:"id"`
	Index      int    `json:"index"`
	Source     string `json:"source"`
	File       string `json:"file"`
	Func       string `json:"func"`
	Level      string `json:"level"`
	Message    string `json:"message"`
	CreateTime string `json:"create_datetime"`
	UpdateTime string `json:"update_datetime"`
}

type StatusResponseData

type StatusResponseData struct {
	Status string `json:"status"`
	Msg    string `json:"msg"`
}

StatusResponseData JSON的状态响应

type TaskData

type TaskData struct {
	Id             string `json:"id"`
	Index          int    `json:"index"`
	TaskId         string `json:"task_id"`
	Name           string `json:"name"`
	Target         string `json:"target"`
	ProfileName    string `json:"profile"`
	Status         string `json:"status"`
	Result         string `json:"result"`
	ProgressRate   string `json:"progress_rate"`
	Progress       string `json:"progress"`
	CreateDatetime string `json:"create_time"`
	UpdateDatetime string `json:"update_time"`
	StartDatetime  string `json:"start_time"`
	Runtime        string `json:"runtime"`
	IsCron         bool   `json:"cron"`
}

type UnitController added in v3.2.0

type UnitController struct {
	BaseController
}

func (*UnitController) DeleteAction added in v3.2.0

func (c *UnitController) DeleteAction()

DeleteAction 删除一条记录

func (*UnitController) ExportAction added in v3.2.0

func (c *UnitController) ExportAction()

func (*UnitController) GetAction added in v3.2.0

func (c *UnitController) GetAction()

func (*UnitController) IndexAction added in v3.2.0

func (c *UnitController) IndexAction()

func (*UnitController) ListAction added in v3.2.0

func (c *UnitController) ListAction()

ListAction 获取列表显示的数据

func (*UnitController) OnlineAPISearchAction added in v3.2.0

func (c *UnitController) OnlineAPISearchAction()

func (*UnitController) UpdateAction added in v3.2.0

func (c *UnitController) UpdateAction()

type UnitData added in v3.2.0

type UnitData struct {
	Id             string `json:"id" form:"id"`
	Index          int    `json:"index" form:"-"`
	UnitName       string `json:"unit_name" form:"unit_name"`
	ParentUnitName string `json:"parent_unit_name" form:"parent_unit_name"`
	Status         string `json:"status" form:"status"`
	EntId          string `json:"ent_id" form:"ent_id"`
	Type           string `json:"type" form:"type"`
	InvestRation   string `json:"invest_ration" form:"invest_ration"`
	ICPData        int    `json:"icp_data" form:"icp_data"`
	CreateDatetime string `json:"create_time" form:"-"`
	UpdateDatetime string `json:"update_time" form:"-"`
}

type UnitOnlineSearchData added in v3.2.0

type UnitOnlineSearchData struct {
	UnitName     string `json:"unit_name" form:"unit_name"`
	IsBranch     bool   `json:"is_branch" form:"is_branch"`
	IsInvest     bool   `json:"is_invest" form:"is_invest"`
	InvestRation string `json:"invest_ration" form:"invest_ration"`
	IsICPOnline  bool   `json:"is_icp_online" form:"is_icp_online"`
	MaxDepth     int    `json:"max_depth" form:"max_depth"`
	Cookie       string `json:"cookie" form:"cookie"`
}

type UserController

type UserController struct {
	BaseController
}

func (*UserController) AddIndexAction

func (c *UserController) AddIndexAction()

AddIndexAction 新增页面显示

func (*UserController) AddSaveAction

func (c *UserController) AddSaveAction()

AddSaveAction 保存新增的记录

func (*UserController) DeleteAction

func (c *UserController) DeleteAction()

DeleteAction 删除一条记录

func (*UserController) GetAction

func (c *UserController) GetAction()

GetAction 根据ID获取一个记录

func (*UserController) IndexAction

func (c *UserController) IndexAction()

IndexAction 显示列表页面

func (*UserController) ListAction

func (c *UserController) ListAction()

ListAction 获取列表显示的数据

func (*UserController) ListUserWorkspaceAction

func (c *UserController) ListUserWorkspaceAction()

ListUserWorkspaceAction 获取用户相关的工作空间权限设置情况

func (*UserController) ResetPasswordAction

func (c *UserController) ResetPasswordAction()

ResetPasswordAction 重置指定用户的密码

func (*UserController) UpdateAction

func (c *UserController) UpdateAction()

UpdateAction 更新一个记录

func (*UserController) UpdateUserWorkspaceAction

func (c *UserController) UpdateUserWorkspaceAction()

UpdateUserWorkspaceAction 更新用户的工作空间访问权限

type UserData

type UserData struct {
	Id              string `json:"id" form:"id"`
	Index           int    `json:"index" form:"-"`
	UserName        string `json:"user_name" form:"user_name"`
	UserPassword    string `json:"user_password" form:"user_password"`
	UserDescription string `json:"user_description" form:"user_description"`
	UserRole        string `json:"user_role" form:"user_role"`
	Status          string `json:"status" form:"status"`
	SortNumber      int    `json:"sort_number" form:"sort_number"`
	CreateDatetime  string `json:"create_time" form:"-"`
	UpdateDatetime  string `json:"update_time" form:"-"`
}

type VulController

type VulController struct {
	BaseController
}

func (*VulController) DeleteAction

func (c *VulController) DeleteAction()

DeleteAction 删除一条记录

func (*VulController) IndexAction

func (c *VulController) IndexAction()

func (*VulController) InfoAction added in v3.1.0

func (c *VulController) InfoAction()

func (*VulController) InfoIndexAction added in v3.1.0

func (c *VulController) InfoIndexAction()

func (*VulController) ListAction

func (c *VulController) ListAction()

ListAction 获取列表显示的数据

func (*VulController) LoadPocFileAction

func (c *VulController) LoadPocFileAction()

type VulData

type VulData struct {
	Id             string `json:"id"`
	Index          int    `json:"index"`
	Authority      string `json:"authority"`
	Url            string `json:"url"`
	PocFile        string `json:"pocfile"`
	Name           string `json:"name"`
	Severity       string `json:"severity"`
	Source         string `json:"source"`
	TaskId         string `json:"task_id"`
	CreateTime     string `json:"create_time"`
	UpdateDatetime string `json:"update_time"`
}

type VulDetailDataInfo added in v3.1.0

type VulDetailDataInfo struct {
	Id             string `json:"id"`
	Authority      string `json:"authority"`
	Url            string `json:"url"`
	PocFile        string `json:"pocfile"`
	Severity       string `json:"severity"`
	Name           string `json:"name"`
	Source         string `json:"source"`
	Extra          string `json:"extra"`
	CreateTime     string `json:"create_time"`
	UpdateDatetime string `json:"update_time"`
}

type WorkerConfigData

type WorkerConfigData struct {
	APIConfig    *conf.API    `json:"api,omitempty"`
	LLMAPIConfig *conf.LLMAPI `json:"llmapi,omitempty"`
	ProxyConfig  *conf.Proxy  `json:"proxy,omitempty"`
}

type WorkerController

type WorkerController struct {
	BaseController
}

func (*WorkerController) EditWorkerAction

func (c *WorkerController) EditWorkerAction()

EditWorkerAction 更改worker

func (*WorkerController) IndexAction

func (c *WorkerController) IndexAction()

func (*WorkerController) ListAction

func (c *WorkerController) ListAction()

ListAction 列表的数据

func (*WorkerController) ManualInitWorkerAction added in v3.1.0

func (c *WorkerController) ManualInitWorkerAction()

func (*WorkerController) ManualReloadWorkerAction

func (c *WorkerController) ManualReloadWorkerAction()

func (*WorkerController) ManualStopWorkerAction added in v3.1.3

func (c *WorkerController) ManualStopWorkerAction()

func (*WorkerController) ManualSyncWorkerAction added in v3.1.0

func (c *WorkerController) ManualSyncWorkerAction()

func (*WorkerController) ManualUpdateWorkerAction added in v3.1.0

func (c *WorkerController) ManualUpdateWorkerAction()

type WorkerStatusData

type WorkerStatusData struct {
	Index                    int    `json:"index"`
	WorkName                 string `json:"worker_name"`
	WorkerTopic              string `json:"worker_topic"`
	CreateTime               string `json:"create_time"`
	UpdateTime               string `json:"update_time"`
	TaskExecutedNumber       int    `json:"task_number"`
	TaskStartedNumber        int    `json:"started_number"`
	CPULoad                  string `json:"cpu_load"`
	MemUsage                 string `json:"mem_used"`
	EnableManualReloadFlag   bool   `json:"enable_manual_reload_flag"`
	EnableManualFileSyncFlag bool   `json:"enable_manual_file_sync_flag"`
	HeartColor               string `json:"heart_color"`
	IsDaemonProcess          bool   `json:"daemon_process"`
	IsIPv6Support            bool   `json:"ipv6"`
}

type WorkspaceController

type WorkspaceController struct {
	BaseController
}

func (*WorkspaceController) AddIndexAction

func (c *WorkspaceController) AddIndexAction()

AddIndexAction 新增页面显示

func (*WorkspaceController) DeleteAction

func (c *WorkspaceController) DeleteAction()

DeleteAction 删除一条记录

func (*WorkspaceController) EditIndexAction

func (c *WorkspaceController) EditIndexAction()

func (*WorkspaceController) GetAction

func (c *WorkspaceController) GetAction()

GetAction 根据ID获取一个记录

func (*WorkspaceController) IndexAction

func (c *WorkspaceController) IndexAction()

IndexAction 显示列表页面

func (*WorkspaceController) ListAction

func (c *WorkspaceController) ListAction()

ListAction 获取列表显示的数据

func (*WorkspaceController) SaveAction

func (c *WorkspaceController) SaveAction()

SaveAction 更新一个记录

type WorkspaceData

type WorkspaceData struct {
	Id                   string `json:"id" form:"id"`
	Index                int    `json:"index" form:"-"`
	WorkspaceName        string `json:"workspace_name" form:"workspace_name"`
	WorkspaceId          string `json:"workspace_id" form:"workspace_id"`
	WorkspaceDescription string `json:"workspace_description" form:"workspace_description"`
	Status               string `json:"status" form:"status"`
	SortNumber           int    `json:"sort_number" form:"sort_number"`
	Notify               string `json:"notify" form:"notify"`

	CreateDatetime string `json:"create_time" form:"-"`
	UpdateDatetime string `json:"update_time" form:"-"`
}

type WorkspaceInfo

type WorkspaceInfo struct {
	WorkspaceInfoList []WorkspaceInfoData
	CurrentWorkspace  string
}

type WorkspaceInfoData

type WorkspaceInfoData struct {
	WorkspaceId   string `json:"workspace_id"`
	WorkspaceName string `json:"workspace_name"`
	Enable        bool   `json:"enable"`
}

type WorkspaceList

type WorkspaceList struct {
	Name        string `json:"name"`
	WorkspaceId string `json:"id"`
}

func GetSuperAdminDefaultWorkspaceList

func GetSuperAdminDefaultWorkspaceList() (workspaceList []WorkspaceList)

func GetUserAvailableWorkspaceList

func GetUserAvailableWorkspaceList(userName string) (workspaceList []WorkspaceList)

Jump to

Keyboard shortcuts

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