(reasons []*v1pb.MaskingReason)
| 770 | } |
| 771 | |
| 772 | func redactMaskingReasons(reasons []*v1pb.MaskingReason) []*v1pb.MaskingReason { |
| 773 | if reasons == nil { |
| 774 | return nil |
| 775 | } |
| 776 | var redacted []*v1pb.MaskingReason |
| 777 | for _, reason := range reasons { |
| 778 | if reason == nil { |
| 779 | redacted = append(redacted, nil) |
| 780 | continue |
| 781 | } |
| 782 | redacted = append(redacted, &v1pb.MaskingReason{ |
| 783 | SemanticTypeId: reason.SemanticTypeId, |
| 784 | SemanticTypeTitle: reason.SemanticTypeTitle, |
| 785 | MaskingRuleId: reason.MaskingRuleId, |
| 786 | Algorithm: reason.Algorithm, |
| 787 | Context: reason.Context, |
| 788 | ClassificationLevel: reason.ClassificationLevel, |
| 789 | // Omit SemanticTypeIcon to avoid polluting audit logs with base64 data |
| 790 | }) |
| 791 | } |
| 792 | return redacted |
| 793 | } |
| 794 | |
| 795 | func redactLoginResponse(r *v1pb.LoginResponse) *v1pb.LoginResponse { |
| 796 | if r == nil { |
no outgoing calls
no test coverage detected