checker

package
v0.1.27 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckResult

type CheckResult struct {
	Name        string        // 检查名称
	Description string        // 检查描述
	Severity    CheckSeverity // 严重性级别
	Passed      bool          // 是否通过
	Details     string        // 详细信息
	Suggestion  string        // 建议
}

CheckResult 检查结果

type CheckSeverity

type CheckSeverity int

CheckSeverity 检查严重性级别

const (
	SeverityInfo CheckSeverity = iota
	SeverityLow
	SeverityMedium
	SeverityHigh
	SeverityCritical
)

func (CheckSeverity) String

func (s CheckSeverity) String() string

String returns string representation of severity

type SecurityChecker

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

SecurityChecker 安全检查器

func NewSecurityChecker

func NewSecurityChecker() *SecurityChecker

NewSecurityChecker 创建新的安全检查器

func (*SecurityChecker) GetLevel

func (c *SecurityChecker) GetLevel() string

GetLevel 获取安全级别描述

func (*SecurityChecker) GetScore

func (c *SecurityChecker) GetScore() int

GetScore 获取安全评分(0-100)

func (*SecurityChecker) GetSummary

func (c *SecurityChecker) GetSummary() string

GetSummary 获取安全检查摘要

func (*SecurityChecker) RunCheck

func (c *SecurityChecker) RunCheck(name string) (CheckResult, bool)

RunCheck 运行特定名称的检查

func (*SecurityChecker) RunChecks

func (c *SecurityChecker) RunChecks() []CheckResult

RunChecks 运行所有安全检查

Jump to

Keyboard shortcuts

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