playwrighttianqing

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alert

type Alert struct {
	AlertID    string `json:"alertId"`    // 告警ID
	AlertTime  string `json:"alertTime"`  // 告警时间 (改用string接收避免格式解析异常)
	AlertType  string `json:"alertType"`  // 告警类型
	AlertDesc  string `json:"alertDesc"`  // 告警描述
	ClientIP   string `json:"clientIp"`   // 客户端IP
	ClientName string `json:"clientName"` // 客户端名称
	ClientMac  string `json:"clientMac"`  // 客户端MAC地址
	OSVersion  string `json:"osVersion"`  // 操作系统版本
	GroupName  string `json:"groupName"`  // 资产分组名称
	Severity   string `json:"severity"`   // 威胁级别 (可能是数字或者字符串)
	Status     string `json:"status"`     // 状态 (New/Investigating/Resolved)
	AlertName  string `json:"alertName"`  // 告警名称
}

Alert represents the alert data structure

type AlertDetail

type AlertDetail struct {
	BasicInfo      map[string]string `json:"basicInfo"`
	AlertDetails   map[string]string `json:"alertDetails"`
	ProcessDetails map[string]string `json:"processDetails"`
	ExecuteCommand string            `json:"executeCommand"`
	Error          string            `json:"error,omitempty"`
}

type AlertsResponse

type AlertsResponse struct {
	Total  int     `json:"total"`  // 总告警数量
	Pages  int     `json:"pages"`  // 总页数
	Alerts []Alert `json:"alerts"` // 告警列表
}

AlertsResponse is the full response from the script

type AssetsResponse

type AssetsResponse struct {
	Total  int                      `json:"total"`
	Pages  int                      `json:"pages"`
	Assets []map[string]interface{} `json:"assets"`
}

type PlaywrightTianqing

type PlaywrightTianqing struct {
	// contains filtered or unexported fields
}

func NewPlaywrightTianqing

func NewPlaywrightTianqing() (*PlaywrightTianqing, error)

func (*PlaywrightTianqing) Close added in v0.0.2

func (pt *PlaywrightTianqing) Close()

func (*PlaywrightTianqing) GetAlertDetails

func (pt *PlaywrightTianqing) GetAlertDetails(alertid string) (*AlertDetail, error)

func (*PlaywrightTianqing) GetAlerts

func (pt *PlaywrightTianqing) GetAlerts() (*AlertsResponse, error)

func (*PlaywrightTianqing) GetAssets

func (pt *PlaywrightTianqing) GetAssets() (*AssetsResponse, error)

func (*PlaywrightTianqing) Login

func (pt *PlaywrightTianqing) Login()

func (*PlaywrightTianqing) Query

func (pt *PlaywrightTianqing) Query(query string) (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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