MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / Validate

Function Validate

internal/proto_time_encoding.cc:32–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30namespace {
31
32absl::Status Validate(absl::Time time) {
33 if (time < cel::internal::MinTimestamp()) {
34 return absl::InvalidArgumentError("time below min");
35 }
36
37 if (time > cel::internal::MaxTimestamp()) {
38 return absl::InvalidArgumentError("time above max");
39 }
40 return absl::OkStatus();
41}
42
43absl::Status CelValidateDuration(absl::Duration duration) {
44 if (duration < cel::internal::MinDuration()) {

Callers 2

EncodeTimeFunction · 0.85

Calls 2

MinTimestampFunction · 0.85
MaxTimestampFunction · 0.85

Tested by

no test coverage detected