MCPcopy Create free account
hub / github.com/cel-expr/cel-go / ProgramOptions

Method ProgramOptions

ext/encoders.go:130–141  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

128}
129
130func (lib *encoderLib) ProgramOptions() []cel.ProgramOption {
131 var opts []cel.ProgramOption
132 if lib.version >= 1 {
133 trackers := []interpreter.CostTrackerOption{
134 interpreter.OverloadCostTracker("base64_decode_string", trackDecode),
135 interpreter.OverloadCostTracker("base64_encode_bytes", trackEncode),
136 interpreter.OverloadCostTracker("json_encode_dyn", trackJSONEncode),
137 }
138 opts = append(opts, cel.CostTrackerOptions(trackers...))
139 }
140 return opts
141}
142
143func base64DecodeString(str string) ([]byte, error) {
144 b, err := base64.StdEncoding.DecodeString(str)

Callers

nothing calls this directly

Calls 2

OverloadCostTrackerFunction · 0.92
CostTrackerOptionsFunction · 0.92

Tested by

no test coverage detected