CompileOptions implements the Library interface method.
()
| 104 | |
| 105 | // CompileOptions implements the Library interface method. |
| 106 | func (setsLib) CompileOptions() []cel.EnvOption { |
| 107 | listType := cel.ListType(cel.TypeParamType("T")) |
| 108 | return []cel.EnvOption{ |
| 109 | cel.Function("sets.contains", |
| 110 | cel.Overload("list_sets_contains_list", []*cel.Type{listType, listType}, cel.BoolType, |
| 111 | cel.BinaryBinding(setsContains))), |
| 112 | cel.Function("sets.equivalent", |
| 113 | cel.Overload("list_sets_equivalent_list", []*cel.Type{listType, listType}, cel.BoolType, |
| 114 | cel.BinaryBinding(setsEquivalent))), |
| 115 | cel.Function("sets.intersects", |
| 116 | cel.Overload("list_sets_intersects_list", []*cel.Type{listType, listType}, cel.BoolType, |
| 117 | cel.BinaryBinding(setsIntersects))), |
| 118 | cel.CostModel( |
| 119 | setsCostModel("list_sets_contains_list", 1), |
| 120 | setsCostModel("list_sets_equivalent_list", 2), |
| 121 | setsCostModel("list_sets_intersects_list", 1), |
| 122 | ), |
| 123 | } |
| 124 | } |
| 125 | |
| 126 | // ProgramOptions implements the Library interface method. |
| 127 | func (setsLib) ProgramOptions() []cel.ProgramOption { |
nothing calls this directly
no test coverage detected