Documentation
¶
Index ¶
- Constants
- type DangerousPattern
- type Direction
- type MySQLParser
- func (p *MySQLParser) DetectRisk(event *audit.OperationEvent) RiskLevel
- func (p *MySQLParser) GetBufferSize() int
- func (p *MySQLParser) Parse(ctx context.Context, data []byte, direction Direction, sessionID string) (*ParseResult, error)
- func (p *MySQLParser) Reset()
- func (p *MySQLParser) ShouldBlock(event *audit.OperationEvent) bool
- type ParseResult
- type RiskLevel
Constants ¶
View Source
const ( DirectionClientToServer = proxy.DirectionClientToServer DirectionServerToClient = proxy.DirectionServerToClient RiskLevelCritical = proxy.RiskLevelCritical RiskLevelHigh = proxy.RiskLevelHigh RiskLevelMedium = proxy.RiskLevelMedium RiskLevelLow = proxy.RiskLevelLow RiskLevelNone = proxy.RiskLevelNone )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DangerousPattern ¶
DangerousPattern 危险 SQL 模式
type MySQLParser ¶
type MySQLParser struct {
// contains filtered or unexported fields
}
MySQLParser MySQL 协议解析器
func (*MySQLParser) DetectRisk ¶
func (p *MySQLParser) DetectRisk(event *audit.OperationEvent) RiskLevel
DetectRisk 检测 SQL 风险
func (*MySQLParser) Parse ¶
func (p *MySQLParser) Parse(ctx context.Context, data []byte, direction Direction, sessionID string) (*ParseResult, error)
Parse 解析 MySQL 数据包
func (*MySQLParser) ShouldBlock ¶
func (p *MySQLParser) ShouldBlock(event *audit.OperationEvent) bool
ShouldBlock 判断是否需要阻断
type ParseResult ¶
type ParseResult = proxy.ParseResult
Click to show internal directories.
Click to hide internal directories.