operatorsForTarget function
Operators that make sense for target in the editor UI.
Implementation
List<InfospectBreakpointMatchOp> operatorsForTarget(
InfospectBreakpointMatchTarget target,
) {
return switch (target) {
InfospectBreakpointMatchTarget.responseStatus => const [
InfospectBreakpointMatchOp.equals,
InfospectBreakpointMatchOp.inRange,
],
InfospectBreakpointMatchTarget.requestBodyText ||
InfospectBreakpointMatchTarget.responseBodyText =>
const [
InfospectBreakpointMatchOp.contains,
InfospectBreakpointMatchOp.equals,
],
InfospectBreakpointMatchTarget.queryParam ||
InfospectBreakpointMatchTarget.requestHeader ||
InfospectBreakpointMatchTarget.requestBodyJson ||
InfospectBreakpointMatchTarget.responseBodyJson =>
const [
InfospectBreakpointMatchOp.exists,
InfospectBreakpointMatchOp.equals,
InfospectBreakpointMatchOp.contains,
],
};
}