package com.vincent.rsf.httpaudit.model; import lombok.Value; /** * 是否写入审计及规则上的请求/响应截断(-1 全量,null 用 yml 默认) */ @Value public class HttpAuditDecision { public static final HttpAuditDecision SKIP = new HttpAuditDecision(false, null, null); /** 是否写入审计表 */ boolean audit; /** 请求体入库最大字符,-1 不截断 */ Integer requestMaxChars; /** 响应体入库最大字符,-1 不截断 */ Integer responseMaxChars; public static HttpAuditDecision yes(Integer requestMaxChars, Integer responseMaxChars) { return new HttpAuditDecision(true, requestMaxChars, responseMaxChars); } }