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

Method ProgramOptions

ext/encoders.go:129–140  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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