Documentation ¶
Index ¶
- Constants
- func ToGojaObject(r *goja.Runtime, value any) goja.Value
- func ToMap(obj interface{}) map[string]interface{}
- func ToUnstructured(obj interface{}) *unstructured.Unstructured
- type Admission
- type AdmissionCode
- func (c *AdmissionCode) Created(obj *unstructured.Unstructured) error
- func (c *AdmissionCode) Deleted(obj *unstructured.Unstructured) error
- func (c *AdmissionCode) Init() error
- func (c *AdmissionCode) Mutate(operation admission.Operation, obj *unstructured.Unstructured) (*unstructured.Unstructured, error)
- func (c *AdmissionCode) Updated(obj *unstructured.Unstructured, old *unstructured.Unstructured) error
- func (c *AdmissionCode) Validate(operation admission.Operation, obj *unstructured.Unstructured) (*unstructured.Unstructured, error)
- type AdmissionList
- type Admissions
- type JsContext
- type JsFunction
- type JsRuntime
Constants ¶
View Source
const ( JsaInit = "jsa_init" JsaMutate = "jsa_mutate" JsaValidate = "jsa_validate" JsaCreated = "jsa_created" JsaUpdated = "jsa_updated" JsaDeleted = "jsa_deleted" )
Variables ¶
This section is empty.
Functions ¶
func ToUnstructured ¶
func ToUnstructured(obj interface{}) *unstructured.Unstructured
Types ¶
type Admission ¶
type AdmissionCode ¶
func (*AdmissionCode) Created ¶
func (c *AdmissionCode) Created(obj *unstructured.Unstructured) error
func (*AdmissionCode) Deleted ¶
func (c *AdmissionCode) Deleted(obj *unstructured.Unstructured) error
func (*AdmissionCode) Init ¶
func (c *AdmissionCode) Init() error
func (*AdmissionCode) Mutate ¶
func (c *AdmissionCode) Mutate(operation admission.Operation, obj *unstructured.Unstructured) (*unstructured.Unstructured, error)
func (*AdmissionCode) Updated ¶
func (c *AdmissionCode) Updated(obj *unstructured.Unstructured, old *unstructured.Unstructured) error
func (*AdmissionCode) Validate ¶
func (c *AdmissionCode) Validate(operation admission.Operation, obj *unstructured.Unstructured) (*unstructured.Unstructured, error)
type AdmissionList ¶
type AdmissionList struct {
// contains filtered or unexported fields
}
type Admissions ¶
type Admissions struct {
// contains filtered or unexported fields
}
func NewAdmissions ¶
func NewAdmissions() *Admissions
func (*Admissions) Find ¶
func (a *Admissions) Find(resource string, namespace string) []*AdmissionCode
Find returns admissions for current namespace and cluster if namespace != "".
For a namespace resource (like pods), all admissions for this namespace and for the cluster are returned. For a cluster resource (like clusterroles), only admissions for the cluster are returned.
func (*Admissions) Remove ¶
func (a *Admissions) Remove(namespace string, name string)
func (*Admissions) Upsert ¶
func (a *Admissions) Upsert(adm *Admission) (*AdmissionCode, error)
Click to show internal directories.
Click to hide internal directories.