Documentation
¶
Index ¶
- Variables
- func BotEnvironment() (*cel.Env, error)
- func Compile(env *cel.Env, src string) (cel.Program, error)
- func Load1() float64
- func Load5() float64
- func Load15() float64
- func New(opts ...cel.EnvOption) (*cel.Env, error)
- func ThresholdEnvironment() (*cel.Env, error)
- type HTTPHeaders
- func (h HTTPHeaders) Contains(key ref.Val) ref.Val
- func (h HTTPHeaders) ConvertToNative(typeDesc reflect.Type) (any, error)
- func (h HTTPHeaders) ConvertToType(typeVal ref.Type) ref.Val
- func (h HTTPHeaders) Equal(other ref.Val) ref.Val
- func (h HTTPHeaders) Find(key ref.Val) (ref.Val, bool)
- func (h HTTPHeaders) Get(key ref.Val) ref.Val
- func (h HTTPHeaders) IsZeroValue() bool
- func (h HTTPHeaders) Iterator() traits.Iterator
- func (h HTTPHeaders) Size() ref.Val
- func (h HTTPHeaders) Type() ref.Type
- func (h HTTPHeaders) Value() any
- type URLValues
- func (u URLValues) Contains(key ref.Val) ref.Val
- func (u URLValues) ConvertToNative(typeDesc reflect.Type) (any, error)
- func (u URLValues) ConvertToType(typeVal ref.Type) ref.Val
- func (u URLValues) Equal(other ref.Val) ref.Val
- func (u URLValues) Find(key ref.Val) (ref.Val, bool)
- func (u URLValues) Get(key ref.Val) ref.Val
- func (u URLValues) IsZeroValue() bool
- func (u URLValues) Iterator() traits.Iterator
- func (u URLValues) Size() ref.Val
- func (u URLValues) Type() ref.Type
- func (u URLValues) Value() any
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotImplemented = errors.New("expressions: not implemented")
Functions ¶
func BotEnvironment ¶ added in v1.20.0
BotEnvironment creates a new CEL environment, this is the set of variables and functions that are passed into the CEL scope so that Anubis can fail loudly and early when something is invalid instead of blowing up at runtime.
func Compile ¶
Compile takes CEL environment and syntax tree then emits an optimized Program for execution.
func ThresholdEnvironment ¶ added in v1.20.0
NewThreshold creates a new CEL environment for threshold checking.
Types ¶
type HTTPHeaders ¶
HTTPHeaders is a type wrapper to expose HTTP headers into CEL programs.
func (HTTPHeaders) ConvertToNative ¶
func (h HTTPHeaders) ConvertToNative(typeDesc reflect.Type) (any, error)
func (HTTPHeaders) ConvertToType ¶
func (h HTTPHeaders) ConvertToType(typeVal ref.Type) ref.Val
func (HTTPHeaders) IsZeroValue ¶
func (h HTTPHeaders) IsZeroValue() bool
func (HTTPHeaders) Iterator ¶
func (h HTTPHeaders) Iterator() traits.Iterator
func (HTTPHeaders) Size ¶
func (h HTTPHeaders) Size() ref.Val
func (HTTPHeaders) Type ¶
func (h HTTPHeaders) Type() ref.Type
func (HTTPHeaders) Value ¶
func (h HTTPHeaders) Value() any
type URLValues ¶
URLValues is a type wrapper to expose url.Values into CEL programs.
func (URLValues) ConvertToNative ¶
func (URLValues) IsZeroValue ¶
Click to show internal directories.
Click to hide internal directories.