CINXE.COM

library package - k8s.io/apiserver/pkg/cel/library - Go Packages

<!DOCTYPE html> <html lang="en" data-layout="responsive" data-local=""> <head> <script> window.addEventListener('error', window.__err=function f(e){f.p=f.p||[];f.p.push(e)}); </script> <script> (function() { const theme = document.cookie.match(/prefers-color-scheme=(light|dark|auto)/)?.[1] if (theme) { document.querySelector('html').setAttribute('data-theme', theme); } }()) </script> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta class="js-gtmID" data-gtmid="GTM-W8MVQXG"> <link rel="shortcut icon" href="/static/shared/icon/favicon.ico"> <link rel="canonical" href="https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library"> <link href="/static/frontend/frontend.min.css?version=prod-frontend-00090-vzc" rel="stylesheet"> <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Go Packages"> <title>library package - k8s.io/apiserver/pkg/cel/library - Go Packages</title> <link href="/static/frontend/unit/unit.min.css?version=prod-frontend-00090-vzc" rel="stylesheet"> <link href="/static/frontend/unit/main/main.min.css?version=prod-frontend-00090-vzc" rel="stylesheet"> </head> <body> <script> function loadScript(src, mod = true) { let s = document.createElement('script'); s.src = src; if (mod) { s.type = 'module'; s.async = true; s.defer = true } document.head.appendChild(s); } loadScript("/third_party/dialog-polyfill/dialog-polyfill.js", false) loadScript("/static/frontend/frontend.js"); </script> <header class="go-Header go-Header--full js-siteHeader"> <div class="go-Header-inner go-Header-inner--dark"> <nav class="go-Header-nav"> <a href="https://go.dev/" class="js-headerLogo" data-gtmc="nav link" data-test-id="go-header-logo-link" role="heading" aria-level="1"> <img class="go-Header-logo" src="/static/shared/logo/go-white.svg" alt="Go"> </a> <div class="skip-navigation-wrapper"> <a class="skip-to-content-link" aria-label="Skip to main content" href="#main-content"> Skip to Main Content </a> </div> <div class="go-Header-rightContent"> <div class="go-SearchForm js-searchForm"> <form class="go-InputGroup go-ShortcutKey go-SearchForm-form" action="/search" data-shortcut="/" data-shortcut-alt="search" data-gtmc="search form" aria-label="Search for a package" role="search" > <input name="q" class="go-Input js-searchFocus" aria-label="Search for a package" type="search" autocapitalize="off" autocomplete="off" autocorrect="off" spellcheck="false" placeholder="Search packages or symbols" value="" /> <input name="m" value="" hidden> <button class="go-Button go-Button--inverted" aria-label="Submit search"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/search_gm_grey_24dp.svg" alt="" /> </button> </form> <button class="go-SearchForm-expandSearch js-expandSearch" data-gtmc="nav button" aria-label="Open search" data-test-id="expand-search"> <img class="go-Icon go-Icon--inverted" height="24" width="24" src="/static/shared/icon/search_gm_grey_24dp.svg" alt=""> </button> </div> <ul class="go-Header-menu"> <li class="go-Header-menuItem"> <a class="js-desktop-menu-hover" href="#" data-gtmc="nav link"> Why Go <img class="go-Icon" height="24" width="24" src="/static/shared/icon/arrow_drop_down_gm_grey_24dp.svg" alt="submenu dropdown icon"> </a> <ul class="go-Header-submenu go-Header-submenu--why js-desktop-submenu-hover" aria-label="submenu"> <li class="go-Header-submenuItem"> <div> <a href="https://go.dev/solutions#case-studies"> </span>Case Studies</span> </a> </div> <p>Common problems companies solve with Go</p> </li> <li class="go-Header-submenuItem"> <div> <a href="https://go.dev/solutions#use-cases"> </span>Use Cases</span> </a> </div> <p>Stories about how and why companies use Go</p> </li> <li class="go-Header-submenuItem"> <div> <a href="https://go.dev/security/policy/"> </span>Security Policy</span> </a> </div> <p>How Go can help keep you secure by default</p> </li> </ul> </li> <li class="go-Header-menuItem"> <a href="https://go.dev/learn/" data-gtmc="nav link">Learn</a> </li> <li class="go-Header-menuItem"> <a class="js-desktop-menu-hover" href="#" data-gtmc="nav link"> Docs <img class="go-Icon" height="24" width="24" src="/static/shared/icon/arrow_drop_down_gm_grey_24dp.svg" alt="submenu dropdown icon"> </a> <ul class="go-Header-submenu go-Header-submenu--docs js-desktop-submenu-hover" aria-label="submenu"> <li class="go-Header-submenuItem"> <div> <a href="https://go.dev/doc/effective_go"> <span>Effective Go</span> </a> </div> <p>Tips for writing clear, performant, and idiomatic Go code</p> </li> <li class="go-Header-submenuItem"> <div> <a href="https://go.dev/doc/"> <span>Go User Manual</span> </a> </div> <p>A complete introduction to building software with Go</p> </li> <li class="go-Header-submenuItem"> <div> <a href="https://pkg.go.dev/std"> <span>Standard library</span> </a> </div> <p>Reference documentation for Go's standard library</p> </li> <li class="go-Header-submenuItem"> <div> <a href="https://go.dev/doc/devel/release"> <span>Release Notes</span> </a> </div> <p>Learn what's new in each Go release</p> </li> </ul> </li> <li class="go-Header-menuItem go-Header-menuItem--active"> <a href="/" data-gtmc="nav link">Packages</a> </li> <li class="go-Header-menuItem"> <a class="js-desktop-menu-hover" href="#" data-gtmc="nav link"> Community <img class="go-Icon" height="24" width="24" src="/static/shared/icon/arrow_drop_down_gm_grey_24dp.svg" alt="submenu dropdown icon"> </a> <ul class="go-Header-submenu go-Header-submenu--community js-desktop-submenu-hover" aria-label="submenu"> <li class="go-Header-submenuItem"> <div> <a href="https://go.dev/talks/"> <span>Recorded Talks</span> </a> </div> <p>Videos from prior events</p> </li> <li class="go-Header-submenuItem"> <div> <a href="https://www.meetup.com/pro/go"> <span>Meetups</span> <i class="material-icons"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/launch_gm_grey_24dp.svg" alt=""> </i> </a> </div> <p>Meet other local Go developers</p> </li> <li class="go-Header-submenuItem"> <div> <a href="https://github.com/golang/go/wiki/Conferences"> <span>Conferences</span> <i class="material-icons"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/launch_gm_grey_24dp.svg" alt=""> </i> </a> </div> <p>Learn and network with Go developers from around the world</p> </li> <li class="go-Header-submenuItem"> <div> <a href="https://go.dev/blog"> <span>Go blog</span> </a> </div> <p>The Go project's official blog.</p> </li> <li class="go-Header-submenuItem"> <div> <a href="https://go.dev/help"> <span>Go project</span> </a> </div> <p>Get help and stay informed from Go</p> </li> <li class="go-Header-submenuItem"> <div> Get connected </div> <p></p> <div class="go-Header-socialIcons"> <a class="go-Header-socialIcon" aria-label="Get connected with google-groups (Opens in new window)" href="https://groups.google.com/g/golang-nuts" ><img src="/static/shared/logo/social/google-groups.svg" /></a> <a class="go-Header-socialIcon" aria-label="Get connected with github (Opens in new window)" href="https://github.com/golang"><img src="/static/shared/logo/social/github.svg" /></a> <a class="go-Header-socialIcon" aria-label="Get connected with twitter (Opens in new window)" href="https://twitter.com/golang"><img src="/static/shared/logo/social/twitter.svg" /></a> <a class="go-Header-socialIcon" aria-label="Get connected with reddit (Opens in new window)" href="https://www.reddit.com/r/golang/"><img src="/static/shared/logo/social/reddit.svg" /></a> <a class="go-Header-socialIcon" aria-label="Get connected with slack (Opens in new window)" href="https://invite.slack.golangbridge.org/"><img src="/static/shared/logo/social/slack.svg" /></a> <a class="go-Header-socialIcon" aria-label="Get connected with stack-overflow (Opens in new window)" href="https://stackoverflow.com/collectives/go"><img src="/static/shared/logo/social/stack-overflow.svg" /></a> </div> </li> </ul> </li> </ul> <button class="go-Header-navOpen js-headerMenuButton go-Header-navOpen--white" data-gtmc="nav button" aria-label="Open navigation"> </button> </div> </nav> </div> </header> <aside class="go-NavigationDrawer js-header"> <nav class="go-NavigationDrawer-nav"> <div class="go-NavigationDrawer-header"> <a href="https://go.dev/"> <img class="go-NavigationDrawer-logo" src="/static/shared/logo/go-blue.svg" alt="Go."> </a> </div> <ul class="go-NavigationDrawer-list"> <li class="go-NavigationDrawer-listItem js-mobile-subnav-trigger go-NavigationDrawer-hasSubnav"> <a href="#"> <span>Why Go</span> <i class="material-icons"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/navigate_next_gm_grey_24dp.svg" alt=""> </i> </a> <div class="go-NavigationDrawer go-NavigationDrawer-submenuItem"> <div class="go-NavigationDrawer-nav"> <div class="go-NavigationDrawer-header"> <a href="#"> <i class="material-icons"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/navigate_before_gm_grey_24dp.svg" alt=""> </i> Why Go </a> </div> <ul class="go-NavigationDrawer-list"> <li class="go-NavigationDrawer-listItem"> <a href="https://go.dev/solutions#case-studies"> Case Studies </a> </li> <li class="go-NavigationDrawer-listItem"> <a href="https://go.dev/solutions#use-cases"> Use Cases </a> </li> <li class="go-NavigationDrawer-listItem"> <a href="https://go.dev/security/policy/"> Security Policy </a> </li> </ul> </div> </div> </li> <li class="go-NavigationDrawer-listItem"> <a href="https://go.dev/learn/">Learn</a> </li> <li class="go-NavigationDrawer-listItem js-mobile-subnav-trigger go-NavigationDrawer-hasSubnav"> <a href="#"> <span>Docs</span> <i class="material-icons"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/navigate_next_gm_grey_24dp.svg" alt=""> </i> </a> <div class="go-NavigationDrawer go-NavigationDrawer-submenuItem"> <div class="go-NavigationDrawer-nav"> <div class="go-NavigationDrawer-header"> <a href="#"><i class="material-icons"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/navigate_before_gm_grey_24dp.svg" alt=""> </i> Docs </a> </div> <ul class="go-NavigationDrawer-list"> <li class="go-NavigationDrawer-listItem"> <a href="https://go.dev/doc/effective_go"> Effective Go </a> </li> <li class="go-NavigationDrawer-listItem"> <a href="https://go.dev/doc/"> Go User Manual </a> </li> <li class="go-NavigationDrawer-listItem"> <a href="https://pkg.go.dev/std"> Standard library </a> </li> <li class="go-NavigationDrawer-listItem"> <a href="https://go.dev/doc/devel/release"> Release Notes </a> </li> </ul> </div> </div> </li> <li class="go-NavigationDrawer-listItem go-NavigationDrawer-listItem--active"> <a href="/">Packages</a> </li> <li class="go-NavigationDrawer-listItem js-mobile-subnav-trigger go-NavigationDrawer-hasSubnav"> <a href="#"> <span>Community</span> <i class="material-icons"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/navigate_next_gm_grey_24dp.svg" alt=""> </i> </a> <div class="go-NavigationDrawer go-NavigationDrawer-submenuItem"> <div class="go-NavigationDrawer-nav"> <div class="go-NavigationDrawer-header"> <a href="#"> <i class="material-icons"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/navigate_before_gm_grey_24dp.svg" alt=""> </i> Community </a> </div> <ul class="go-NavigationDrawer-list"> <li class="go-NavigationDrawer-listItem"> <a href="https://go.dev/talks/"> Recorded Talks </a> </li> <li class="go-NavigationDrawer-listItem"> <a href="https://www.meetup.com/pro/go"> Meetups <i class="material-icons"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/launch_gm_grey_24dp.svg" alt=""> </i> </a> </li> <li class="go-NavigationDrawer-listItem"> <a href="https://github.com/golang/go/wiki/Conferences"> Conferences <i class="material-icons"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/launch_gm_grey_24dp.svg" alt=""> </i> </a> </li> <li class="go-NavigationDrawer-listItem"> <a href="https://go.dev/blog"> Go blog </a> </li> <li class="go-NavigationDrawer-listItem"> <a href="https://go.dev/help"> Go project </a> </li> <li class="go-NavigationDrawer-listItem"> <div>Get connected</div> <div class="go-Header-socialIcons"> <a class="go-Header-socialIcon" href="https://groups.google.com/g/golang-nuts"><img src="/static/shared/logo/social/google-groups.svg" /></a> <a class="go-Header-socialIcon" href="https://github.com/golang"><img src="/static/shared/logo/social/github.svg" /></a> <a class="go-Header-socialIcon" href="https://twitter.com/golang"><img src="/static/shared/logo/social/twitter.svg" /></a> <a class="go-Header-socialIcon" href="https://www.reddit.com/r/golang/"><img src="/static/shared/logo/social/reddit.svg" /></a> <a class="go-Header-socialIcon" href="https://invite.slack.golangbridge.org/"><img src="/static/shared/logo/social/slack.svg" /></a> <a class="go-Header-socialIcon" href="https://stackoverflow.com/collectives/go"><img src="/static/shared/logo/social/stack-overflow.svg" /></a> </div> </li> </ul> </div> </div> </li> </ul> </nav> </aside> <div class="go-NavigationDrawer-scrim js-scrim" role="presentation"></div> <main class="go-Main" id="main-content"> <div class="go-Main-banner" role="alert"></div> <header class="go-Main-header js-mainHeader"> <nav class="go-Main-headerBreadcrumb go-Breadcrumb" aria-label="Breadcrumb" data-test-id="UnitHeader-breadcrumb"> <ol> <li data-test-id="UnitHeader-breadcrumbItem"> <a href="/" data-gtmc="breadcrumb link">Discover Packages</a> </li> <li data-test-id="UnitHeader-breadcrumbItem"> <a href="/k8s.io/apiserver" data-gtmc="breadcrumb link">k8s.io/apiserver</a> </li> <li data-test-id="UnitHeader-breadcrumbItem"> <a href="/k8s.io/apiserver/pkg" data-gtmc="breadcrumb link">pkg</a> </li> <li data-test-id="UnitHeader-breadcrumbItem"> <a href="/k8s.io/apiserver/pkg/cel" data-gtmc="breadcrumb link">cel</a> </li> <li> <a href="/k8s.io/apiserver@v0.31.3/pkg/cel/library" data-gtmc="breadcrumb link" aria-current="location" data-test-id="UnitHeader-breadcrumbCurrent"> library </a> <button class="go-Button go-Button--inline go-Clipboard js-clipboard" title="Copy path to clipboard.&#10;&#10;k8s.io/apiserver/pkg/cel/library" aria-label="Copy Path to Clipboard" data-to-copy="k8s.io/apiserver/pkg/cel/library" data-gtmc="breadcrumbs button" > <img class="go-Icon go-Icon--accented" height="24" width="24" src="/static/shared/icon/content_copy_gm_grey_24dp.svg" alt="" > </button> </li> </ol> </nav> <div class="go-Main-headerContent"> <div class="go-Main-headerTitle js-stickyHeader"> <a class="go-Main-headerLogo" href="https://go.dev/" aria-hidden="true" tabindex="-1" data-gtmc="header link" aria-label="Link to Go Homepage"> <img height="78" width="207" src="/static/shared/logo/go-blue.svg" alt="Go"> </a> <h1 class="UnitHeader-titleHeading" data-test-id="UnitHeader-title">library</h1> <span class="go-Chip go-Chip--inverted">package</span> <button class="go-Button go-Button--inline go-Clipboard js-clipboard" title="Copy path to clipboard.&#10;&#10;k8s.io/apiserver/pkg/cel/library" aria-label="Copy Path to Clipboard" data-to-copy="k8s.io/apiserver/pkg/cel/library" data-gtmc="title button" tabindex="-1" > <img class="go-Icon go-Icon--accented" height="24" width="24" src="/static/shared/icon/content_copy_gm_grey_24dp.svg" alt="" /> </button> </div> <div class="go-Main-headerDetails"> <span class="go-Main-headerDetailItem" data-test-id="UnitHeader-version"> <a href="?tab=versions" aria-label="Version: v0.31.3" data-gtmc="header link" aria-describedby="version-description"> <span class="go-textSubtle" aria-hidden="true">Version: </span> v0.31.3 </a> <div class="screen-reader-only" id="version-description" hidden> Opens a new window with list of versions in this module. </div> <span class="DetailsHeader-badge--latest" data-test-id="UnitHeader-minorVersionBanner"> <span class="go-Chip DetailsHeader-span--latest">Latest</span> <span class="go-Chip DetailsHeader-span--notAtLatest"> Latest <details class="go-Tooltip js-tooltip" data-gtmc="tooltip"> <summary> <img class="go-Icon go-Icon--inverted" height="24" width="24" src="/static/shared/icon/alert_gm_grey_24dp.svg" alt="Warning"> </summary> <p>This package is not in the latest version of its module.</p> </details> </span> <a href="/k8s.io/apiserver/pkg/cel/library" aria-label="Go to Latest Version" data-gtmc="header link"> <span class="go-Chip go-Chip--alert DetailsHeader-span--goToLatest">Go to latest</span> </a> </span> </span> <span class="go-Main-headerDetailItem" data-test-id="UnitHeader-commitTime"> Published: Nov 21, 2024 </span> <span class="go-Main-headerDetailItem" data-test-id="UnitHeader-licenses"> License: <a href="/k8s.io/apiserver/pkg/cel/library?tab=licenses" data-test-id="UnitHeader-license" data-gtmc="header link" aria-describedby="license-description">Apache-2.0</a> </span> <div class="screen-reader-only" id="license-description" hidden> Opens a new window with license information. </div> <span class="go-Main-headerDetailItem" data-test-id="UnitHeader-imports"> <a href="/k8s.io/apiserver/pkg/cel/library?tab=imports" aria-label="Imports: 33" data-gtmc="header link" aria-describedby="imports-description"> <span class="go-textSubtle">Imports: </span>33 </a> </span> <div class="screen-reader-only" id="imports-description" hidden> Opens a new window with list of imports. </div> <span class="go-Main-headerDetailItem" data-test-id="UnitHeader-importedby"> <a href="/k8s.io/apiserver/pkg/cel/library?tab=importedby" aria-label="Imported By: 10" data-gtmc="header link" aria-describedby="importedby-description"> <span class="go-textSubtle">Imported by: </span>10 </a> </span> <div class="screen-reader-only" id="importedby-description" hidden> Opens a new window with list of known importers. </div> </div> <div class="UnitHeader-overflowContainer"> <svg class="UnitHeader-overflowImage" xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"> <path d="M0 0h24v24H0z" fill="none"/> <path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/> </svg> <select class="UnitHeader-overflowSelect js-selectNav" tabindex="-1"> <option value="/">Main</option> <option value="/k8s.io/apiserver/pkg/cel/library?tab=versions"> Versions </option> <option value="/k8s.io/apiserver/pkg/cel/library?tab=licenses"> Licenses </option> <option value="/k8s.io/apiserver/pkg/cel/library?tab=imports"> Imports </option> <option value="/k8s.io/apiserver/pkg/cel/library?tab=importedby"> Imported By </option> </select> </div> </div> </header> <aside class="go-Main-aside js-mainAside"> <div class="UnitMeta"> <h2 class="go-textLabel">Details</h2> <ul class="UnitMeta-details"> <li> <details class="go-Tooltip js-tooltip" data-gtmc="tooltip"> <summary class="go-textSubtle"> <img class="go-Icon go-Icon--accented"src="/static/shared/icon/check_circle_gm_grey_24dp.svg" alt="checked"height="24" width="24"> Valid <a href="https://github.com/kubernetes/apiserver/tree/v0.31.3/go.mod" target="_blank" rel="noopener">go.mod</a> file <img class="go-Icon" src="/static/shared/icon/help_gm_grey_24dp.svg" alt="" height="24" width="24"> </summary> <p> The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go. </p> </details> </li> <li> <details class="go-Tooltip js-tooltip" data-gtmc="tooltip"> <summary class="go-textSubtle"> <img class="go-Icon go-Icon--accented"src="/static/shared/icon/check_circle_gm_grey_24dp.svg" alt="checked"height="24" width="24"> Redistributable license <img class="go-Icon" src="/static/shared/icon/help_gm_grey_24dp.svg" alt="" height="24" width="24"> </summary> <p> Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed. </p> </details> </li> <li> <details class="go-Tooltip js-tooltip" data-gtmc="tooltip"> <summary class="go-textSubtle"> <img class="go-Icon go-Icon--accented"src="/static/shared/icon/check_circle_gm_grey_24dp.svg" alt="checked"height="24" width="24"> Tagged version <img class="go-Icon" src="/static/shared/icon/help_gm_grey_24dp.svg" alt="" height="24" width="24"> </summary> <p>Modules with tagged versions give importers more predictable builds.</p> </details> </li> <li> <details class="go-Tooltip js-tooltip" data-gtmc="tooltip"> <summary class="go-textSubtle"> <img class="go-Icon"src="/static/shared/icon/cancel_gm_grey_24dp.svg" alt="unchecked"height="24" width="24"> Stable version <img class="go-Icon" src="/static/shared/icon/help_gm_grey_24dp.svg" alt="" height="24" width="24"> </summary> <p>When a project reaches major version v1 it is considered stable.</p> </details> </li> <li class="UnitMeta-detailsLearn"> <a href="/about#best-practices" data-gtmc="meta link">Learn more about best practices</a> </li> </ul> <h2 class="go-textLabel">Repository</h2> <div class="UnitMeta-repo"> <a href="https://github.com/kubernetes/apiserver" title="https://github.com/kubernetes/apiserver" target="_blank" rel="noopener"> github.com/kubernetes/apiserver </a> </div> <h2 class="go-textLabel">Links</h2> <ul class="UnitMeta-links"> <li> <a href="https://deps.dev/go/k8s.io%2Fapiserver/v0.31.3" title="View this module on Open Source Insights" target="_blank" rel="noopener" data-test-id="meta-link-depsdev"> <img class="depsdev-Icon" src="/static/shared/icon/depsdev-logo.svg" alt="Open Source Insights Logo" /> Open Source Insights </a> </li> </ul> </div> </aside> <nav class="go-Main-nav go-Main-nav--sticky js-mainNav" aria-label="Outline"> <div class="go-Main-navDesktop"> <div class="UnitOutline-jumpTo"> <button class="UnitOutline-jumpToInput go-ShortcutKey js-jumpToInput" aria-controls="jump-to-modal" aria-label="Open Jump to Identifier" data-shortcut="f" data-shortcut-alt="find" data-test-id="jump-to-button" data-gtmc="outline button"> Jump to ... </button> </div> <ul class="go-Tree js-tree" role="tree" aria-label="Outline"> <li> <a href="#section-documentation" data-gtmc="outline link"> Documentation </a> <ul> <li class="DocNav-overview"> <a href="#pkg-index" data-gtmc="doc outline link"> Index </a> </li> <li class="DocNav-constants"> <a href="#pkg-constants" data-gtmc="doc outline link"> Constants </a> </li> <li class="DocNav-variables"> <a href="#pkg-variables" data-gtmc="doc outline link"> Variables </a> </li> <li class="DocNav-functions"> <a href="#pkg-functions" data-gtmc="doc outline link"> Functions </a> <ul> <li> <a href="#Authz" title="Authz()" data-gtmc="doc outline link"> Authz() </a> </li> <li> <a href="#AuthzSelectors" title="AuthzSelectors()" data-gtmc="doc outline link"> AuthzSelectors() </a> </li> <li> <a href="#CIDR" title="CIDR()" data-gtmc="doc outline link"> CIDR() </a> </li> <li> <a href="#Format" title="Format()" data-gtmc="doc outline link"> Format() </a> </li> <li> <a href="#IP" title="IP()" data-gtmc="doc outline link"> IP() </a> </li> <li> <a href="#Lists" title="Lists()" data-gtmc="doc outline link"> Lists() </a> </li> <li> <a href="#NewAuthorizerVal" title="NewAuthorizerVal(userInfo, authorizer)" data-gtmc="doc outline link"> NewAuthorizerVal(userInfo, authorizer) </a> </li> <li> <a href="#NewResourceAuthorizerVal" title="NewResourceAuthorizerVal(userInfo, authorizer, requestResource)" data-gtmc="doc outline link"> NewResourceAuthorizerVal(userInfo, authorizer, requestResource) </a> </li> <li> <a href="#Quantity" title="Quantity()" data-gtmc="doc outline link"> Quantity() </a> </li> <li> <a href="#Regex" title="Regex()" data-gtmc="doc outline link"> Regex() </a> </li> <li> <a href="#Test" title="Test(options)" data-gtmc="doc outline link"> Test(options) </a> </li> <li> <a href="#TestVersion" title="TestVersion(version)" data-gtmc="doc outline link"> TestVersion(version) </a> </li> <li> <a href="#URLs" title="URLs()" data-gtmc="doc outline link"> URLs() </a> </li> <li> <a href="#ZeroArgumentFunctionBinding" title="ZeroArgumentFunctionBinding(binding)" data-gtmc="doc outline link"> ZeroArgumentFunctionBinding(binding) </a> </li> </ul> </li> <li class="DocNav-types"> <a href="#pkg-types" data-gtmc="doc outline link"> Types </a> <ul> <li> <a href="#CostEstimator" title="type CostEstimator" data-gtmc="doc outline link"> type CostEstimator </a> <ul> <li> <a href="#CostEstimator.CallCost" title="(l) CallCost(function, overloadId, args, result)" data-gtmc="doc outline link"> (l) CallCost(function, overloadId, args, result) </a> </li> <li> <a href="#CostEstimator.EstimateCallCost" title="(l) EstimateCallCost(function, overloadId, target, args)" data-gtmc="doc outline link"> (l) EstimateCallCost(function, overloadId, target, args) </a> </li> <li> <a href="#CostEstimator.EstimateSize" title="(l) EstimateSize(element)" data-gtmc="doc outline link"> (l) EstimateSize(element) </a> </li> </ul> </li> <li> <a href="#Resource" title="type Resource" data-gtmc="doc outline link"> type Resource </a> </li> <li> <a href="#TestOption" title="type TestOption" data-gtmc="doc outline link"> type TestOption </a> </li> </ul> </li> </ul> </li> <li> <a href="#section-sourcefiles" data-gtmc="outline link"> Source Files </a> </li> </ul> </div> <div class="go-Main-navMobile js-mainNavMobile"> <label class="go-Label"> <select class="go-Select"> <option selected disabled>Documentation</option> </select> </label> </div> </nav> <article class="go-Main-article js-mainContent"> <div class="UnitDetails" data-test-id="UnitDetails" style="display: block;"> <div class="UnitDetails-content js-unitDetailsContent" data-test-id="UnitDetails-content"> <div class="UnitDoc"> <h2 class="UnitDoc-title" id="section-documentation"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/code_gm_grey_24dp.svg" alt=""> Documentation <a class="UnitDoc-idLink" href="#section-documentation" aria-label="Go to Documentation">¶</a> </h2> <div class="Documentation js-documentation"> <div class="Documentation-content js-docContent"> <section class="Documentation-index"> <h3 id="pkg-index" class="Documentation-indexHeader">Index <a href="#pkg-index" aria-label="Go to Index">¶</a></h3> <ul class="Documentation-indexList"> <li class="Documentation-indexVariables"><a href="#pkg-variables">Variables</a></li> <li class="Documentation-indexFunction"> <a href="#Authz">func Authz() cel.EnvOption</a></li> <li class="Documentation-indexFunction"> <a href="#AuthzSelectors">func AuthzSelectors() cel.EnvOption</a></li> <li class="Documentation-indexFunction"> <a href="#CIDR">func CIDR() cel.EnvOption</a></li> <li class="Documentation-indexFunction"> <a href="#Format">func Format() cel.EnvOption</a></li> <li class="Documentation-indexFunction"> <a href="#IP">func IP() cel.EnvOption</a></li> <li class="Documentation-indexFunction"> <a href="#Lists">func Lists() cel.EnvOption</a></li> <li class="Documentation-indexFunction"> <a href="#NewAuthorizerVal">func NewAuthorizerVal(userInfo user.Info, authorizer authorizer.Authorizer) ref.Val</a></li> <li class="Documentation-indexFunction"> <a href="#NewResourceAuthorizerVal">func NewResourceAuthorizerVal(userInfo user.Info, authorizer authorizer.Authorizer, requestResource Resource) ref.Val</a></li> <li class="Documentation-indexFunction"> <a href="#Quantity">func Quantity() cel.EnvOption</a></li> <li class="Documentation-indexFunction"> <a href="#Regex">func Regex() cel.EnvOption</a></li> <li class="Documentation-indexFunction"> <a href="#Test">func Test(options ...TestOption) cel.EnvOption</a></li> <li class="Documentation-indexFunction"> <a href="#TestVersion">func TestVersion(version uint32) func(lib *testLib) *testLib</a></li> <li class="Documentation-indexFunction"> <a href="#URLs">func URLs() cel.EnvOption</a></li> <li class="Documentation-indexFunction"> <a href="#ZeroArgumentFunctionBinding">func ZeroArgumentFunctionBinding(binding func() ref.Val) decls.OverloadOpt</a></li> <li class="Documentation-indexType"> <a href="#CostEstimator">type CostEstimator</a></li> <li><ul class="Documentation-indexTypeMethods"> <li> <a href="#CostEstimator.CallCost">func (l *CostEstimator) CallCost(function, overloadId string, args []ref.Val, result ref.Val) *uint64</a></li> <li> <a href="#CostEstimator.EstimateCallCost">func (l *CostEstimator) EstimateCallCost(function, overloadId string, target *checker.AstNode, args []checker.AstNode) *checker.CallEstimate</a></li> <li> <a href="#CostEstimator.EstimateSize">func (l *CostEstimator) EstimateSize(element checker.AstNode) *checker.SizeEstimate</a></li> </ul></li> <li class="Documentation-indexType"> <a href="#Resource">type Resource</a></li> <li class="Documentation-indexType"> <a href="#TestOption">type TestOption</a></li> </ul> </section><h3 tabindex="-1" id="pkg-constants" class="Documentation-constantsHeader">Constants <a href="#pkg-constants" aria-label="Go to Constants">¶</a></h3> <section class="Documentation-constants"><p class="Documentation-empty">This section is empty.</p></section> <h3 tabindex="-1" id="pkg-variables" class="Documentation-variablesHeader">Variables <a href="#pkg-variables" aria-label="Go to Variables">¶</a></h3> <section class="Documentation-variables"> <div class="Documentation-declaration"> <span class="Documentation-declarationLink"><a class="Documentation-source" href="https://github.com/kubernetes/apiserver/blob/v0.31.3/pkg/cel/library/authz.go#L577">View Source</a></span> <pre>var ( <span id="AuthorizerType" data-kind="variable"> AuthorizerType = <a href="/github.com/google/cel-go/cel">cel</a>.<a href="/github.com/google/cel-go/cel#ObjectType">ObjectType</a>(&#34;kubernetes.authorization.Authorizer&#34;) </span><span id="PathCheckType" data-kind="variable"> PathCheckType = <a href="/github.com/google/cel-go/cel">cel</a>.<a href="/github.com/google/cel-go/cel#ObjectType">ObjectType</a>(&#34;kubernetes.authorization.PathCheck&#34;) </span><span id="GroupCheckType" data-kind="variable"> GroupCheckType = <a href="/github.com/google/cel-go/cel">cel</a>.<a href="/github.com/google/cel-go/cel#ObjectType">ObjectType</a>(&#34;kubernetes.authorization.GroupCheck&#34;) </span><span id="ResourceCheckType" data-kind="variable"> ResourceCheckType = <a href="/github.com/google/cel-go/cel">cel</a>.<a href="/github.com/google/cel-go/cel#ObjectType">ObjectType</a>(&#34;kubernetes.authorization.ResourceCheck&#34;) </span><span id="DecisionType" data-kind="variable"> DecisionType = <a href="/github.com/google/cel-go/cel">cel</a>.<a href="/github.com/google/cel-go/cel#ObjectType">ObjectType</a>(&#34;kubernetes.authorization.Decision&#34;) </span>)</pre> </div> <div class="Documentation-declaration"> <span class="Documentation-declarationLink"><a class="Documentation-source" href="https://github.com/kubernetes/apiserver/blob/v0.31.3/pkg/cel/library/format.go#L127">View Source</a></span> <pre><span id="ConstantFormats" data-kind="variable">var ConstantFormats map[<a href="/builtin#string">string</a>]*<a href="/k8s.io/apiserver@v0.31.3/pkg/cel">apiservercel</a>.<a href="/k8s.io/apiserver@v0.31.3/pkg/cel#Format">Format</a> = map[<a href="/builtin#string">string</a>]*<a href="/k8s.io/apiserver@v0.31.3/pkg/cel">apiservercel</a>.<a href="/k8s.io/apiserver@v0.31.3/pkg/cel#Format">Format</a>{ </span> &#34;dns1123Label&#34;: { Name: &#34;DNS1123Label&#34;, ValidateFunc: func(s <a href="/builtin#string">string</a>) []<a href="/builtin#string">string</a> { return <a href="/k8s.io/apimachinery/pkg/api/validation">apimachineryvalidation</a>.<a href="/k8s.io/apimachinery/pkg/api/validation#NameIsDNSLabel">NameIsDNSLabel</a>(s, <a href="/builtin#false">false</a>) }, MaxRegexSize: 30, }, &#34;dns1123Subdomain&#34;: { Name: &#34;DNS1123Subdomain&#34;, ValidateFunc: func(s <a href="/builtin#string">string</a>) []<a href="/builtin#string">string</a> { return <a href="/k8s.io/apimachinery/pkg/api/validation">apimachineryvalidation</a>.<a href="/k8s.io/apimachinery/pkg/api/validation#NameIsDNSSubdomain">NameIsDNSSubdomain</a>(s, <a href="/builtin#false">false</a>) }, MaxRegexSize: 60, }, &#34;dns1035Label&#34;: { Name: &#34;DNS1035Label&#34;, ValidateFunc: func(s <a href="/builtin#string">string</a>) []<a href="/builtin#string">string</a> { return <a href="/k8s.io/apimachinery/pkg/api/validation">apimachineryvalidation</a>.<a href="/k8s.io/apimachinery/pkg/api/validation#NameIsDNS1035Label">NameIsDNS1035Label</a>(s, <a href="/builtin#false">false</a>) }, MaxRegexSize: 30, }, &#34;qualifiedName&#34;: { Name: &#34;QualifiedName&#34;, ValidateFunc: <a href="/k8s.io/apimachinery/pkg/util/validation">validation</a>.<a href="/k8s.io/apimachinery/pkg/util/validation#IsQualifiedName">IsQualifiedName</a>, MaxRegexSize: 60, }, &#34;dns1123LabelPrefix&#34;: { Name: &#34;DNS1123LabelPrefix&#34;, ValidateFunc: func(s <a href="/builtin#string">string</a>) []<a href="/builtin#string">string</a> { return <a href="/k8s.io/apimachinery/pkg/api/validation">apimachineryvalidation</a>.<a href="/k8s.io/apimachinery/pkg/api/validation#NameIsDNSLabel">NameIsDNSLabel</a>(s, <a href="/builtin#true">true</a>) }, MaxRegexSize: 30, }, &#34;dns1123SubdomainPrefix&#34;: { Name: &#34;DNS1123SubdomainPrefix&#34;, ValidateFunc: func(s <a href="/builtin#string">string</a>) []<a href="/builtin#string">string</a> { return <a href="/k8s.io/apimachinery/pkg/api/validation">apimachineryvalidation</a>.<a href="/k8s.io/apimachinery/pkg/api/validation#NameIsDNSSubdomain">NameIsDNSSubdomain</a>(s, <a href="/builtin#true">true</a>) }, MaxRegexSize: 60, }, &#34;dns1035LabelPrefix&#34;: { Name: &#34;DNS1035LabelPrefix&#34;, ValidateFunc: func(s <a href="/builtin#string">string</a>) []<a href="/builtin#string">string</a> { return <a href="/k8s.io/apimachinery/pkg/api/validation">apimachineryvalidation</a>.<a href="/k8s.io/apimachinery/pkg/api/validation#NameIsDNS1035Label">NameIsDNS1035Label</a>(s, <a href="/builtin#true">true</a>) }, MaxRegexSize: 30, }, &#34;labelValue&#34;: { Name: &#34;LabelValue&#34;, ValidateFunc: <a href="/k8s.io/apimachinery/pkg/util/validation">validation</a>.<a href="/k8s.io/apimachinery/pkg/util/validation#IsValidLabelValue">IsValidLabelValue</a>, MaxRegexSize: 40, }, &#34;uri&#34;: { Name: &#34;URI&#34;, ValidateFunc: func(s <a href="/builtin#string">string</a>) []<a href="/builtin#string">string</a> { _, err := <a href="/net/url">url</a>.<a href="/net/url#ParseRequestURI">ParseRequestURI</a>(s) if err != <a href="/builtin#nil">nil</a> { return []<a href="/builtin#string">string</a>{err.Error()} } return <a href="/builtin#nil">nil</a> }, MaxRegexSize: <a href="/builtin#len">len</a>(<a href="/github.com/asaskevich/govalidator">govalidator</a>.<a href="/github.com/asaskevich/govalidator#URL">URL</a>), }, &#34;uuid&#34;: { Name: &#34;uuid&#34;, ValidateFunc: func(s <a href="/builtin#string">string</a>) []<a href="/builtin#string">string</a> { if !<a href="/k8s.io/kube-openapi/pkg/validation/strfmt">strfmt</a>.<a href="/k8s.io/kube-openapi/pkg/validation/strfmt#Default">Default</a>.Validates(&#34;uuid&#34;, s) { return []<a href="/builtin#string">string</a>{&#34;does not match the UUID format&#34;} } return <a href="/builtin#nil">nil</a> }, MaxRegexSize: <a href="/builtin#len">len</a>(<a href="/k8s.io/kube-openapi/pkg/validation/strfmt">strfmt</a>.<a href="/k8s.io/kube-openapi/pkg/validation/strfmt#UUIDPattern">UUIDPattern</a>), }, &#34;byte&#34;: { Name: &#34;byte&#34;, ValidateFunc: func(s <a href="/builtin#string">string</a>) []<a href="/builtin#string">string</a> { if !<a href="/k8s.io/kube-openapi/pkg/validation/strfmt">strfmt</a>.<a href="/k8s.io/kube-openapi/pkg/validation/strfmt#Default">Default</a>.Validates(&#34;byte&#34;, s) { return []<a href="/builtin#string">string</a>{&#34;invalid base64&#34;} } return <a href="/builtin#nil">nil</a> }, MaxRegexSize: <a href="/builtin#len">len</a>(<a href="/github.com/asaskevich/govalidator">govalidator</a>.<a href="/github.com/asaskevich/govalidator#Base64">Base64</a>), }, &#34;date&#34;: { Name: &#34;date&#34;, ValidateFunc: func(s <a href="/builtin#string">string</a>) []<a href="/builtin#string">string</a> { if !<a href="/k8s.io/kube-openapi/pkg/validation/strfmt">strfmt</a>.<a href="/k8s.io/kube-openapi/pkg/validation/strfmt#Default">Default</a>.Validates(&#34;date&#34;, s) { return []<a href="/builtin#string">string</a>{&#34;invalid date&#34;} } return <a href="/builtin#nil">nil</a> }, MaxRegexSize: <a href="/builtin#len">len</a>(<a href="/k8s.io/kube-openapi/pkg/validation/strfmt">strfmt</a>.<a href="/k8s.io/kube-openapi/pkg/validation/strfmt#DateTimePattern">DateTimePattern</a>), }, &#34;datetime&#34;: { Name: &#34;datetime&#34;, ValidateFunc: func(s <a href="/builtin#string">string</a>) []<a href="/builtin#string">string</a> { if !<a href="/k8s.io/kube-openapi/pkg/validation/strfmt">strfmt</a>.<a href="/k8s.io/kube-openapi/pkg/validation/strfmt#Default">Default</a>.Validates(&#34;datetime&#34;, s) { return []<a href="/builtin#string">string</a>{&#34;invalid datetime&#34;} } return <a href="/builtin#nil">nil</a> }, MaxRegexSize: <a href="/builtin#len">len</a>(<a href="/k8s.io/kube-openapi/pkg/validation/strfmt">strfmt</a>.<a href="/k8s.io/kube-openapi/pkg/validation/strfmt#DateTimePattern">DateTimePattern</a>), }, }</pre> </div> <div class="Documentation-declaration"> <span class="Documentation-declarationLink"><a class="Documentation-source" href="https://github.com/kubernetes/apiserver/blob/v0.31.3/pkg/cel/library/regex.go#L164">View Source</a></span> <pre><span id="FindAllRegexOptimization" data-kind="variable">var FindAllRegexOptimization = &amp;<a href="/github.com/google/cel-go/interpreter">interpreter</a>.<a href="/github.com/google/cel-go/interpreter#RegexOptimization">RegexOptimization</a>{ </span> Function: &#34;findAll&#34;, RegexIndex: 1, Factory: func(call <a href="/github.com/google/cel-go/interpreter">interpreter</a>.<a href="/github.com/google/cel-go/interpreter#InterpretableCall">InterpretableCall</a>, regexPattern <a href="/builtin#string">string</a>) (<a href="/github.com/google/cel-go/interpreter">interpreter</a>.<a href="/github.com/google/cel-go/interpreter#InterpretableCall">InterpretableCall</a>, <a href="/builtin#error">error</a>) { compiledRegex, err := <a href="/regexp">regexp</a>.<a href="/regexp#Compile">Compile</a>(regexPattern) if err != <a href="/builtin#nil">nil</a> { return <a href="/builtin#nil">nil</a>, err } return <a href="/github.com/google/cel-go/interpreter">interpreter</a>.<a href="/github.com/google/cel-go/interpreter#NewCall">NewCall</a>(call.ID(), call.Function(), call.OverloadID(), call.Args(), func(args ...<a href="/github.com/google/cel-go/common/types/ref">ref</a>.<a href="/github.com/google/cel-go/common/types/ref#Val">Val</a>) <a href="/github.com/google/cel-go/common/types/ref">ref</a>.<a href="/github.com/google/cel-go/common/types/ref#Val">Val</a> { argn := <a href="/builtin#len">len</a>(args) if argn &lt; 2 || argn &gt; 3 { return <a href="/github.com/google/cel-go/common/types">types</a>.<a href="/github.com/google/cel-go/common/types#NoSuchOverloadErr">NoSuchOverloadErr</a>() } str, ok := args[0].Value().(<a href="/builtin#string">string</a>) if !ok { return <a href="/github.com/google/cel-go/common/types">types</a>.<a href="/github.com/google/cel-go/common/types#MaybeNoSuchOverloadErr">MaybeNoSuchOverloadErr</a>(args[0]) } n := <a href="/builtin#int64">int64</a>(-1) if argn == 3 { n, ok = args[2].Value().(<a href="/builtin#int64">int64</a>) if !ok { return <a href="/github.com/google/cel-go/common/types">types</a>.<a href="/github.com/google/cel-go/common/types#MaybeNoSuchOverloadErr">MaybeNoSuchOverloadErr</a>(args[2]) } } result := compiledRegex.FindAllString(str, <a href="/builtin#int">int</a>(n)) return <a href="/github.com/google/cel-go/common/types">types</a>.<a href="/github.com/google/cel-go/common/types#NewStringList">NewStringList</a>(<a href="/github.com/google/cel-go/common/types">types</a>.<a href="/github.com/google/cel-go/common/types#DefaultTypeAdapter">DefaultTypeAdapter</a>, result) }), <a href="/builtin#nil">nil</a> }, }</pre> </div> <p>FindAllRegexOptimization optimizes the &#39;findAll&#39; function by compiling the regex pattern and reporting any compilation errors at program creation time, and using the compiled regex pattern for all function call invocations. </p> <div class="Documentation-declaration"> <span class="Documentation-declarationLink"><a class="Documentation-source" href="https://github.com/kubernetes/apiserver/blob/v0.31.3/pkg/cel/library/regex.go#L140">View Source</a></span> <pre><span id="FindRegexOptimization" data-kind="variable">var FindRegexOptimization = &amp;<a href="/github.com/google/cel-go/interpreter">interpreter</a>.<a href="/github.com/google/cel-go/interpreter#RegexOptimization">RegexOptimization</a>{ </span> Function: &#34;find&#34;, RegexIndex: 1, Factory: func(call <a href="/github.com/google/cel-go/interpreter">interpreter</a>.<a href="/github.com/google/cel-go/interpreter#InterpretableCall">InterpretableCall</a>, regexPattern <a href="/builtin#string">string</a>) (<a href="/github.com/google/cel-go/interpreter">interpreter</a>.<a href="/github.com/google/cel-go/interpreter#InterpretableCall">InterpretableCall</a>, <a href="/builtin#error">error</a>) { compiledRegex, err := <a href="/regexp">regexp</a>.<a href="/regexp#Compile">Compile</a>(regexPattern) if err != <a href="/builtin#nil">nil</a> { return <a href="/builtin#nil">nil</a>, err } return <a href="/github.com/google/cel-go/interpreter">interpreter</a>.<a href="/github.com/google/cel-go/interpreter#NewCall">NewCall</a>(call.ID(), call.Function(), call.OverloadID(), call.Args(), func(args ...<a href="/github.com/google/cel-go/common/types/ref">ref</a>.<a href="/github.com/google/cel-go/common/types/ref#Val">Val</a>) <a href="/github.com/google/cel-go/common/types/ref">ref</a>.<a href="/github.com/google/cel-go/common/types/ref#Val">Val</a> { if <a href="/builtin#len">len</a>(args) != 2 { return <a href="/github.com/google/cel-go/common/types">types</a>.<a href="/github.com/google/cel-go/common/types#NoSuchOverloadErr">NoSuchOverloadErr</a>() } in, ok := args[0].Value().(<a href="/builtin#string">string</a>) if !ok { return <a href="/github.com/google/cel-go/common/types">types</a>.<a href="/github.com/google/cel-go/common/types#MaybeNoSuchOverloadErr">MaybeNoSuchOverloadErr</a>(args[0]) } return <a href="/github.com/google/cel-go/common/types">types</a>.<a href="/github.com/google/cel-go/common/types#String">String</a>(compiledRegex.FindString(in)) }), <a href="/builtin#nil">nil</a> }, }</pre> </div> <p>FindRegexOptimization optimizes the &#39;find&#39; function by compiling the regex pattern and reporting any compilation errors at program creation time, and using the compiled regex pattern for all function call invocations. </p> </section> <h3 tabindex="-1" id="pkg-functions" class="Documentation-functionsHeader">Functions <a href="#pkg-functions" aria-label="Go to Functions">¶</a></h3> <section class="Documentation-functions"><div class="Documentation-function"> <h4 tabindex="-1" id="Authz" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/kubernetes/apiserver/blob/v0.31.3/pkg/cel/library/authz.go#L226">Authz</a> <a class="Documentation-idLink" href="#Authz" aria-label="Go to Authz">¶</a></span> <span class="Documentation-sinceVersion"> <span class="Documentation-sinceVersionLabel">added in</span> <span class="Documentation-sinceVersionVersion">v0.27.0</span> </span> </h4> <div class="Documentation-declaration"> <pre>func Authz() <a href="/github.com/google/cel-go/cel">cel</a>.<a href="/github.com/google/cel-go/cel#EnvOption">EnvOption</a></pre> </div> <p>Authz provides a CEL function library extension for performing authorization checks. Note that authorization checks are only supported for CEL expression fields in the API where an &#39;authorizer&#39; variable is provided to the CEL expression. See the documentation of API fields where CEL expressions are used to learn if the &#39;authorizer&#39; variable is provided. </p><p>path </p><p>Returns a PathCheck configured to check authorization for a non-resource request path (e.g. /healthz). If path is an empty string, an error is returned. Note that the leading &#39;/&#39; is not required. </p><pre>&lt;Authorizer&gt;.path(&lt;string&gt;) &lt;PathCheck&gt; </pre><p>Examples: </p><pre>authorizer.path(&#39;/healthz&#39;) // returns a PathCheck for the &#39;/healthz&#39; API path authorizer.path(&#39;&#39;) // results in &#34;path must not be empty&#34; error authorizer.path(&#39; &#39;) // results in &#34;path must not be empty&#34; error </pre><p>group </p><p>Returns a GroupCheck configured to check authorization for the API resources for a particular API group. Note that authorization checks are only supported for CEL expression fields in the API where an &#39;authorizer&#39; variable is provided to the CEL expression. Check the documentation of API fields where CEL expressions are used to learn if the &#39;authorizer&#39; variable is provided. </p><pre>&lt;Authorizer&gt;.group(&lt;string&gt;) &lt;GroupCheck&gt; </pre><p>Examples: </p><pre>authorizer.group(&#39;apps&#39;) // returns a GroupCheck for the &#39;apps&#39; API group authorizer.group(&#39;&#39;) // returns a GroupCheck for the core API group authorizer.group(&#39;example.com&#39;) // returns a GroupCheck for the custom resources in the &#39;example.com&#39; API group </pre><p>serviceAccount </p><p>Returns an Authorizer configured to check authorization for the provided service account namespace and name. If the name is not a valid DNS subdomain string (as defined by <a href="https://rfc-editor.org/rfc/rfc1123.html">RFC 1123</a>), an error is returned. If the namespace is not a valid DNS label (as defined by <a href="https://rfc-editor.org/rfc/rfc1123.html">RFC 1123</a>), an error is returned. </p><pre>&lt;Authorizer&gt;.serviceAccount(&lt;string&gt;, &lt;string&gt;) &lt;Authorizer&gt; </pre><p>Examples: </p><pre>authorizer.serviceAccount(&#39;default&#39;, &#39;myserviceaccount&#39;) // returns an Authorizer for the service account with namespace &#39;default&#39; and name &#39;myserviceaccount&#39; authorizer.serviceAccount(&#39;not@a#valid!namespace&#39;, &#39;validname&#39;) // returns an error authorizer.serviceAccount(&#39;valid.example.com&#39;, &#39;invalid@*name&#39;) // returns an error </pre><p>resource </p><p>Returns a ResourceCheck configured to check authorization for a particular API resource. Note that the provided resource string should be a lower case plural name of a Kubernetes API resource. </p><pre>&lt;GroupCheck&gt;.resource(&lt;string&gt;) &lt;ResourceCheck&gt; </pre><p>Examples: </p><pre>authorizer.group(&#39;apps&#39;).resource(&#39;deployments&#39;) // returns a ResourceCheck for the &#39;deployments&#39; resources in the &#39;apps&#39; group. authorizer.group(&#39;&#39;).resource(&#39;pods&#39;) // returns a ResourceCheck for the &#39;pods&#39; resources in the core group. authorizer.group(&#39;apps&#39;).resource(&#39;&#39;) // results in &#34;resource must not be empty&#34; error authorizer.group(&#39;apps&#39;).resource(&#39; &#39;) // results in &#34;resource must not be empty&#34; error </pre><p>subresource </p><p>Returns a ResourceCheck configured to check authorization for a particular subresource of an API resource. If subresource is set to &#34;&#34;, the subresource field of this ResourceCheck is considered unset. </p><pre>&lt;ResourceCheck&gt;.subresource(&lt;string&gt;) &lt;ResourceCheck&gt; </pre><p>Examples: </p><pre>authorizer.group(&#39;&#39;).resource(&#39;pods&#39;).subresource(&#39;status&#39;) // returns a ResourceCheck the &#39;status&#39; subresource of &#39;pods&#39; authorizer.group(&#39;apps&#39;).resource(&#39;deployments&#39;).subresource(&#39;scale&#39;) // returns a ResourceCheck the &#39;scale&#39; subresource of &#39;deployments&#39; authorizer.group(&#39;example.com&#39;).resource(&#39;widgets&#39;).subresource(&#39;scale&#39;) // returns a ResourceCheck for the &#39;scale&#39; subresource of the &#39;widgets&#39; custom resource authorizer.group(&#39;example.com&#39;).resource(&#39;widgets&#39;).subresource(&#39;&#39;) // returns a ResourceCheck for the &#39;widgets&#39; resource. </pre><p>namespace </p><p>Returns a ResourceCheck configured to check authorization for a particular namespace. For cluster scoped resources, namespace() does not need to be called; namespace defaults to &#34;&#34;, which is the correct namespace value to use to check cluster scoped resources. If namespace is set to &#34;&#34;, the ResourceCheck will check authorization for the cluster scope. </p><pre>&lt;ResourceCheck&gt;.namespace(&lt;string&gt;) &lt;ResourceCheck&gt; </pre><p>Examples: </p><pre>authorizer.group(&#39;apps&#39;).resource(&#39;deployments&#39;).namespace(&#39;test&#39;) // returns a ResourceCheck for &#39;deployments&#39; in the &#39;test&#39; namespace authorizer.group(&#39;&#39;).resource(&#39;pods&#39;).namespace(&#39;default&#39;) // returns a ResourceCheck for &#39;pods&#39; in the &#39;default&#39; namespace authorizer.group(&#39;&#39;).resource(&#39;widgets&#39;).namespace(&#39;&#39;) // returns a ResourceCheck for &#39;widgets&#39; in the cluster scope </pre><p>name </p><p>Returns a ResourceCheck configured to check authorization for a particular resource name. If name is set to &#34;&#34;, the name field of this ResourceCheck is considered unset. </p><pre>&lt;ResourceCheck&gt;.name(&lt;name&gt;) &lt;ResourceCheck&gt; </pre><p>Examples: </p><pre>authorizer.group(&#39;apps&#39;).resource(&#39;deployments&#39;).namespace(&#39;test&#39;).name(&#39;backend&#39;) // returns a ResourceCheck for the &#39;backend&#39; &#39;deployments&#39; resource in the &#39;test&#39; namespace authorizer.group(&#39;apps&#39;).resource(&#39;deployments&#39;).namespace(&#39;test&#39;).name(&#39;&#39;) // returns a ResourceCheck for the &#39;deployments&#39; resource in the &#39;test&#39; namespace </pre><p>check </p><p>For PathCheck, checks if the principal (user or service account) that sent the request is authorized for the HTTP request verb of the path. For ResourceCheck, checks if the principal (user or service account) that sent the request is authorized for the API verb and the configured authorization checks of the ResourceCheck. The check operation can be expensive, particularly in clusters using the webhook authorization mode. </p><pre>&lt;PathCheck&gt;.check(&lt;check&gt;) &lt;Decision&gt; &lt;ResourceCheck&gt;.check(&lt;check&gt;) &lt;Decision&gt; </pre><p>Examples: </p><pre>authorizer.group(&#39;&#39;).resource(&#39;pods&#39;).namespace(&#39;default&#39;).check(&#39;create&#39;) // Checks if the principal (user or service account) is authorized create pods in the &#39;default&#39; namespace. authorizer.path(&#39;/healthz&#39;).check(&#39;get&#39;) // Checks if the principal (user or service account) is authorized to make HTTP GET requests to the /healthz API path. </pre><p>allowed </p><p>Returns true if the authorizer&#39;s decision for the check is &#34;allow&#34;. Note that if the authorizer&#39;s decision is &#34;no opinion&#34;, that the &#39;allowed&#39; function will return false. </p><pre>&lt;Decision&gt;.allowed() &lt;bool&gt; </pre><p>Examples: </p><pre>authorizer.group(&#39;&#39;).resource(&#39;pods&#39;).namespace(&#39;default&#39;).check(&#39;create&#39;).allowed() // Returns true if the principal (user or service account) is allowed create pods in the &#39;default&#39; namespace. authorizer.path(&#39;/healthz&#39;).check(&#39;get&#39;).allowed() // Returns true if the principal (user or service account) is allowed to make HTTP GET requests to the /healthz API path. </pre><p>reason </p><p>Returns a string reason for the authorization decision </p><pre>&lt;Decision&gt;.reason() &lt;string&gt; </pre><p>Examples: </p><pre>authorizer.path(&#39;/healthz&#39;).check(&#39;GET&#39;).reason() </pre><p>errored </p><p>Returns true if the authorization check resulted in an error. </p><pre>&lt;Decision&gt;.errored() &lt;bool&gt; </pre><p>Examples: </p><pre>authorizer.group(&#39;&#39;).resource(&#39;pods&#39;).namespace(&#39;default&#39;).check(&#39;create&#39;).errored() // Returns true if the authorization check resulted in an error </pre><p>error </p><p>If the authorization check resulted in an error, returns the error. Otherwise, returns the empty string. </p><pre>&lt;Decision&gt;.error() &lt;string&gt; </pre><p>Examples: </p><pre>authorizer.group(&#39;&#39;).resource(&#39;pods&#39;).namespace(&#39;default&#39;).check(&#39;create&#39;).error() </pre><p>fieldSelector </p><p>Takes a string field selector, parses it to field selector requirements, and includes it in the authorization check. If the field selector does not parse successfully, no field selector requirements are included in the authorization check. Added in Kubernetes 1.31+, Authz library version 1. </p><pre>&lt;ResourceCheck&gt;.fieldSelector(&lt;string&gt;) &lt;ResourceCheck&gt; </pre><p>Examples: </p><pre>authorizer.group(&#39;&#39;).resource(&#39;pods&#39;).fieldSelector(&#39;spec.nodeName=mynode&#39;).check(&#39;list&#39;).allowed() </pre><p>labelSelector (added in v1, Kubernetes 1.31+) </p><p>Takes a string label selector, parses it to label selector requirements, and includes it in the authorization check. If the label selector does not parse successfully, no label selector requirements are included in the authorization check. Added in Kubernetes 1.31+, Authz library version 1. </p><pre>&lt;ResourceCheck&gt;.labelSelector(&lt;string&gt;) &lt;ResourceCheck&gt; </pre><p>Examples: </p><pre>authorizer.group(&#39;&#39;).resource(&#39;pods&#39;).labelSelector(&#39;app=example&#39;).check(&#39;list&#39;).allowed() </pre> </div><div class="Documentation-function"> <h4 tabindex="-1" id="AuthzSelectors" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/kubernetes/apiserver/blob/v0.31.3/pkg/cel/library/authz.go#L318">AuthzSelectors</a> <a class="Documentation-idLink" href="#AuthzSelectors" aria-label="Go to AuthzSelectors">¶</a></span> <span class="Documentation-sinceVersion"> <span class="Documentation-sinceVersionLabel">added in</span> <span class="Documentation-sinceVersionVersion">v0.31.0</span> </span> </h4> <div class="Documentation-declaration"> <pre>func AuthzSelectors() <a href="/github.com/google/cel-go/cel">cel</a>.<a href="/github.com/google/cel-go/cel#EnvOption">EnvOption</a></pre> </div> <p>AuthzSelectors provides a CEL function library extension for adding fieldSelector and labelSelector filters to authorization checks. This requires the Authz library. See documentation of the Authz library for use and availability of the authorizer variable. </p><p>fieldSelector </p><p>Takes a string field selector, parses it to field selector requirements, and includes it in the authorization check. If the field selector does not parse successfully, no field selector requirements are included in the authorization check. Added in Kubernetes 1.31+. </p><pre>&lt;ResourceCheck&gt;.fieldSelector(&lt;string&gt;) &lt;ResourceCheck&gt; </pre><p>Examples: </p><pre>authorizer.group(&#39;&#39;).resource(&#39;pods&#39;).fieldSelector(&#39;spec.nodeName=mynode&#39;).check(&#39;list&#39;).allowed() </pre><p>labelSelector </p><p>Takes a string label selector, parses it to label selector requirements, and includes it in the authorization check. If the label selector does not parse successfully, no label selector requirements are included in the authorization check. Added in Kubernetes 1.31+. </p><pre>&lt;ResourceCheck&gt;.labelSelector(&lt;string&gt;) &lt;ResourceCheck&gt; </pre><p>Examples: </p><pre>authorizer.group(&#39;&#39;).resource(&#39;pods&#39;).labelSelector(&#39;app=example&#39;).check(&#39;list&#39;).allowed() </pre> </div><div class="Documentation-function"> <h4 tabindex="-1" id="CIDR" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/kubernetes/apiserver/blob/v0.31.3/pkg/cel/library/cidr.go#L103">CIDR</a> <a class="Documentation-idLink" href="#CIDR" aria-label="Go to CIDR">¶</a></span> <span class="Documentation-sinceVersion"> <span class="Documentation-sinceVersionLabel">added in</span> <span class="Documentation-sinceVersionVersion">v0.30.0</span> </span> </h4> <div class="Documentation-declaration"> <pre>func CIDR() <a href="/github.com/google/cel-go/cel">cel</a>.<a href="/github.com/google/cel-go/cel#EnvOption">EnvOption</a></pre> </div> <p>CIDR provides a CEL function library extension of CIDR notation parsing functions. </p><p>cidr </p><p>Converts a string in CIDR notation to a network address representation or results in an error if the string is not a valid CIDR notation. The CIDR must be an IPv4 or IPv6 subnet address with a mask. Leading zeros in IPv4 address octets are not allowed. IPv4-mapped IPv6 addresses (e.g. ::ffff:1.2.3.4/24) are not allowed. </p><pre>cidr(&lt;string&gt;) &lt;CIDR&gt; </pre><p>Examples: </p><pre>cidr(&#39;192.168.0.0/16&#39;) // returns an IPv4 address with a CIDR mask cidr(&#39;::1/128&#39;) // returns an IPv6 address with a CIDR mask cidr(&#39;192.168.0.0/33&#39;) // error cidr(&#39;::1/129&#39;) // error cidr(&#39;192.168.0.1/16&#39;) // error, because there are non-0 bits after the prefix </pre><p>isCIDR </p><p>Returns true if a string is a valid CIDR notation respresentation of a subnet with mask. The CIDR must be an IPv4 or IPv6 subnet address with a mask. Leading zeros in IPv4 address octets are not allowed. IPv4-mapped IPv6 addresses (e.g. ::ffff:1.2.3.4/24) are not allowed. </p><pre>isCIDR(&lt;string&gt;) &lt;bool&gt; </pre><p>Examples: </p><pre>isCIDR(&#39;192.168.0.0/16&#39;) // returns true isCIDR(&#39;::1/128&#39;) // returns true isCIDR(&#39;192.168.0.0/33&#39;) // returns false isCIDR(&#39;::1/129&#39;) // returns false </pre><p>containsIP / containerCIDR / ip / masked / prefixLength </p><p>- containsIP: Returns true if a the CIDR contains the given IP address. The IP address must be an IPv4 or IPv6 address. May take either a string or IP address as an argument. </p><p>- containsCIDR: Returns true if a the CIDR contains the given CIDR. The CIDR must be an IPv4 or IPv6 subnet address with a mask. May take either a string or CIDR as an argument. </p><p>- ip: Returns the IP address representation of the CIDR. </p><p>- masked: Returns the CIDR representation of the network address with a masked prefix. This can be used to return the canonical form of the CIDR network. </p><p>- prefixLength: Returns the prefix length of the CIDR in bits. This is the number of bits in the mask. </p><p>Examples: </p><p>cidr(&#39;192.168.0.0/24&#39;).containsIP(ip(&#39;192.168.0.1&#39;)) // returns true cidr(&#39;192.168.0.0/24&#39;).containsIP(ip(&#39;192.168.1.1&#39;)) // returns false cidr(&#39;192.168.0.0/24&#39;).containsIP(&#39;192.168.0.1&#39;) // returns true cidr(&#39;192.168.0.0/24&#39;).containsIP(&#39;192.168.1.1&#39;) // returns false cidr(&#39;192.168.0.0/16&#39;).containsCIDR(cidr(&#39;192.168.10.0/24&#39;)) // returns true cidr(&#39;192.168.1.0/24&#39;).containsCIDR(cidr(&#39;192.168.2.0/24&#39;)) // returns false cidr(&#39;192.168.0.0/16&#39;).containsCIDR(&#39;192.168.10.0/24&#39;) // returns true cidr(&#39;192.168.1.0/24&#39;).containsCIDR(&#39;192.168.2.0/24&#39;) // returns false cidr(&#39;192.168.0.1/24&#39;).ip() // returns ipAddr(&#39;192.168.0.1&#39;) cidr(&#39;192.168.0.1/24&#39;).ip().family() // returns &#39;4&#39; cidr(&#39;::1/128&#39;).ip() // returns ipAddr(&#39;::1&#39;) cidr(&#39;::1/128&#39;).ip().family() // returns &#39;6&#39; cidr(&#39;192.168.0.0/24&#39;).masked() // returns cidr(&#39;192.168.0.0/24&#39;) cidr(&#39;192.168.0.1/24&#39;).masked() // returns cidr(&#39;192.168.0.0/24&#39;) cidr(&#39;192.168.0.0/24&#39;) == cidr(&#39;192.168.0.0/24&#39;).masked() // returns true, CIDR was already in canonical format cidr(&#39;192.168.0.1/24&#39;) == cidr(&#39;192.168.0.1/24&#39;).masked() // returns false, CIDR was not in canonical format cidr(&#39;192.168.0.0/16&#39;).prefixLength() // returns 16 cidr(&#39;::1/128&#39;).prefixLength() // returns 128 </p> </div><div class="Documentation-function"> <h4 tabindex="-1" id="Format" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/kubernetes/apiserver/blob/v0.31.3/pkg/cel/library/format.go#L84">Format</a> <a class="Documentation-idLink" href="#Format" aria-label="Go to Format">¶</a></span> <span class="Documentation-sinceVersion"> <span class="Documentation-sinceVersionLabel">added in</span> <span class="Documentation-sinceVersionVersion">v0.31.0</span> </span> </h4> <div class="Documentation-declaration"> <pre>func Format() <a href="/github.com/google/cel-go/cel">cel</a>.<a href="/github.com/google/cel-go/cel#EnvOption">EnvOption</a></pre> </div> <p>&lt;Format&gt;.validate(str: string) -&gt; ?list&lt;string&gt; </p><pre>Validates the given string against the given format. Returns optional.none if the string is valid, otherwise a list of validation error strings. </pre> </div><div class="Documentation-function"> <h4 tabindex="-1" id="IP" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/kubernetes/apiserver/blob/v0.31.3/pkg/cel/library/ip.go#L126">IP</a> <a class="Documentation-idLink" href="#IP" aria-label="Go to IP">¶</a></span> <span class="Documentation-sinceVersion"> <span class="Documentation-sinceVersionLabel">added in</span> <span class="Documentation-sinceVersionVersion">v0.30.0</span> </span> </h4> <div class="Documentation-declaration"> <pre>func IP() <a href="/github.com/google/cel-go/cel">cel</a>.<a href="/github.com/google/cel-go/cel#EnvOption">EnvOption</a></pre> </div> <p>IP provides a CEL function library extension of IP address parsing functions. </p><p>ip </p><p>Converts a string to an IP address or results in an error if the string is not a valid IP address. The IP address must be an IPv4 or IPv6 address. IPv4-mapped IPv6 addresses (e.g. ::ffff:1.2.3.4) are not allowed. IP addresses with zones (e.g. fe80::1%eth0) are not allowed. Leading zeros in IPv4 address octets are not allowed. </p><pre>ip(&lt;string&gt;) &lt;IPAddr&gt; </pre><p>Examples: </p><pre>ip(&#39;127.0.0.1&#39;) // returns an IPv4 address ip(&#39;::1&#39;) // returns an IPv6 address ip(&#39;127.0.0.256&#39;) // error ip(&#39;:::1&#39;) // error </pre><p>isIP </p><p>Returns true if a string is a valid IP address. The IP address must be an IPv4 or IPv6 address. IPv4-mapped IPv6 addresses (e.g. ::ffff:1.2.3.4) are not allowed. IP addresses with zones (e.g. fe80::1%eth0) are not allowed. Leading zeros in IPv4 address octets are not allowed. </p><pre>isIP(&lt;string&gt;) &lt;bool&gt; </pre><p>Examples: </p><pre>isIP(&#39;127.0.0.1&#39;) // returns true isIP(&#39;::1&#39;) // returns true isIP(&#39;127.0.0.256&#39;) // returns false isIP(&#39;:::1&#39;) // returns false </pre><p>ip.isCanonical </p><p>Returns true if the IP address is in its canonical form. There is exactly one canonical form for every IP address, so fields containing IPs in canonical form can just be treated as strings when checking for equality or uniqueness. </p><pre>ip.isCanonical(&lt;string&gt;) &lt;bool&gt; </pre><p>Examples: </p><pre>ip.isCanonical(&#39;127.0.0.1&#39;) // returns true; all valid IPv4 addresses are canonical ip.isCanonical(&#39;2001:db8::abcd&#39;) // returns true ip.isCanonical(&#39;2001:DB8::ABCD&#39;) // returns false ip.isCanonical(&#39;2001:db8::0:0:0:abcd&#39;) // returns false </pre><p>family / isUnspecified / isLoopback / isLinkLocalMulticast / isLinkLocalUnicast / isGlobalUnicast </p><p>- family: returns the IP addresses&#39; family (IPv4 or IPv6) as an integer, either &#39;4&#39; or &#39;6&#39;. </p><p>- isUnspecified: returns true if the IP address is the unspecified address. Either the IPv4 address &#34;0.0.0.0&#34; or the IPv6 address &#34;::&#34;. </p><p>- isLoopback: returns true if the IP address is the loopback address. Either an IPv4 address with a value of 127.x.x.x or an IPv6 address with a value of ::1. </p><p>- isLinkLocalMulticast: returns true if the IP address is a link-local multicast address. Either an IPv4 address with a value of 224.0.0.x or an IPv6 address in the network ff00::/8. </p><p>- isLinkLocalUnicast: returns true if the IP address is a link-local unicast address. Either an IPv4 address with a value of 169.254.x.x or an IPv6 address in the network fe80::/10. </p><p>- isGlobalUnicast: returns true if the IP address is a global unicast address. Either an IPv4 address that is not zero or 255.255.255.255 or an IPv6 address that is not a link-local unicast, loopback or multicast address. </p><p>Examples: </p><p>ip(&#39;127.0.0.1&#39;).family() // returns &#39;4” ip(&#39;::1&#39;).family() // returns &#39;6&#39; ip(&#39;127.0.0.1&#39;).family() == 4 // returns true ip(&#39;::1&#39;).family() == 6 // returns true ip(&#39;0.0.0.0&#39;).isUnspecified() // returns true ip(&#39;127.0.0.1&#39;).isUnspecified() // returns false ip(&#39;::&#39;).isUnspecified() // returns true ip(&#39;::1&#39;).isUnspecified() // returns false ip(&#39;127.0.0.1&#39;).isLoopback() // returns true ip(&#39;192.168.0.1&#39;).isLoopback() // returns false ip(&#39;::1&#39;).isLoopback() // returns true ip(&#39;2001:db8::abcd&#39;).isLoopback() // returns false ip(&#39;224.0.0.1&#39;).isLinkLocalMulticast() // returns true ip(&#39;224.0.1.1&#39;).isLinkLocalMulticast() // returns false ip(&#39;ff02::1&#39;).isLinkLocalMulticast() // returns true ip(&#39;fd00::1&#39;).isLinkLocalMulticast() // returns false ip(&#39;169.254.169.254&#39;).isLinkLocalUnicast() // returns true ip(&#39;192.168.0.1&#39;).isLinkLocalUnicast() // returns false ip(&#39;fe80::1&#39;).isLinkLocalUnicast() // returns true ip(&#39;fd80::1&#39;).isLinkLocalUnicast() // returns false ip(&#39;192.168.0.1&#39;).isGlobalUnicast() // returns true ip(&#39;255.255.255.255&#39;).isGlobalUnicast() // returns false ip(&#39;2001:db8::abcd&#39;).isGlobalUnicast() // returns true ip(&#39;ff00::1&#39;).isGlobalUnicast() // returns false </p> </div><div class="Documentation-function"> <h4 tabindex="-1" id="Lists" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/kubernetes/apiserver/blob/v0.31.3/pkg/cel/library/lists.go#L90">Lists</a> <a class="Documentation-idLink" href="#Lists" aria-label="Go to Lists">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func Lists() <a href="/github.com/google/cel-go/cel">cel</a>.<a href="/github.com/google/cel-go/cel#EnvOption">EnvOption</a></pre> </div> <p>Lists provides a CEL function library extension of list utility functions. </p><p>isSorted </p><p>Returns true if the provided list of comparable elements is sorted, else returns false. </p><pre>&lt;list&lt;T&gt;&gt;.isSorted() &lt;bool&gt;, T must be a comparable type </pre><p>Examples: </p><pre>[1, 2, 3].isSorted() // return true [&#39;a&#39;, &#39;b&#39;, &#39;b&#39;, &#39;c&#39;].isSorted() // return true [2.0, 1.0].isSorted() // return false [1].isSorted() // return true [].isSorted() // return true </pre><p>sum </p><p>Returns the sum of the elements of the provided list. Supports CEL number (int, uint, double) and duration types. </p><pre>&lt;list&lt;T&gt;&gt;.sum() &lt;T&gt;, T must be a numeric type or a duration </pre><p>Examples: </p><pre>[1, 3].sum() // returns 4 [1.0, 3.0].sum() // returns 4.0 [&#39;1m&#39;, &#39;1s&#39;].sum() // returns &#39;1m1s&#39; emptyIntList.sum() // returns 0 emptyDoubleList.sum() // returns 0.0 [].sum() // returns 0 </pre><p>min / max </p><p>Returns the minimum/maximum valued element of the provided list. Supports all comparable types. If the list is empty, an error is returned. </p><pre>&lt;list&lt;T&gt;&gt;.min() &lt;T&gt;, T must be a comparable type &lt;list&lt;T&gt;&gt;.max() &lt;T&gt;, T must be a comparable type </pre><p>Examples: </p><pre>[1, 3].min() // returns 1 [1, 3].max() // returns 3 [].min() // error [1].min() // returns 1 ([0] + emptyList).min() // returns 0 </pre><p>indexOf / lastIndexOf </p><p>Returns either the first or last positional index of the provided element in the list. If the element is not found, -1 is returned. Supports all equatable types. </p><pre>&lt;list&lt;T&gt;&gt;.indexOf(&lt;T&gt;) &lt;int&gt;, T must be an equatable type &lt;list&lt;T&gt;&gt;.lastIndexOf(&lt;T&gt;) &lt;int&gt;, T must be an equatable type </pre><p>Examples: </p><pre>[1, 2, 2, 3].indexOf(2) // returns 1 [&#39;a&#39;, &#39;b&#39;, &#39;b&#39;, &#39;c&#39;].lastIndexOf(&#39;b&#39;) // returns 2 [1.0].indexOf(1.1) // returns -1 [].indexOf(&#39;string&#39;) // returns -1 </pre> </div><div class="Documentation-function"> <h4 tabindex="-1" id="NewAuthorizerVal" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/kubernetes/apiserver/blob/v0.31.3/pkg/cel/library/authz.go#L601">NewAuthorizerVal</a> <a class="Documentation-idLink" href="#NewAuthorizerVal" aria-label="Go to NewAuthorizerVal">¶</a></span> <span class="Documentation-sinceVersion"> <span class="Documentation-sinceVersionLabel">added in</span> <span class="Documentation-sinceVersionVersion">v0.27.0</span> </span> </h4> <div class="Documentation-declaration"> <pre>func NewAuthorizerVal(userInfo <a href="/k8s.io/apiserver@v0.31.3/pkg/authentication/user">user</a>.<a href="/k8s.io/apiserver@v0.31.3/pkg/authentication/user#Info">Info</a>, authorizer <a href="/k8s.io/apiserver@v0.31.3/pkg/authorization/authorizer">authorizer</a>.<a href="/k8s.io/apiserver@v0.31.3/pkg/authorization/authorizer#Authorizer">Authorizer</a>) <a href="/github.com/google/cel-go/common/types/ref">ref</a>.<a href="/github.com/google/cel-go/common/types/ref#Val">Val</a></pre> </div> </div><div class="Documentation-function"> <h4 tabindex="-1" id="NewResourceAuthorizerVal" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/kubernetes/apiserver/blob/v0.31.3/pkg/cel/library/authz.go#L605">NewResourceAuthorizerVal</a> <a class="Documentation-idLink" href="#NewResourceAuthorizerVal" aria-label="Go to NewResourceAuthorizerVal">¶</a></span> <span class="Documentation-sinceVersion"> <span class="Documentation-sinceVersionLabel">added in</span> <span class="Documentation-sinceVersionVersion">v0.27.0</span> </span> </h4> <div class="Documentation-declaration"> <pre>func NewResourceAuthorizerVal(userInfo <a href="/k8s.io/apiserver@v0.31.3/pkg/authentication/user">user</a>.<a href="/k8s.io/apiserver@v0.31.3/pkg/authentication/user#Info">Info</a>, authorizer <a href="/k8s.io/apiserver@v0.31.3/pkg/authorization/authorizer">authorizer</a>.<a href="/k8s.io/apiserver@v0.31.3/pkg/authorization/authorizer#Authorizer">Authorizer</a>, requestResource <a href="#Resource">Resource</a>) <a href="/github.com/google/cel-go/common/types/ref">ref</a>.<a href="/github.com/google/cel-go/common/types/ref#Val">Val</a></pre> </div> </div><div class="Documentation-function"> <h4 tabindex="-1" id="Quantity" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/kubernetes/apiserver/blob/v0.31.3/pkg/cel/library/quantity.go#L137">Quantity</a> <a class="Documentation-idLink" href="#Quantity" aria-label="Go to Quantity">¶</a></span> <span class="Documentation-sinceVersion"> <span class="Documentation-sinceVersionLabel">added in</span> <span class="Documentation-sinceVersionVersion">v0.28.0</span> </span> </h4> <div class="Documentation-declaration"> <pre>func Quantity() <a href="/github.com/google/cel-go/cel">cel</a>.<a href="/github.com/google/cel-go/cel#EnvOption">EnvOption</a></pre> </div> </div><div class="Documentation-function"> <h4 tabindex="-1" id="Regex" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/kubernetes/apiserver/blob/v0.31.3/pkg/cel/library/regex.go#L46">Regex</a> <a class="Documentation-idLink" href="#Regex" aria-label="Go to Regex">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func Regex() <a href="/github.com/google/cel-go/cel">cel</a>.<a href="/github.com/google/cel-go/cel#EnvOption">EnvOption</a></pre> </div> <p>Regex provides a CEL function library extension of regex utility functions. </p><p>find / findAll </p><p>Returns substrings that match the provided regular expression. find returns the first match. findAll may optionally be provided a limit. If the limit is set and &gt;= 0, no more than the limit number of matches are returned. </p><pre>&lt;string&gt;.find(&lt;string&gt;) &lt;string&gt; &lt;string&gt;.findAll(&lt;string&gt;) &lt;list &lt;string&gt;&gt; &lt;string&gt;.findAll(&lt;string&gt;, &lt;int&gt;) &lt;list &lt;string&gt;&gt; </pre><p>Examples: </p><pre>&#34;abc 123&#34;.find(&#39;[0-9]*&#39;) // returns &#39;123&#39; &#34;abc 123&#34;.find(&#39;xyz&#39;) // returns &#39;&#39; &#34;123 abc 456&#34;.findAll(&#39;[0-9]*&#39;) // returns [&#39;123&#39;, &#39;456&#39;] &#34;123 abc 456&#34;.findAll(&#39;[0-9]*&#39;, 1) // returns [&#39;123&#39;] &#34;123 abc 456&#34;.findAll(&#39;xyz&#39;) // returns [] </pre> </div><div class="Documentation-function"> <h4 tabindex="-1" id="Test" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/kubernetes/apiserver/blob/v0.31.3/pkg/cel/library/test.go#L28">Test</a> <a class="Documentation-idLink" href="#Test" aria-label="Go to Test">¶</a></span> <span class="Documentation-sinceVersion"> <span class="Documentation-sinceVersionLabel">added in</span> <span class="Documentation-sinceVersionVersion">v0.28.0</span> </span> </h4> <div class="Documentation-declaration"> <pre>func Test(options ...<a href="#TestOption">TestOption</a>) <a href="/github.com/google/cel-go/cel">cel</a>.<a href="/github.com/google/cel-go/cel#EnvOption">EnvOption</a></pre> </div> <p>Test provides a test() function that returns true. </p> </div><div class="Documentation-function"> <h4 tabindex="-1" id="TestVersion" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/kubernetes/apiserver/blob/v0.31.3/pkg/cel/library/test.go#L46">TestVersion</a> <a class="Documentation-idLink" href="#TestVersion" aria-label="Go to TestVersion">¶</a></span> <span class="Documentation-sinceVersion"> <span class="Documentation-sinceVersionLabel">added in</span> <span class="Documentation-sinceVersionVersion">v0.28.0</span> </span> </h4> <div class="Documentation-declaration"> <pre>func TestVersion(version <a href="/builtin#uint32">uint32</a>) func(lib *testLib) *testLib</pre> </div> </div><div class="Documentation-function"> <h4 tabindex="-1" id="URLs" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/kubernetes/apiserver/blob/v0.31.3/pkg/cel/library/urls.go#L107">URLs</a> <a class="Documentation-idLink" href="#URLs" aria-label="Go to URLs">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func URLs() <a href="/github.com/google/cel-go/cel">cel</a>.<a href="/github.com/google/cel-go/cel#EnvOption">EnvOption</a></pre> </div> <p>URLs provides a CEL function library extension of URL parsing functions. </p><p>url </p><p>Converts a string to a URL or results in an error if the string is not a valid URL. The URL must be an absolute URI or an absolute path. </p><pre>url(&lt;string&gt;) &lt;URL&gt; </pre><p>Examples: </p><pre>url(&#39;https://user:pass@example.com:80/path?query=val#fragment&#39;) // returns a URL url(&#39;/absolute-path&#39;) // returns a URL url(&#39;https://a:b:c/&#39;) // error url(&#39;../relative-path&#39;) // error </pre><p>isURL </p><p>Returns true if a string is a valid URL. The URL must be an absolute URI or an absolute path. </p><pre>isURL( &lt;string&gt;) &lt;bool&gt; </pre><p>Examples: </p><pre>isURL(&#39;https://user:pass@example.com:80/path?query=val#fragment&#39;) // returns true isURL(&#39;/absolute-path&#39;) // returns true isURL(&#39;https://a:b:c/&#39;) // returns false isURL(&#39;../relative-path&#39;) // returns false </pre><p>getScheme / getHost / getHostname / getPort / getEscapedPath / getQuery </p><p>Return the parsed components of a URL. </p><ul class="Documentation-bulletList"> <li><p>getScheme: If absent in the URL, returns an empty string. </p></li> <li><p>getHostname: IPv6 addresses are returned without braces, e.g. &#34;::1&#34;. If absent in the URL, returns an empty string. </p></li> <li><p>getHost: IPv6 addresses are returned with braces, e.g. &#34;[::1]&#34;. If absent in the URL, returns an empty string. </p></li> <li><p>getEscapedPath: The string returned by getEscapedPath is URL escaped, e.g. &#34;with space&#34; becomes &#34;with%20space&#34;. If absent in the URL, returns an empty string. </p></li> <li><p>getPort: If absent in the URL, returns an empty string. </p></li> <li><p>getQuery: Returns the query parameters in &#34;matrix&#34; form where a repeated query key is interpreted to mean that there are multiple values for that key. The keys and values are returned unescaped. If absent in the URL, returns an empty map. </p><p>&lt;URL&gt;.getScheme() &lt;string&gt; &lt;URL&gt;.getHost() &lt;string&gt; &lt;URL&gt;.getHostname() &lt;string&gt; &lt;URL&gt;.getPort() &lt;string&gt; &lt;URL&gt;.getEscapedPath() &lt;string&gt; &lt;URL&gt;.getQuery() &lt;map &lt;string&gt;, &lt;list &lt;string&gt;&gt; </p></li> </ul><p>Examples: </p><pre>url(&#39;/path&#39;).getScheme() // returns &#39;&#39; url(&#39;https://example.com/&#39;).getScheme() // returns &#39;https&#39; url(&#39;https://example.com:80/&#39;).getHost() // returns &#39;example.com:80&#39; url(&#39;https://example.com/&#39;).getHost() // returns &#39;example.com&#39; url(&#39;https://[::1]:80/&#39;).getHost() // returns &#39;[::1]:80&#39; url(&#39;https://[::1]/&#39;).getHost() // returns &#39;[::1]&#39; url(&#39;/path&#39;).getHost() // returns &#39;&#39; url(&#39;https://example.com:80/&#39;).getHostname() // returns &#39;example.com&#39; url(&#39;https://127.0.0.1:80/&#39;).getHostname() // returns &#39;127.0.0.1&#39; url(&#39;https://[::1]:80/&#39;).getHostname() // returns &#39;::1&#39; url(&#39;/path&#39;).getHostname() // returns &#39;&#39; url(&#39;https://example.com:80/&#39;).getPort() // returns &#39;80&#39; url(&#39;https://example.com/&#39;).getPort() // returns &#39;&#39; url(&#39;/path&#39;).getPort() // returns &#39;&#39; url(&#39;https://example.com/path&#39;).getEscapedPath() // returns &#39;/path&#39; url(&#39;https://example.com/path with spaces/&#39;).getEscapedPath() // returns &#39;/path%20with%20spaces/&#39; url(&#39;https://example.com&#39;).getEscapedPath() // returns &#39;&#39; url(&#39;https://example.com/path?k1=a&amp;k2=b&amp;k2=c&#39;).getQuery() // returns { &#39;k1&#39;: [&#39;a&#39;], &#39;k2&#39;: [&#39;b&#39;, &#39;c&#39;]} url(&#39;https://example.com/path?key with spaces=value with spaces&#39;).getQuery() // returns { &#39;key with spaces&#39;: [&#39;value with spaces&#39;]} url(&#39;https://example.com/path?&#39;).getQuery() // returns {} url(&#39;https://example.com/path&#39;).getQuery() // returns {} </pre> </div><div class="Documentation-function"> <h4 tabindex="-1" id="ZeroArgumentFunctionBinding" data-kind="function" class="Documentation-functionHeader"> <span>func <a class="Documentation-source" href="https://github.com/kubernetes/apiserver/blob/v0.31.3/pkg/cel/library/format.go#L96">ZeroArgumentFunctionBinding</a> <a class="Documentation-idLink" href="#ZeroArgumentFunctionBinding" aria-label="Go to ZeroArgumentFunctionBinding">¶</a></span> <span class="Documentation-sinceVersion"> <span class="Documentation-sinceVersionLabel">added in</span> <span class="Documentation-sinceVersionVersion">v0.31.0</span> </span> </h4> <div class="Documentation-declaration"> <pre>func ZeroArgumentFunctionBinding(binding func() <a href="/github.com/google/cel-go/common/types/ref">ref</a>.<a href="/github.com/google/cel-go/common/types/ref#Val">Val</a>) <a href="/github.com/google/cel-go/common/decls">decls</a>.<a href="/github.com/google/cel-go/common/decls#OverloadOpt">OverloadOpt</a></pre> </div> </div></section> <h3 tabindex="-1" id="pkg-types" class="Documentation-typesHeader">Types <a href="#pkg-types" aria-label="Go to Types">¶</a></h3> <section class="Documentation-types"><div class="Documentation-type"> <h4 tabindex="-1" id="CostEstimator" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://github.com/kubernetes/apiserver/blob/v0.31.3/pkg/cel/library/cost.go#L52">CostEstimator</a> <a class="Documentation-idLink" href="#CostEstimator" aria-label="Go to CostEstimator">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>type CostEstimator struct { <span id="CostEstimator.SizeEstimator" data-kind="field"> <span class="comment">// SizeEstimator provides a CostEstimator.EstimateSize that this CostEstimator will delegate size estimation</span> </span> <span class="comment">// calculations to if the size is not well known (i.e. a constant).</span> SizeEstimator <a href="/github.com/google/cel-go/checker">checker</a>.<a href="/github.com/google/cel-go/checker#CostEstimator">CostEstimator</a> }</pre> </div> <p>CostEstimator implements CEL&#39;s interpretable.ActualCostEstimator and checker.CostEstimator. </p> <div class="Documentation-typeMethod"> <h4 tabindex="-1" id="CostEstimator.CallCost" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*CostEstimator) <a class="Documentation-source" href="https://github.com/kubernetes/apiserver/blob/v0.31.3/pkg/cel/library/cost.go#L77">CallCost</a> <a class="Documentation-idLink" href="#CostEstimator.CallCost" aria-label="Go to CostEstimator.CallCost">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (l *<a href="#CostEstimator">CostEstimator</a>) CallCost(function, overloadId <a href="/builtin#string">string</a>, args []<a href="/github.com/google/cel-go/common/types/ref">ref</a>.<a href="/github.com/google/cel-go/common/types/ref#Val">Val</a>, result <a href="/github.com/google/cel-go/common/types/ref">ref</a>.<a href="/github.com/google/cel-go/common/types/ref#Val">Val</a>) *<a href="/builtin#uint64">uint64</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="CostEstimator.EstimateCallCost" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*CostEstimator) <a class="Documentation-source" href="https://github.com/kubernetes/apiserver/blob/v0.31.3/pkg/cel/library/cost.go#L245">EstimateCallCost</a> <a class="Documentation-idLink" href="#CostEstimator.EstimateCallCost" aria-label="Go to CostEstimator.EstimateCallCost">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (l *<a href="#CostEstimator">CostEstimator</a>) EstimateCallCost(function, overloadId <a href="/builtin#string">string</a>, target *<a href="/github.com/google/cel-go/checker">checker</a>.<a href="/github.com/google/cel-go/checker#AstNode">AstNode</a>, args []<a href="/github.com/google/cel-go/checker">checker</a>.<a href="/github.com/google/cel-go/checker#AstNode">AstNode</a>) *<a href="/github.com/google/cel-go/checker">checker</a>.<a href="/github.com/google/cel-go/checker#CallEstimate">CallEstimate</a></pre> </div> </div><div class="Documentation-typeMethod"> <h4 tabindex="-1" id="CostEstimator.EstimateSize" data-kind="method" class="Documentation-typeMethodHeader"> <span>func (*CostEstimator) <a class="Documentation-source" href="https://github.com/kubernetes/apiserver/blob/v0.31.3/pkg/cel/library/cost.go#L525">EstimateSize</a> <a class="Documentation-idLink" href="#CostEstimator.EstimateSize" aria-label="Go to CostEstimator.EstimateSize">¶</a></span> <span class="Documentation-sinceVersion"> </span> </h4> <div class="Documentation-declaration"> <pre>func (l *<a href="#CostEstimator">CostEstimator</a>) EstimateSize(element <a href="/github.com/google/cel-go/checker">checker</a>.<a href="/github.com/google/cel-go/checker#AstNode">AstNode</a>) *<a href="/github.com/google/cel-go/checker">checker</a>.<a href="/github.com/google/cel-go/checker#SizeEstimate">SizeEstimate</a></pre> </div> </div> </div><div class="Documentation-type"> <h4 tabindex="-1" id="Resource" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://github.com/kubernetes/apiserver/blob/v0.31.3/pkg/cel/library/authz.go#L586">Resource</a> <a class="Documentation-idLink" href="#Resource" aria-label="Go to Resource">¶</a></span> <span class="Documentation-sinceVersion"> <span class="Documentation-sinceVersionLabel">added in</span> <span class="Documentation-sinceVersionVersion">v0.27.0</span> </span> </h4> <div class="Documentation-declaration"> <pre>type Resource interface { <span id="Resource.GetName" data-kind="method"> <span class="comment">// GetName returns the name of the object as presented in the request. On a CREATE operation, the client</span> </span> <span class="comment">// may omit name and rely on the server to generate the name. If that is the case, this method will return</span> <span class="comment">// the empty string</span> GetName() <a href="/builtin#string">string</a> <span id="Resource.GetNamespace" data-kind="method"> <span class="comment">// GetNamespace is the namespace associated with the request (if any)</span> </span> GetNamespace() <a href="/builtin#string">string</a> <span id="Resource.GetResource" data-kind="method"> <span class="comment">// GetResource is the name of the resource being requested. This is not the kind. For example: pods</span> </span> GetResource() <a href="/k8s.io/apimachinery/pkg/runtime/schema">schema</a>.<a href="/k8s.io/apimachinery/pkg/runtime/schema#GroupVersionResource">GroupVersionResource</a> <span id="Resource.GetSubresource" data-kind="method"> <span class="comment">// GetSubresource is the name of the subresource being requested. This is a different resource, scoped to the parent resource, but it may have a different kind.</span> </span> <span class="comment">// For instance, /pods has the resource &#34;pods&#34; and the kind &#34;Pod&#34;, while /pods/foo/status has the resource &#34;pods&#34;, the sub resource &#34;status&#34;, and the kind &#34;Pod&#34;</span> <span class="comment">// (because status operates on pods). The binding resource for a pod though may be /pods/foo/binding, which has resource &#34;pods&#34;, subresource &#34;binding&#34;, and kind &#34;Binding&#34;.</span> GetSubresource() <a href="/builtin#string">string</a> }</pre> </div> <p>Resource represents an API resource </p> </div><div class="Documentation-type"> <h4 tabindex="-1" id="TestOption" data-kind="type" class="Documentation-typeHeader"> <span>type <a class="Documentation-source" href="https://github.com/kubernetes/apiserver/blob/v0.31.3/pkg/cel/library/test.go#L44">TestOption</a> <a class="Documentation-idLink" href="#TestOption" aria-label="Go to TestOption">¶</a></span> <span class="Documentation-sinceVersion"> <span class="Documentation-sinceVersionLabel">added in</span> <span class="Documentation-sinceVersionVersion">v0.28.0</span> </span> </h4> <div class="Documentation-declaration"> <pre>type TestOption func(*testLib) *testLib</pre> </div> </div></section></div> </div> </div> <div class="UnitFiles js-unitFiles"> <h2 class="UnitFiles-title" id="section-sourcefiles"> <img class="go-Icon" height="24" width="24" src="/static/shared/icon/insert_drive_file_gm_grey_24dp.svg" alt=""> Source Files <a class="UnitFiles-idLink" href="#section-sourcefiles" aria-label="Go to Source Files">¶</a> </h2> <div class="UnitFiles-titleLink"> <a href="https://github.com/kubernetes/apiserver/tree/v0.31.3/pkg/cel/library" target="_blank" rel="noopener">View all Source files</a> </div> <div> <ul class="UnitFiles-fileList"><li> <a href="https://github.com/kubernetes/apiserver/blob/v0.31.3/pkg/cel/library/authz.go" target="_blank" rel="noopener" title="authz.go">authz.go</a> </li><li> <a href="https://github.com/kubernetes/apiserver/blob/v0.31.3/pkg/cel/library/cidr.go" target="_blank" rel="noopener" title="cidr.go">cidr.go</a> </li><li> <a href="https://github.com/kubernetes/apiserver/blob/v0.31.3/pkg/cel/library/cost.go" target="_blank" rel="noopener" title="cost.go">cost.go</a> </li><li> <a href="https://github.com/kubernetes/apiserver/blob/v0.31.3/pkg/cel/library/format.go" target="_blank" rel="noopener" title="format.go">format.go</a> </li><li> <a href="https://github.com/kubernetes/apiserver/blob/v0.31.3/pkg/cel/library/ip.go" target="_blank" rel="noopener" title="ip.go">ip.go</a> </li><li> <a href="https://github.com/kubernetes/apiserver/blob/v0.31.3/pkg/cel/library/lists.go" target="_blank" rel="noopener" title="lists.go">lists.go</a> </li><li> <a href="https://github.com/kubernetes/apiserver/blob/v0.31.3/pkg/cel/library/quantity.go" target="_blank" rel="noopener" title="quantity.go">quantity.go</a> </li><li> <a href="https://github.com/kubernetes/apiserver/blob/v0.31.3/pkg/cel/library/regex.go" target="_blank" rel="noopener" title="regex.go">regex.go</a> </li><li> <a href="https://github.com/kubernetes/apiserver/blob/v0.31.3/pkg/cel/library/test.go" target="_blank" rel="noopener" title="test.go">test.go</a> </li><li> <a href="https://github.com/kubernetes/apiserver/blob/v0.31.3/pkg/cel/library/urls.go" target="_blank" rel="noopener" title="urls.go">urls.go</a> </li></ul> </div> </div> </div> </div> <div id="showInternal-description" hidden> Click to show internal directories. </div> <div id="hideInternal-description" hidden> Click to hide internal directories. </div> </article> <footer class="go-Main-footer"></footer> </main> <footer class="go-Footer"> <div class="go-Footer-links"> <div class="go-Footer-linkColumn"> <a href="https://go.dev/solutions" class="go-Footer-link go-Footer-link--primary" data-gtmc="footer link"> Why Go </a> <a href="https://go.dev/solutions#use-cases" class="go-Footer-link" data-gtmc="footer link"> Use Cases </a> <a href="https://go.dev/solutions#case-studies" class="go-Footer-link" data-gtmc="footer link"> Case Studies </a> </div> <div class="go-Footer-linkColumn"> <a href="https://learn.go.dev/" class="go-Footer-link go-Footer-link--primary" data-gtmc="footer link"> Get Started </a> <a href="https://play.golang.org" class="go-Footer-link" data-gtmc="footer link"> Playground </a> <a href="https://tour.golang.org" class="go-Footer-link" data-gtmc="footer link"> Tour </a> <a href="https://stackoverflow.com/questions/tagged/go?tab=Newest" class="go-Footer-link" data-gtmc="footer link"> Stack Overflow </a> <a href="https://go.dev/help" class="go-Footer-link" data-gtmc="footer link"> Help </a> </div> <div class="go-Footer-linkColumn"> <a href="https://pkg.go.dev" class="go-Footer-link go-Footer-link--primary" data-gtmc="footer link"> Packages </a> <a href="/std" class="go-Footer-link" data-gtmc="footer link"> Standard Library </a> <a href="/golang.org/x" class="go-Footer-link" data-gtmc="footer link"> Sub-repositories </a> <a href="https://pkg.go.dev/about" class="go-Footer-link" data-gtmc="footer link"> About Go Packages </a> </div> <div class="go-Footer-linkColumn"> <a href="https://go.dev/project" class="go-Footer-link go-Footer-link--primary" data-gtmc="footer link"> About </a> <a href="https://go.dev/dl/" class="go-Footer-link" data-gtmc="footer link">Download</a> <a href="https://go.dev/blog" class="go-Footer-link" data-gtmc="footer link">Blog</a> <a href="https://github.com/golang/go/issues" class="go-Footer-link" data-gtmc="footer link"> Issue Tracker </a> <a href="https://go.dev/doc/devel/release.html" class="go-Footer-link" data-gtmc="footer link"> Release Notes </a> <a href="https://blog.golang.org/go-brand" class="go-Footer-link" data-gtmc="footer link"> Brand Guidelines </a> <a href="https://go.dev/conduct" class="go-Footer-link" data-gtmc="footer link"> Code of Conduct </a> </div> <div class="go-Footer-linkColumn"> <a href="https://www.twitter.com/golang" class="go-Footer-link go-Footer-link--primary" data-gtmc="footer link"> Connect </a> <a href="https://www.twitter.com/golang" class="go-Footer-link" data-gtmc="footer link"> Twitter </a> <a href="https://github.com/golang" class="go-Footer-link" data-gtmc="footer link">GitHub</a> <a href="https://invite.slack.golangbridge.org/" class="go-Footer-link" data-gtmc="footer link"> Slack </a> <a href="https://reddit.com/r/golang" class="go-Footer-link" data-gtmc="footer link"> r/golang </a> <a href="https://www.meetup.com/pro/go" class="go-Footer-link" data-gtmc="footer link"> Meetup </a> <a href="https://golangweekly.com/" class="go-Footer-link" data-gtmc="footer link"> Golang Weekly </a> </div> </div> <div class="go-Footer-bottom"> <img class="go-Footer-gopher" width="1431" height="901" src="/static/shared/gopher/pilot-bust-1431x901.svg" alt="Gopher in flight goggles"> <ul class="go-Footer-listRow"> <li class="go-Footer-listItem"> <a href="https://go.dev/copyright" data-gtmc="footer link">Copyright</a> </li> <li class="go-Footer-listItem"> <a href="https://go.dev/tos" data-gtmc="footer link">Terms of Service</a> </li> <li class="go-Footer-listItem"> <a href="http://www.google.com/intl/en/policies/privacy/" data-gtmc="footer link" target="_blank" rel="noopener"> Privacy Policy </a> </li> <li class="go-Footer-listItem"> <a href="https://go.dev/s/pkgsite-feedback" target="_blank" rel="noopener" data-gtmc="footer link"> Report an Issue </a> </li> <li class="go-Footer-listItem"> <button class="go-Button go-Button--text go-Footer-toggleTheme js-toggleTheme" aria-label="Theme Toggle"> <img data-value="auto" class="go-Icon go-Icon--inverted" height="24" width="24" src="/static/shared/icon/brightness_6_gm_grey_24dp.svg" alt="System theme"> <img data-value="dark" class="go-Icon go-Icon--inverted" height="24" width="24" src="/static/shared/icon/brightness_2_gm_grey_24dp.svg" alt="Dark theme"> <img data-value="light" class="go-Icon go-Icon--inverted" height="24" width="24" src="/static/shared/icon/light_mode_gm_grey_24dp.svg" alt="Light theme"> <p> Theme Toggle </p> </button> </li> <li class="go-Footer-listItem"> <button class="go-Button go-Button--text go-Footer-keyboard js-openShortcuts" aria-label="Shorcuts Modal"> <img class="go-Icon go-Icon--inverted" height="24" width="24" src="/static/shared/icon/keyboard_grey_24dp.svg" alt=""> <p> Shortcuts Modal </p> </button> </li> </ul> <a class="go-Footer-googleLogo" href="https://google.com" target="_blank"rel="noopener" data-gtmc="footer link"> <img class="go-Footer-googleLogoImg" height="24" width="72" src="/static/shared/logo/google-white.svg" alt="Google logo"> </a> </div> </footer> <dialog id="jump-to-modal" class="JumpDialog go-Modal go-Modal--md js-modal"> <form method="dialog" data-gmtc="jump to form" aria-label="Jump to Identifier"> <div class="Dialog-title go-Modal-header"> <h2>Jump to</h2> <button class="go-Button go-Button--inline" type="button" data-modal-close data-gtmc="modal button" aria-label="Close" > <img class="go-Icon" height="24" width="24" src="/static/shared/icon/close_gm_grey_24dp.svg" alt="" /> </button> </div> <div class="JumpDialog-filter"> <input class="JumpDialog-input go-Input" autocomplete="off" type="text"> </div> <div class="JumpDialog-body go-Modal-body"> <div class="JumpDialog-list"></div> </div> <div class="go-Modal-actions"> <button class="go-Button" data-test-id="close-dialog">Close</button> </div> </form> </dialog> <dialog class="ShortcutsDialog go-Modal go-Modal--sm js-modal"> <form method="dialog"> <div class="go-Modal-header"> <h2>Keyboard shortcuts</h2> <button class="go-Button go-Button--inline" type="button" data-modal-close data-gtmc="modal button" aria-label="Close" > <img class="go-Icon" height="24" width="24" src="/static/shared/icon/close_gm_grey_24dp.svg" alt="" /> </button> </div> <div class="go-Modal-body"> <table> <tbody> <tr><td class="ShortcutsDialog-key"> <strong>?</strong></td><td> : This menu</td> </tr> <tr><td class="ShortcutsDialog-key"> <strong>/</strong></td><td> : Search site</td> </tr> <tr><td class="ShortcutsDialog-key"> <strong>f</strong> or <strong>F</strong></td><td> : Jump to</td> </tr> <tr> <td class="ShortcutsDialog-key"><strong>y</strong> or <strong>Y</strong></td> <td> : Canonical URL</td> </tr> </tbody> </table> </div> <div class="go-Modal-actions"> <button class="go-Button" data-test-id="close-dialog">Close</button> </div> </form> </dialog> <section class="Cookie-notice js-cookieNotice"> <div>go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic. <a target=_blank href="https://policies.google.com/technologies/cookies">Learn more.</a></div> <div><button class="go-Button">Okay</button></div> </section> <script> // this will throw if the querySelector can’t find the element const gtmId = document.querySelector('.js-gtmID').dataset.gtmid; if (!gtmId) { throw new Error('Google Tag Manager ID not found'); } loadScript(`https://www.googletagmanager.com/gtm.js?id=${gtmId}`); </script> <noscript> <iframe src="https://www.googletagmanager.com/ns.html?id=GTM-W8MVQXG" height="0" width="0" style="display:none;visibility:hidden"> </iframe> </noscript> <div class="js-canonicalURLPath" data-canonical-url-path="/k8s.io/apiserver@v0.31.3/pkg/cel/library" hidden></div> <div class="js-playgroundVars" data-modulepath="k8s.io/apiserver" data-version="v0.31.3" hidden></div> <script> loadScript('/static/frontend/unit/main/main.js') </script> <script> loadScript('/static/frontend/unit/unit.js') </script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10