| 75 | } |
| 76 | |
| 77 | absl::StatusOr<std::string> EncodeDurationToString(absl::Duration duration) { |
| 78 | google::protobuf::Duration d; |
| 79 | auto status = EncodeDuration(duration, &d); |
| 80 | if (!status.ok()) { |
| 81 | return status; |
| 82 | } |
| 83 | return google::protobuf::util::TimeUtil::ToString(d); |
| 84 | } |
| 85 | |
| 86 | absl::Status EncodeTime(absl::Time time, google::protobuf::Timestamp* proto) { |
| 87 | CEL_RETURN_IF_ERROR(Validate(time)); |
no test coverage detected