(ag *identity.AgentIdentity)
| 79 | } |
| 80 | |
| 81 | func protectionViewFromIdentity(ag *identity.AgentIdentity) ProtectionConfigView { |
| 82 | return ProtectionConfigView{ |
| 83 | Inbound: ProtectionDirectionView{ |
| 84 | Gate: ProtectionGateView{Policy: ag.InboundPolicy, Allowlist: orEmpty(ag.InboundAllowlist), Action: ag.InboundPolicyAction}, |
| 85 | Scan: ProtectionScanView{Sensitivity: ag.InboundScanSensitivity}, |
| 86 | }, |
| 87 | Outbound: ProtectionDirectionView{ |
| 88 | Gate: ProtectionGateView{Policy: ag.OutboundPolicy, Allowlist: orEmpty(ag.OutboundAllowlist), Action: ag.OutboundPolicyAction}, |
| 89 | Scan: ProtectionScanView{Sensitivity: ag.OutboundScanSensitivity}, |
| 90 | }, |
| 91 | Holds: ProtectionHoldsView{TTLSeconds: ag.HITLTTLSeconds, OnExpiry: ag.HITLExpirationAction}, |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | func protectionConfigFromView(v ProtectionConfigView) identity.ProtectionConfig { |
| 96 | return identity.ProtectionConfig{ |
no test coverage detected