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

Interface Library

cel/library.go:55–63  ·  view source on GitHub ↗

Library provides a collection of EnvOption and ProgramOption values used to configure a CEL environment for a particular use case or with a related set of functionality. Note, the ProgramOption values provided by a library are expected to be static and not vary between calls to Env.Program(). If th

Source from the content-addressed store, hash-verified

53// between calls to Env.Program(). If there is a need for such dynamic configuration, prefer to
54// configure these options outside the Library and within the Env.Program() call directly.
55type Library interface {
56 // CompileOptions returns a collection of functional options for configuring the Parse / Check
57 // environment.
58 CompileOptions() []EnvOption
59
60 // ProgramOptions returns a collection of functional options which should be included in every
61 // Program generated from the Env.Program() call.
62 ProgramOptions() []ProgramOption
63}
64
65// SingletonLibrary refines the Library interface to ensure that libraries in this format are only
66// configured once within the environment.

Callers 2

LibFunction · 0.65
LibFunction · 0.65

Implementers 15

stringLibext/strings.go
celBindingsext/bindings.go
setsLibext/sets.go
compreV2Libext/comprehensions.go
listsLibext/lists.go
mathLibext/math.go
protoLibext/protos.go
encoderLibext/encoders.go
regexLibext/regex.go
networkLibext/network.go
stdLibrarycel/library.go
optionalLibcel/library.go

Calls

no outgoing calls

Tested by

no test coverage detected