Documentation ¶
Index ¶
- Variables
- type AdmissionRequestDie
- func (d *AdmissionRequestDie) DeepCopy() *AdmissionRequestDie
- func (d *AdmissionRequestDie) DieFeed(r admissionv1.AdmissionRequest) *AdmissionRequestDie
- func (d *AdmissionRequestDie) DieFeedJSON(j []byte) *AdmissionRequestDie
- func (d *AdmissionRequestDie) DieFeedPtr(r *admissionv1.AdmissionRequest) *AdmissionRequestDie
- func (d *AdmissionRequestDie) DieFeedRawExtension(raw runtime.RawExtension) *AdmissionRequestDie
- func (d *AdmissionRequestDie) DieFeedYAML(y []byte) *AdmissionRequestDie
- func (d *AdmissionRequestDie) DieFeedYAMLFile(name string) *AdmissionRequestDie
- func (d *AdmissionRequestDie) DieImmutable(immutable bool) *AdmissionRequestDie
- func (d *AdmissionRequestDie) DieRelease() admissionv1.AdmissionRequest
- func (d *AdmissionRequestDie) DieReleaseJSON() []byte
- func (d *AdmissionRequestDie) DieReleasePtr() *admissionv1.AdmissionRequest
- func (d *AdmissionRequestDie) DieReleaseRawExtension() runtime.RawExtension
- func (d *AdmissionRequestDie) DieReleaseYAML() []byte
- func (d *AdmissionRequestDie) DieStamp(fn func(r *admissionv1.AdmissionRequest)) *AdmissionRequestDie
- func (d *AdmissionRequestDie) DieStampAt(jp string, fn interface{}) *AdmissionRequestDie
- func (d *AdmissionRequestDie) DieWith(fns ...func(d *AdmissionRequestDie)) *AdmissionRequestDie
- func (d *AdmissionRequestDie) DryRun(v *bool) *AdmissionRequestDie
- func (d *AdmissionRequestDie) Kind(v metav1.GroupVersionKind) *AdmissionRequestDie
- func (d *AdmissionRequestDie) KindDie(fn func(d *diemetav1.GroupVersionKindDie)) *AdmissionRequestDie
- func (d *AdmissionRequestDie) Name(v string) *AdmissionRequestDie
- func (d *AdmissionRequestDie) Namespace(v string) *AdmissionRequestDie
- func (d *AdmissionRequestDie) Object(v runtime.RawExtension) *AdmissionRequestDie
- func (d *AdmissionRequestDie) OldObject(v runtime.RawExtension) *AdmissionRequestDie
- func (d *AdmissionRequestDie) Operation(v admissionv1.Operation) *AdmissionRequestDie
- func (d *AdmissionRequestDie) Options(v runtime.RawExtension) *AdmissionRequestDie
- func (d *AdmissionRequestDie) RequestKind(v *metav1.GroupVersionKind) *AdmissionRequestDie
- func (d *AdmissionRequestDie) RequestKindDie(fn func(d *diemetav1.GroupVersionKindDie)) *AdmissionRequestDie
- func (d *AdmissionRequestDie) RequestResource(v *metav1.GroupVersionResource) *AdmissionRequestDie
- func (d *AdmissionRequestDie) RequestResourceDie(fn func(d *diemetav1.GroupVersionResourceDie)) *AdmissionRequestDie
- func (d *AdmissionRequestDie) RequestSubResource(v string) *AdmissionRequestDie
- func (d *AdmissionRequestDie) Resource(v metav1.GroupVersionResource) *AdmissionRequestDie
- func (d *AdmissionRequestDie) ResourceDie(fn func(d *diemetav1.GroupVersionResourceDie)) *AdmissionRequestDie
- func (d *AdmissionRequestDie) SubResource(v string) *AdmissionRequestDie
- func (d *AdmissionRequestDie) UID(v types.UID) *AdmissionRequestDie
- func (d *AdmissionRequestDie) UserInfo(v authenticationv1.UserInfo) *AdmissionRequestDie
- func (d *AdmissionRequestDie) UserInfoDie(fn func(d *dieauthenticationv1.UserInfoDie)) *AdmissionRequestDie
- type AdmissionResponseDie
- func (d *AdmissionResponseDie) AddAuditAnnotation(key, value string) *AdmissionResponseDie
- func (d *AdmissionResponseDie) Allowed(v bool) *AdmissionResponseDie
- func (d *AdmissionResponseDie) AuditAnnotations(v map[string]string) *AdmissionResponseDie
- func (d *AdmissionResponseDie) DeepCopy() *AdmissionResponseDie
- func (d *AdmissionResponseDie) DieFeed(r admissionv1.AdmissionResponse) *AdmissionResponseDie
- func (d *AdmissionResponseDie) DieFeedJSON(j []byte) *AdmissionResponseDie
- func (d *AdmissionResponseDie) DieFeedPtr(r *admissionv1.AdmissionResponse) *AdmissionResponseDie
- func (d *AdmissionResponseDie) DieFeedRawExtension(raw runtime.RawExtension) *AdmissionResponseDie
- func (d *AdmissionResponseDie) DieFeedYAML(y []byte) *AdmissionResponseDie
- func (d *AdmissionResponseDie) DieFeedYAMLFile(name string) *AdmissionResponseDie
- func (d *AdmissionResponseDie) DieImmutable(immutable bool) *AdmissionResponseDie
- func (d *AdmissionResponseDie) DieRelease() admissionv1.AdmissionResponse
- func (d *AdmissionResponseDie) DieReleaseJSON() []byte
- func (d *AdmissionResponseDie) DieReleasePtr() *admissionv1.AdmissionResponse
- func (d *AdmissionResponseDie) DieReleaseRawExtension() runtime.RawExtension
- func (d *AdmissionResponseDie) DieReleaseYAML() []byte
- func (d *AdmissionResponseDie) DieStamp(fn func(r *admissionv1.AdmissionResponse)) *AdmissionResponseDie
- func (d *AdmissionResponseDie) DieStampAt(jp string, fn interface{}) *AdmissionResponseDie
- func (d *AdmissionResponseDie) DieWith(fns ...func(d *AdmissionResponseDie)) *AdmissionResponseDie
- func (d *AdmissionResponseDie) Patch(v []byte) *AdmissionResponseDie
- func (d *AdmissionResponseDie) PatchType(v *admissionv1.PatchType) *AdmissionResponseDie
- func (d *AdmissionResponseDie) Result(v *metav1.Status) *AdmissionResponseDie
- func (d *AdmissionResponseDie) ResultDie(fn func(d *diemetav1.StatusDie)) *AdmissionResponseDie
- func (d *AdmissionResponseDie) UID(v types.UID) *AdmissionResponseDie
- func (d *AdmissionResponseDie) Warnings(v ...string) *AdmissionResponseDie
- type AdmissionReviewDie
- func (d *AdmissionReviewDie) DeepCopy() *AdmissionReviewDie
- func (d *AdmissionReviewDie) DieFeed(r admissionv1.AdmissionReview) *AdmissionReviewDie
- func (d *AdmissionReviewDie) DieFeedJSON(j []byte) *AdmissionReviewDie
- func (d *AdmissionReviewDie) DieFeedPtr(r *admissionv1.AdmissionReview) *AdmissionReviewDie
- func (d *AdmissionReviewDie) DieFeedRawExtension(raw runtime.RawExtension) *AdmissionReviewDie
- func (d *AdmissionReviewDie) DieFeedYAML(y []byte) *AdmissionReviewDie
- func (d *AdmissionReviewDie) DieFeedYAMLFile(name string) *AdmissionReviewDie
- func (d *AdmissionReviewDie) DieImmutable(immutable bool) *AdmissionReviewDie
- func (d *AdmissionReviewDie) DieRelease() admissionv1.AdmissionReview
- func (d *AdmissionReviewDie) DieReleaseJSON() []byte
- func (d *AdmissionReviewDie) DieReleasePtr() *admissionv1.AdmissionReview
- func (d *AdmissionReviewDie) DieReleaseRawExtension() runtime.RawExtension
- func (d *AdmissionReviewDie) DieReleaseYAML() []byte
- func (d *AdmissionReviewDie) DieStamp(fn func(r *admissionv1.AdmissionReview)) *AdmissionReviewDie
- func (d *AdmissionReviewDie) DieStampAt(jp string, fn interface{}) *AdmissionReviewDie
- func (d *AdmissionReviewDie) DieWith(fns ...func(d *AdmissionReviewDie)) *AdmissionReviewDie
- func (d *AdmissionReviewDie) Request(v *admissionv1.AdmissionRequest) *AdmissionReviewDie
- func (d *AdmissionReviewDie) RequestDie(fn func(d *AdmissionRequestDie)) *AdmissionReviewDie
- func (d *AdmissionReviewDie) Response(v *admissionv1.AdmissionResponse) *AdmissionReviewDie
- func (d *AdmissionReviewDie) ResponseDie(fn func(d *AdmissionResponseDie)) *AdmissionReviewDie
- func (d *AdmissionReviewDie) TypeMeta(v metav1.TypeMeta) *AdmissionReviewDie
Constants ¶
This section is empty.
Variables ¶
var AdmissionRequestBlank = (&AdmissionRequestDie{}).DieFeed(admissionv1.AdmissionRequest{})
var AdmissionResponseBlank = (&AdmissionResponseDie{}).DieFeed(admissionv1.AdmissionResponse{})
var AdmissionReviewBlank = (&AdmissionReviewDie{}).DieFeed(admissionv1.AdmissionReview{})
Functions ¶
This section is empty.
Types ¶
type AdmissionRequestDie ¶
type AdmissionRequestDie struct {
// contains filtered or unexported fields
}
func (*AdmissionRequestDie) DeepCopy ¶
func (d *AdmissionRequestDie) DeepCopy() *AdmissionRequestDie
DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.
func (*AdmissionRequestDie) DieFeed ¶
func (d *AdmissionRequestDie) DieFeed(r admissionv1.AdmissionRequest) *AdmissionRequestDie
DieFeed returns a new die with the provided resource.
func (*AdmissionRequestDie) DieFeedJSON ¶ added in v0.8.0
func (d *AdmissionRequestDie) DieFeedJSON(j []byte) *AdmissionRequestDie
DieFeedJSON returns a new die with the provided JSON. Panics on error.
func (*AdmissionRequestDie) DieFeedPtr ¶
func (d *AdmissionRequestDie) DieFeedPtr(r *admissionv1.AdmissionRequest) *AdmissionRequestDie
DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.
func (*AdmissionRequestDie) DieFeedRawExtension ¶
func (d *AdmissionRequestDie) DieFeedRawExtension(raw runtime.RawExtension) *AdmissionRequestDie
DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.
func (*AdmissionRequestDie) DieFeedYAML ¶ added in v0.8.0
func (d *AdmissionRequestDie) DieFeedYAML(y []byte) *AdmissionRequestDie
DieFeedYAML returns a new die with the provided YAML. Panics on error.
func (*AdmissionRequestDie) DieFeedYAMLFile ¶ added in v0.8.0
func (d *AdmissionRequestDie) DieFeedYAMLFile(name string) *AdmissionRequestDie
DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.
func (*AdmissionRequestDie) DieImmutable ¶
func (d *AdmissionRequestDie) DieImmutable(immutable bool) *AdmissionRequestDie
DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).
func (*AdmissionRequestDie) DieRelease ¶
func (d *AdmissionRequestDie) DieRelease() admissionv1.AdmissionRequest
DieRelease returns the resource managed by the die.
func (*AdmissionRequestDie) DieReleaseJSON ¶ added in v0.8.0
func (d *AdmissionRequestDie) DieReleaseJSON() []byte
DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.
func (*AdmissionRequestDie) DieReleasePtr ¶
func (d *AdmissionRequestDie) DieReleasePtr() *admissionv1.AdmissionRequest
DieReleasePtr returns a pointer to the resource managed by the die.
func (*AdmissionRequestDie) DieReleaseRawExtension ¶
func (d *AdmissionRequestDie) DieReleaseRawExtension() runtime.RawExtension
DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.
func (*AdmissionRequestDie) DieReleaseYAML ¶ added in v0.8.0
func (d *AdmissionRequestDie) DieReleaseYAML() []byte
DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.
func (*AdmissionRequestDie) DieStamp ¶
func (d *AdmissionRequestDie) DieStamp(fn func(r *admissionv1.AdmissionRequest)) *AdmissionRequestDie
DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.
func (*AdmissionRequestDie) DieStampAt ¶ added in v0.8.0
func (d *AdmissionRequestDie) DieStampAt(jp string, fn interface{}) *AdmissionRequestDie
Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.
Future iterations will improve type coercion from the resource to the callback argument.
func (*AdmissionRequestDie) DieWith ¶ added in v0.9.0
func (d *AdmissionRequestDie) DieWith(fns ...func(d *AdmissionRequestDie)) *AdmissionRequestDie
DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.
func (*AdmissionRequestDie) DryRun ¶
func (d *AdmissionRequestDie) DryRun(v *bool) *AdmissionRequestDie
DryRun indicates that modifications will definitely not be persisted for this request.
Defaults to false.
func (*AdmissionRequestDie) Kind ¶
func (d *AdmissionRequestDie) Kind(v metav1.GroupVersionKind) *AdmissionRequestDie
Kind is the fully-qualified type of object being submitted (for example, v1.Pod or autoscaling.v1.Scale)
func (*AdmissionRequestDie) KindDie ¶
func (d *AdmissionRequestDie) KindDie(fn func(d *diemetav1.GroupVersionKindDie)) *AdmissionRequestDie
func (*AdmissionRequestDie) Name ¶
func (d *AdmissionRequestDie) Name(v string) *AdmissionRequestDie
Name is the name of the object as presented in the request. On a CREATE operation, the client may omit name and
rely on the server to generate the name. If that is the case, this field will contain an empty string.
func (*AdmissionRequestDie) Namespace ¶
func (d *AdmissionRequestDie) Namespace(v string) *AdmissionRequestDie
Namespace is the namespace associated with the request (if any).
func (*AdmissionRequestDie) Object ¶
func (d *AdmissionRequestDie) Object(v runtime.RawExtension) *AdmissionRequestDie
Object is the object from the incoming request.
func (*AdmissionRequestDie) OldObject ¶
func (d *AdmissionRequestDie) OldObject(v runtime.RawExtension) *AdmissionRequestDie
OldObject is the existing object. Only populated for DELETE and UPDATE requests.
func (*AdmissionRequestDie) Operation ¶
func (d *AdmissionRequestDie) Operation(v admissionv1.Operation) *AdmissionRequestDie
Operation is the operation being performed. This may be different than the operation
requested. e.g. a patch can result in either a CREATE or UPDATE Operation.
func (*AdmissionRequestDie) Options ¶
func (d *AdmissionRequestDie) Options(v runtime.RawExtension) *AdmissionRequestDie
Options is the operation option structure of the operation being performed.
e.g. `meta.k8s.io/v1.DeleteOptions` or `meta.k8s.io/v1.CreateOptions`. This may be
different than the options the caller provided. e.g. for a patch request the performed
Operation might be a CREATE, in which case the Options will a ¶
`meta.k8s.io/v1.CreateOptions` even though the caller provided `meta.k8s.io/v1.PatchOptions`.
func (*AdmissionRequestDie) RequestKind ¶
func (d *AdmissionRequestDie) RequestKind(v *metav1.GroupVersionKind) *AdmissionRequestDie
RequestKind is the fully-qualified type of the original API request (for example, v1.Pod or autoscaling.v1.Scale).
If this is specified and differs from the value in "kind", an equivalent match and conversion was performed.
For example, if deployments can be modified via apps/v1 and apps/v1beta1, and a webhook registered a rule of
`apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]` and `matchPolicy: Equivalent`,
an API request to apps/v1beta1 deployments would be converted and sent to the webhook
with `kind: {group:"apps", version:"v1", kind:"Deployment"}` (matching the rule the webhook registered for),
and `requestKind: {group:"apps", version:"v1beta1", kind:"Deployment"}` (indicating the kind of the original API request).
See documentation for the "matchPolicy" field in the webhook configuration type for more details.
func (*AdmissionRequestDie) RequestKindDie ¶
func (d *AdmissionRequestDie) RequestKindDie(fn func(d *diemetav1.GroupVersionKindDie)) *AdmissionRequestDie
func (*AdmissionRequestDie) RequestResource ¶
func (d *AdmissionRequestDie) RequestResource(v *metav1.GroupVersionResource) *AdmissionRequestDie
RequestResource is the fully-qualified resource of the original API request (for example, v1.pods).
If this is specified and differs from the value in "resource", an equivalent match and conversion was performed.
For example, if deployments can be modified via apps/v1 and apps/v1beta1, and a webhook registered a rule of
`apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]` and `matchPolicy: Equivalent`,
an API request to apps/v1beta1 deployments would be converted and sent to the webhook
with `resource: {group:"apps", version:"v1", resource:"deployments"}` (matching the resource the webhook registered for),
and `requestResource: {group:"apps", version:"v1beta1", resource:"deployments"}` (indicating the resource of the original API request).
See documentation for the "matchPolicy" field in the webhook configuration type.
func (*AdmissionRequestDie) RequestResourceDie ¶
func (d *AdmissionRequestDie) RequestResourceDie(fn func(d *diemetav1.GroupVersionResourceDie)) *AdmissionRequestDie
func (*AdmissionRequestDie) RequestSubResource ¶
func (d *AdmissionRequestDie) RequestSubResource(v string) *AdmissionRequestDie
RequestSubResource is the name of the subresource of the original API request, if any (for example, "status" or "scale")
If this is specified and differs from the value in "subResource", an equivalent match and conversion was performed.
See documentation for the "matchPolicy" field in the webhook configuration type.
func (*AdmissionRequestDie) Resource ¶
func (d *AdmissionRequestDie) Resource(v metav1.GroupVersionResource) *AdmissionRequestDie
Resource is the fully-qualified resource being requested (for example, v1.pods)
func (*AdmissionRequestDie) ResourceDie ¶
func (d *AdmissionRequestDie) ResourceDie(fn func(d *diemetav1.GroupVersionResourceDie)) *AdmissionRequestDie
func (*AdmissionRequestDie) SubResource ¶
func (d *AdmissionRequestDie) SubResource(v string) *AdmissionRequestDie
SubResource is the subresource being requested, if any (for example, "status" or "scale")
func (*AdmissionRequestDie) UID ¶
func (d *AdmissionRequestDie) UID(v types.UID) *AdmissionRequestDie
UID is an identifier for the individual request/response. It allows us to distinguish instances of requests which are
otherwise identical (parallel requests, requests when earlier requests did not modify etc)
The UID is meant to track the round trip (request/response) between the KAS and the WebHook, not the user request.
It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging.
func (*AdmissionRequestDie) UserInfo ¶
func (d *AdmissionRequestDie) UserInfo(v authenticationv1.UserInfo) *AdmissionRequestDie
UserInfo is information about the requesting user
func (*AdmissionRequestDie) UserInfoDie ¶
func (d *AdmissionRequestDie) UserInfoDie(fn func(d *dieauthenticationv1.UserInfoDie)) *AdmissionRequestDie
type AdmissionResponseDie ¶
type AdmissionResponseDie struct {
// contains filtered or unexported fields
}
func (*AdmissionResponseDie) AddAuditAnnotation ¶
func (d *AdmissionResponseDie) AddAuditAnnotation(key, value string) *AdmissionResponseDie
func (*AdmissionResponseDie) Allowed ¶
func (d *AdmissionResponseDie) Allowed(v bool) *AdmissionResponseDie
Allowed indicates whether or not the admission request was permitted.
func (*AdmissionResponseDie) AuditAnnotations ¶
func (d *AdmissionResponseDie) AuditAnnotations(v map[string]string) *AdmissionResponseDie
AuditAnnotations is an unstructured key value map set by remote admission controller (e.g. error=image-blacklisted).
MutatingAdmissionWebhook and ValidatingAdmissionWebhook admission controller will prefix the keys with ¶
admission webhook name (e.g. imagepolicy.example.com/error=image-blacklisted). AuditAnnotations will be provided by
the admission webhook to add additional context to the audit log for this request.
func (*AdmissionResponseDie) DeepCopy ¶
func (d *AdmissionResponseDie) DeepCopy() *AdmissionResponseDie
DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.
func (*AdmissionResponseDie) DieFeed ¶
func (d *AdmissionResponseDie) DieFeed(r admissionv1.AdmissionResponse) *AdmissionResponseDie
DieFeed returns a new die with the provided resource.
func (*AdmissionResponseDie) DieFeedJSON ¶ added in v0.8.0
func (d *AdmissionResponseDie) DieFeedJSON(j []byte) *AdmissionResponseDie
DieFeedJSON returns a new die with the provided JSON. Panics on error.
func (*AdmissionResponseDie) DieFeedPtr ¶
func (d *AdmissionResponseDie) DieFeedPtr(r *admissionv1.AdmissionResponse) *AdmissionResponseDie
DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.
func (*AdmissionResponseDie) DieFeedRawExtension ¶
func (d *AdmissionResponseDie) DieFeedRawExtension(raw runtime.RawExtension) *AdmissionResponseDie
DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.
func (*AdmissionResponseDie) DieFeedYAML ¶ added in v0.8.0
func (d *AdmissionResponseDie) DieFeedYAML(y []byte) *AdmissionResponseDie
DieFeedYAML returns a new die with the provided YAML. Panics on error.
func (*AdmissionResponseDie) DieFeedYAMLFile ¶ added in v0.8.0
func (d *AdmissionResponseDie) DieFeedYAMLFile(name string) *AdmissionResponseDie
DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.
func (*AdmissionResponseDie) DieImmutable ¶
func (d *AdmissionResponseDie) DieImmutable(immutable bool) *AdmissionResponseDie
DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).
func (*AdmissionResponseDie) DieRelease ¶
func (d *AdmissionResponseDie) DieRelease() admissionv1.AdmissionResponse
DieRelease returns the resource managed by the die.
func (*AdmissionResponseDie) DieReleaseJSON ¶ added in v0.8.0
func (d *AdmissionResponseDie) DieReleaseJSON() []byte
DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.
func (*AdmissionResponseDie) DieReleasePtr ¶
func (d *AdmissionResponseDie) DieReleasePtr() *admissionv1.AdmissionResponse
DieReleasePtr returns a pointer to the resource managed by the die.
func (*AdmissionResponseDie) DieReleaseRawExtension ¶
func (d *AdmissionResponseDie) DieReleaseRawExtension() runtime.RawExtension
DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.
func (*AdmissionResponseDie) DieReleaseYAML ¶ added in v0.8.0
func (d *AdmissionResponseDie) DieReleaseYAML() []byte
DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.
func (*AdmissionResponseDie) DieStamp ¶
func (d *AdmissionResponseDie) DieStamp(fn func(r *admissionv1.AdmissionResponse)) *AdmissionResponseDie
DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.
func (*AdmissionResponseDie) DieStampAt ¶ added in v0.8.0
func (d *AdmissionResponseDie) DieStampAt(jp string, fn interface{}) *AdmissionResponseDie
Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.
Future iterations will improve type coercion from the resource to the callback argument.
func (*AdmissionResponseDie) DieWith ¶ added in v0.9.0
func (d *AdmissionResponseDie) DieWith(fns ...func(d *AdmissionResponseDie)) *AdmissionResponseDie
DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.
func (*AdmissionResponseDie) Patch ¶
func (d *AdmissionResponseDie) Patch(v []byte) *AdmissionResponseDie
The patch body. Currently we only support "JSONPatch" which implements RFC 6902.
func (*AdmissionResponseDie) PatchType ¶
func (d *AdmissionResponseDie) PatchType(v *admissionv1.PatchType) *AdmissionResponseDie
The type of Patch. Currently we only allow "JSONPatch".
func (*AdmissionResponseDie) Result ¶
func (d *AdmissionResponseDie) Result(v *metav1.Status) *AdmissionResponseDie
Result contains extra details into why an admission request was denied.
This field IS NOT consulted in any way if "Allowed" is "true".
func (*AdmissionResponseDie) ResultDie ¶
func (d *AdmissionResponseDie) ResultDie(fn func(d *diemetav1.StatusDie)) *AdmissionResponseDie
func (*AdmissionResponseDie) UID ¶
func (d *AdmissionResponseDie) UID(v types.UID) *AdmissionResponseDie
UID is an identifier for the individual request/response.
This must be copied over from the corresponding AdmissionRequest.
func (*AdmissionResponseDie) Warnings ¶
func (d *AdmissionResponseDie) Warnings(v ...string) *AdmissionResponseDie
warnings is a list of warning messages to return to the requesting API client.
Warning messages describe a problem the client making the API request should correct or be aware of.
Limit warnings to 120 characters if possible.
Warnings over 256 characters and large numbers of warnings may be truncated.
type AdmissionReviewDie ¶
type AdmissionReviewDie struct {
// contains filtered or unexported fields
}
func (*AdmissionReviewDie) DeepCopy ¶
func (d *AdmissionReviewDie) DeepCopy() *AdmissionReviewDie
DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.
func (*AdmissionReviewDie) DieFeed ¶
func (d *AdmissionReviewDie) DieFeed(r admissionv1.AdmissionReview) *AdmissionReviewDie
DieFeed returns a new die with the provided resource.
func (*AdmissionReviewDie) DieFeedJSON ¶ added in v0.8.0
func (d *AdmissionReviewDie) DieFeedJSON(j []byte) *AdmissionReviewDie
DieFeedJSON returns a new die with the provided JSON. Panics on error.
func (*AdmissionReviewDie) DieFeedPtr ¶
func (d *AdmissionReviewDie) DieFeedPtr(r *admissionv1.AdmissionReview) *AdmissionReviewDie
DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.
func (*AdmissionReviewDie) DieFeedRawExtension ¶
func (d *AdmissionReviewDie) DieFeedRawExtension(raw runtime.RawExtension) *AdmissionReviewDie
DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.
func (*AdmissionReviewDie) DieFeedYAML ¶ added in v0.8.0
func (d *AdmissionReviewDie) DieFeedYAML(y []byte) *AdmissionReviewDie
DieFeedYAML returns a new die with the provided YAML. Panics on error.
func (*AdmissionReviewDie) DieFeedYAMLFile ¶ added in v0.8.0
func (d *AdmissionReviewDie) DieFeedYAMLFile(name string) *AdmissionReviewDie
DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.
func (*AdmissionReviewDie) DieImmutable ¶
func (d *AdmissionReviewDie) DieImmutable(immutable bool) *AdmissionReviewDie
DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).
func (*AdmissionReviewDie) DieRelease ¶
func (d *AdmissionReviewDie) DieRelease() admissionv1.AdmissionReview
DieRelease returns the resource managed by the die.
func (*AdmissionReviewDie) DieReleaseJSON ¶ added in v0.8.0
func (d *AdmissionReviewDie) DieReleaseJSON() []byte
DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.
func (*AdmissionReviewDie) DieReleasePtr ¶
func (d *AdmissionReviewDie) DieReleasePtr() *admissionv1.AdmissionReview
DieReleasePtr returns a pointer to the resource managed by the die.
func (*AdmissionReviewDie) DieReleaseRawExtension ¶
func (d *AdmissionReviewDie) DieReleaseRawExtension() runtime.RawExtension
DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.
func (*AdmissionReviewDie) DieReleaseYAML ¶ added in v0.8.0
func (d *AdmissionReviewDie) DieReleaseYAML() []byte
DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.
func (*AdmissionReviewDie) DieStamp ¶
func (d *AdmissionReviewDie) DieStamp(fn func(r *admissionv1.AdmissionReview)) *AdmissionReviewDie
DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.
func (*AdmissionReviewDie) DieStampAt ¶ added in v0.8.0
func (d *AdmissionReviewDie) DieStampAt(jp string, fn interface{}) *AdmissionReviewDie
Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.
Future iterations will improve type coercion from the resource to the callback argument.
func (*AdmissionReviewDie) DieWith ¶ added in v0.9.0
func (d *AdmissionReviewDie) DieWith(fns ...func(d *AdmissionReviewDie)) *AdmissionReviewDie
DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.
func (*AdmissionReviewDie) Request ¶
func (d *AdmissionReviewDie) Request(v *admissionv1.AdmissionRequest) *AdmissionReviewDie
Request describes the attributes for the admission request.
func (*AdmissionReviewDie) RequestDie ¶
func (d *AdmissionReviewDie) RequestDie(fn func(d *AdmissionRequestDie)) *AdmissionReviewDie
func (*AdmissionReviewDie) Response ¶
func (d *AdmissionReviewDie) Response(v *admissionv1.AdmissionResponse) *AdmissionReviewDie
Response describes the attributes for the admission response.
func (*AdmissionReviewDie) ResponseDie ¶
func (d *AdmissionReviewDie) ResponseDie(fn func(d *AdmissionResponseDie)) *AdmissionReviewDie
func (*AdmissionReviewDie) TypeMeta ¶
func (d *AdmissionReviewDie) TypeMeta(v metav1.TypeMeta) *AdmissionReviewDie