v1alpha1

package
v0.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the policy v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/google/knative-gcp/pkg/apis/policy +k8s:defaulter-gen=TypeMeta +groupName=policy.run.cloud.google.com

Index

Constants

View Source
const (
	// PolicyBindingConditionReady has status True when the binding is active.
	PolicyBindingConditionReady = apis.ConditionReady
)

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: policy.GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects

Functions

func CheckImmutableBindingObjectMeta

func CheckImmutableBindingObjectMeta(ctx context.Context, current, original *metav1.ObjectMeta) *apis.FieldError

CheckImmutableBindingObjectMeta checks the immutable fields in policy binding ObjectMeta.

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

func ValidateStringMatches

func ValidateStringMatches(ctx context.Context, matches []StringMatch, field string) *apis.FieldError

ValidateStringMatches a slice of StringMatch.

Types

type EventPolicy

type EventPolicy struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec EventPolicySpec `json:"spec"`
}

EventPolicy is a specification for cloudevent traffic policy.

func (*EventPolicy) DeepCopy

func (in *EventPolicy) DeepCopy() *EventPolicy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventPolicy.

func (*EventPolicy) DeepCopyInto

func (in *EventPolicy) DeepCopyInto(out *EventPolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*EventPolicy) DeepCopyObject

func (in *EventPolicy) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*EventPolicy) GetGroupVersionKind

func (p *EventPolicy) GetGroupVersionKind() schema.GroupVersionKind

GetGroupVersionKind returns GroupVersionKind for EventPolicy

func (*EventPolicy) GetUntypedSpec

func (p *EventPolicy) GetUntypedSpec() interface{}

GetUntypedSpec returns the spec of the EventPolicy.

func (*EventPolicy) SetDefaults

func (p *EventPolicy) SetDefaults(ctx context.Context)

SetDefaults sets default for EventPolicy.

func (*EventPolicy) Validate

func (p *EventPolicy) Validate(ctx context.Context) *apis.FieldError

Validate validates a EventPolicy.

type EventPolicyBinding

type EventPolicyBinding struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   PolicyBindingSpec   `json:"spec"`
	Status PolicyBindingStatus `json:"status"`
}

EventPolicyBinding is the binding of an event policy to a subject.

func (*EventPolicyBinding) CheckImmutableFields

func (pb *EventPolicyBinding) CheckImmutableFields(ctx context.Context, original *EventPolicyBinding) *apis.FieldError

CheckImmutableFields checks if any immutable fields are changed in an EventPolicyBinding.

func (*EventPolicyBinding) DeepCopy

func (in *EventPolicyBinding) DeepCopy() *EventPolicyBinding

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventPolicyBinding.

func (*EventPolicyBinding) DeepCopyInto

func (in *EventPolicyBinding) DeepCopyInto(out *EventPolicyBinding)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*EventPolicyBinding) DeepCopyObject

func (in *EventPolicyBinding) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*EventPolicyBinding) GetBindingStatus

func (p *EventPolicyBinding) GetBindingStatus() duck.BindableStatus

GetBindingStatus returns the status of the Binding, which must implement BindableStatus. This implements duck.Bindable.

func (*EventPolicyBinding) GetGroupVersionKind

func (p *EventPolicyBinding) GetGroupVersionKind() schema.GroupVersionKind

GetGroupVersionKind returns GroupVersionKind for EventPolicyBinding.

func (*EventPolicyBinding) GetSubject

func (p *EventPolicyBinding) GetSubject() tracker.Reference

GetSubject returns the standard Binding duck's "Subject" field. This implements duck.Bindable.

func (*EventPolicyBinding) GetUntypedSpec

func (p *EventPolicyBinding) GetUntypedSpec() interface{}

GetUntypedSpec returns the spec of the EventPolicyBinding.

func (*EventPolicyBinding) SetDefaults

func (pb *EventPolicyBinding) SetDefaults(ctx context.Context)

SetDefaults sets defaults for the HTTPPolicyBinding.

func (*EventPolicyBinding) Validate

func (pb *EventPolicyBinding) Validate(ctx context.Context) *apis.FieldError

Validate validates the EventPolicyBinding.

type EventPolicyBindingList

type EventPolicyBindingList struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []EventPolicyBinding `json:"items"`
}

EventPolicyBindingList is a collection of EventPolicyBindings.

func (*EventPolicyBindingList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventPolicyBindingList.

func (*EventPolicyBindingList) DeepCopyInto

func (in *EventPolicyBindingList) DeepCopyInto(out *EventPolicyBindingList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*EventPolicyBindingList) DeepCopyObject

func (in *EventPolicyBindingList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type EventPolicyList

type EventPolicyList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []EventPolicy `json:"items"`
}

EventPolicyList is a collection of EventPolicy.

func (*EventPolicyList) DeepCopy

func (in *EventPolicyList) DeepCopy() *EventPolicyList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventPolicyList.

func (*EventPolicyList) DeepCopyInto

func (in *EventPolicyList) DeepCopyInto(out *EventPolicyList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*EventPolicyList) DeepCopyObject

func (in *EventPolicyList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type EventPolicyRuleSpec

type EventPolicyRuleSpec struct {
	// JWTRule inlines the rule for checking the JWT.
	JWTRule `json:",inline"`

	// Operations is a list of operation attributes to match.
	Operations []RequestOperation `json:"operations,omitempty"`

	ID          []StringMatch    `json:"id,omitempty"`
	Source      []StringMatch    `json:"source,omitempty"`
	Type        []StringMatch    `json:"type,omitempty"`
	DataSchema  []StringMatch    `json:"dataschema,omitempty"`
	Subject     []StringMatch    `json:"subject,omitempty"`
	ContentType []StringMatch    `json:"contenttype,omitempty"`
	Extensions  []KeyValuesMatch `json:"extensions,omitempty"`
}

EventPolicyRuleSpec defines the rule specification for EventPolicy.

func (*EventPolicyRuleSpec) DeepCopy

func (in *EventPolicyRuleSpec) DeepCopy() *EventPolicyRuleSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventPolicyRuleSpec.

func (*EventPolicyRuleSpec) DeepCopyInto

func (in *EventPolicyRuleSpec) DeepCopyInto(out *EventPolicyRuleSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*EventPolicyRuleSpec) Validate

Validate validates a EventPolicyRuleSpec.

type EventPolicySpec

type EventPolicySpec struct {
	// JWT specifies the parameters to validate JTWs.
	// If omitted, authentication will be skipped.
	JWT *JWTSpec `json:"jwt,omitempty"`

	// Rules is the list of rules to check for the policy.
	// The rules should be evaluated in order. If the request under check
	// passes one rule, it passes the policy check.
	// If Rules is not specified, it implies the policy is to "allow all".
	// If an empty rule is specified in Rules, it implies the policy is to "reject all".
	Rules []EventPolicyRuleSpec `json:"rules,omitempty"`
}

EventPolicySpec is the specification for EventPolicy.

func (*EventPolicySpec) DeepCopy

func (in *EventPolicySpec) DeepCopy() *EventPolicySpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventPolicySpec.

func (*EventPolicySpec) DeepCopyInto

func (in *EventPolicySpec) DeepCopyInto(out *EventPolicySpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HTTPPolicy

type HTTPPolicy struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec HTTPPolicySpec `json:"spec"`
}

HTTPPolicy is the specification for HTTP traffic policy.

func (*HTTPPolicy) DeepCopy

func (in *HTTPPolicy) DeepCopy() *HTTPPolicy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPPolicy.

func (*HTTPPolicy) DeepCopyInto

func (in *HTTPPolicy) DeepCopyInto(out *HTTPPolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*HTTPPolicy) DeepCopyObject

func (in *HTTPPolicy) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*HTTPPolicy) GetGroupVersionKind

func (p *HTTPPolicy) GetGroupVersionKind() schema.GroupVersionKind

GetGroupVersionKind returns GroupVersionKind for HTTPPolicy.

func (*HTTPPolicy) GetUntypedSpec

func (p *HTTPPolicy) GetUntypedSpec() interface{}

GetUntypedSpec returns the spec of the HTTPPolicy.

func (*HTTPPolicy) SetDefaults

func (p *HTTPPolicy) SetDefaults(ctx context.Context)

SetDefaults sets default for HTTPPolicy.

func (*HTTPPolicy) Validate

func (p *HTTPPolicy) Validate(ctx context.Context) *apis.FieldError

Validate validates a HTTPPolicy.

type HTTPPolicyBinding

type HTTPPolicyBinding struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   PolicyBindingSpec   `json:"spec"`
	Status PolicyBindingStatus `json:"status"`
}

HTTPPolicyBinding is the binding of a HTTP policy to a subject.

func (*HTTPPolicyBinding) CheckImmutableFields

func (pb *HTTPPolicyBinding) CheckImmutableFields(ctx context.Context, original *HTTPPolicyBinding) *apis.FieldError

CheckImmutableFields checks if any immutable fields are changed in a HTTPPolicyBinding.

func (*HTTPPolicyBinding) DeepCopy

func (in *HTTPPolicyBinding) DeepCopy() *HTTPPolicyBinding

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPPolicyBinding.

func (*HTTPPolicyBinding) DeepCopyInto

func (in *HTTPPolicyBinding) DeepCopyInto(out *HTTPPolicyBinding)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*HTTPPolicyBinding) DeepCopyObject

func (in *HTTPPolicyBinding) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*HTTPPolicyBinding) GetBindingStatus

func (p *HTTPPolicyBinding) GetBindingStatus() duck.BindableStatus

GetBindingStatus returns the status of the Binding, which must implement BindableStatus. This implements duck.Bindable.

func (*HTTPPolicyBinding) GetGroupVersionKind

func (p *HTTPPolicyBinding) GetGroupVersionKind() schema.GroupVersionKind

GetGroupVersionKind returns GroupVersionKind for HTTPPolicyBinding.

func (*HTTPPolicyBinding) GetSubject

func (p *HTTPPolicyBinding) GetSubject() tracker.Reference

GetSubject returns the standard Binding duck's "Subject" field. This implements duck.Bindable.

func (*HTTPPolicyBinding) GetUntypedSpec

func (p *HTTPPolicyBinding) GetUntypedSpec() interface{}

GetUntypedSpec returns the spec of the HTTPPolicyBinding.

func (*HTTPPolicyBinding) SetDefaults

func (pb *HTTPPolicyBinding) SetDefaults(ctx context.Context)

SetDefaults sets defaults for the HTTPPolicyBinding.

func (*HTTPPolicyBinding) Validate

func (pb *HTTPPolicyBinding) Validate(ctx context.Context) *apis.FieldError

Validate validates the HTTPPolicyBinding.

type HTTPPolicyBindingList

type HTTPPolicyBindingList struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []HTTPPolicyBinding `json:"items"`
}

HTTPPolicyBindingList is a collection of HTTPPolicyBindings.

func (*HTTPPolicyBindingList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPPolicyBindingList.

func (*HTTPPolicyBindingList) DeepCopyInto

func (in *HTTPPolicyBindingList) DeepCopyInto(out *HTTPPolicyBindingList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*HTTPPolicyBindingList) DeepCopyObject

func (in *HTTPPolicyBindingList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type HTTPPolicyList

type HTTPPolicyList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []HTTPPolicy `json:"items"`
}

HTTPPolicyList is a collection of HTTPPolicy.

func (*HTTPPolicyList) DeepCopy

func (in *HTTPPolicyList) DeepCopy() *HTTPPolicyList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPPolicyList.

func (*HTTPPolicyList) DeepCopyInto

func (in *HTTPPolicyList) DeepCopyInto(out *HTTPPolicyList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*HTTPPolicyList) DeepCopyObject

func (in *HTTPPolicyList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type HTTPPolicyRuleSpec

type HTTPPolicyRuleSpec struct {
	// JWTRule inlines the rule for checking the JWT.
	JWTRule `json:",inline"`

	// Operations is a list of operation attributes to match.
	Operations []RequestOperation `json:"operations,omitempty"`

	// Headers is a list of headers to match.
	Headers []KeyValuesMatch `json:"headers,omitempty"`
}

HTTPPolicyRuleSpec is the specification for a HTTP policy rule. To pass a specified rule, a request must match all attributes provided in the rule.

func (*HTTPPolicyRuleSpec) DeepCopy

func (in *HTTPPolicyRuleSpec) DeepCopy() *HTTPPolicyRuleSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPPolicyRuleSpec.

func (*HTTPPolicyRuleSpec) DeepCopyInto

func (in *HTTPPolicyRuleSpec) DeepCopyInto(out *HTTPPolicyRuleSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*HTTPPolicyRuleSpec) Validate

func (r *HTTPPolicyRuleSpec) Validate(ctx context.Context) *apis.FieldError

Validate validates a HTTPPolicyRuleSpec.

type HTTPPolicySpec

type HTTPPolicySpec struct {
	// JWT specifies the parameters to validate JTWs.
	// If omitted, authentication will be skipped.
	JWT *JWTSpec `json:"jwt,omitempty"`

	// Rules is the list of rules to check for the policy.
	// The rules should be evaluated in order. If the request under check
	// passes one rule, it passes the policy check.
	// If Rules is not specified, it implies the policy is to "allow all".
	// If an empty rule is specified in Rules, it implies the policy is to "reject all".
	Rules []HTTPPolicyRuleSpec `json:"rules,omitempty"`
}

HTTPPolicySpec is the HTTPPolicy specification.

func (*HTTPPolicySpec) DeepCopy

func (in *HTTPPolicySpec) DeepCopy() *HTTPPolicySpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPPolicySpec.

func (*HTTPPolicySpec) DeepCopyInto

func (in *HTTPPolicySpec) DeepCopyInto(out *HTTPPolicySpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type JWTHeader

type JWTHeader struct {
	// Name is the HTTP header name.
	Name string `json:"name"`

	// Prefix is the prefix that should be stripped before decoding the token.
	// E.g. a common one is "Bearer".
	Prefix string `json:"prefix,omitempty"`
}

JWTHeader specifies a header location to extract JWT token.

func (*JWTHeader) DeepCopy

func (in *JWTHeader) DeepCopy() *JWTHeader

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JWTHeader.

func (*JWTHeader) DeepCopyInto

func (in *JWTHeader) DeepCopyInto(out *JWTHeader)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type JWTRule

type JWTRule struct {
	// Principals is a list of source identities ("iss/sub") to match.
	// If omitted, it implies any principal is allowed.
	Principals []string `json:"principals,omitempty"`

	// Claims is a list of claims that should match certain patterns.
	Claims []KeyValuesMatch `json:"claims,omitempty"`
}

JWTRule specifies a rule to check JWT attributes.

func (*JWTRule) DeepCopy

func (in *JWTRule) DeepCopy() *JWTRule

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JWTRule.

func (*JWTRule) DeepCopyInto

func (in *JWTRule) DeepCopyInto(out *JWTRule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*JWTRule) Validate

func (j *JWTRule) Validate(ctx context.Context) *apis.FieldError

Validate validates a JWTRule.

type JWTSpec

type JWTSpec struct {
	// JwksURI is the URI of the JWKs for validating JWTs.
	// Can only be specified if Jwks is not set.
	JwksURI string `json:"jwksUri,omitempty"`

	// Jwks is the literal JWKs for validating JWTs.
	// Can only be specified if JwksURI is not specified.
	Jwks string `json:"jwks,omitempty"`

	// Issuer is the issuer of the JWT.
	Issuer string `json:"issuer"`

	// FromHeader is the list of header locations from which JWT is expected.
	FromHeaders []JWTHeader `json:"fromHeaders"`
}

JWTSpec defines the specification to validate JWT.

func (*JWTSpec) DeepCopy

func (in *JWTSpec) DeepCopy() *JWTSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JWTSpec.

func (*JWTSpec) DeepCopyInto

func (in *JWTSpec) DeepCopyInto(out *JWTSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*JWTSpec) SetDefaults

func (j *JWTSpec) SetDefaults(ctx context.Context)

SetDefaults sets default for JWTSpec.

func (*JWTSpec) Validate

func (j *JWTSpec) Validate(ctx context.Context) *apis.FieldError

Validate validates a JWTSpec.

type KeyValuesMatch

type KeyValuesMatch struct {
	// Key is a string which could be used to retrieve a value from somewhere.
	Key string `json:"key"`

	// Values is a list of string matches where the value of the key should match.
	Values []StringMatch `json:"values"`
}

KeyValuesMatch defines a key and a list of string matches for the key.

func (*KeyValuesMatch) DeepCopy

func (in *KeyValuesMatch) DeepCopy() *KeyValuesMatch

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyValuesMatch.

func (*KeyValuesMatch) DeepCopyInto

func (in *KeyValuesMatch) DeepCopyInto(out *KeyValuesMatch)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*KeyValuesMatch) Validate

func (kvm *KeyValuesMatch) Validate(ctx context.Context) *apis.FieldError

Validate validates a KeyValuesMatch.

type PolicyBindingSpec

type PolicyBindingSpec struct {
	// The binding subject.
	duckv1alpha1.BindingSpec `json:",inline"`

	// Policy is the policy to bind to the subject.
	Policy duckv1.KReference `json:"policy"`
}

PolicyBindingSpec is the specification for a policy binding.

func (*PolicyBindingSpec) CheckImmutableFields

func (pbs *PolicyBindingSpec) CheckImmutableFields(ctx context.Context, original *PolicyBindingSpec) *apis.FieldError

CheckImmutableFields checks if any immutable fields are changed in a PolicyBindingSpec. Make PolicyBindingSpec immutable because otherwise the following case cannot be handled properly: A policy binding initially binds a policy to subject A but later gets changed to subject B. The controller will not be aware of the previous value (subject A) and thus cannot properly unbind the policy from subject A.

func (*PolicyBindingSpec) DeepCopy

func (in *PolicyBindingSpec) DeepCopy() *PolicyBindingSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyBindingSpec.

func (*PolicyBindingSpec) DeepCopyInto

func (in *PolicyBindingSpec) DeepCopyInto(out *PolicyBindingSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PolicyBindingSpec) SetDefaults

func (pbs *PolicyBindingSpec) SetDefaults(ctx context.Context, parentNamespace string)

SetDefaults sets default for PolicyBindingSpec.

func (*PolicyBindingSpec) Validate

func (pbs *PolicyBindingSpec) Validate(ctx context.Context, parentNamespace string) *apis.FieldError

Validate validates a PolicyBindingSpec.

type PolicyBindingStatus

type PolicyBindingStatus struct {
	// inherits duck/v1 Status, which currently provides:
	// * ObservedGeneration - the 'Generation' of the Service that was last processed by the controller.
	// * Conditions - the latest available observations of a resource's current state.
	duckv1.Status `json:",inline"`
}

PolicyBindingStatus is the status for a policy binding.

func (*PolicyBindingStatus) DeepCopy

func (in *PolicyBindingStatus) DeepCopy() *PolicyBindingStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyBindingStatus.

func (*PolicyBindingStatus) DeepCopyInto

func (in *PolicyBindingStatus) DeepCopyInto(out *PolicyBindingStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PolicyBindingStatus) GetCondition

func (pbs *PolicyBindingStatus) GetCondition(t apis.ConditionType) *apis.Condition

GetCondition returns the condition currently associated with the given type, or nil.

func (*PolicyBindingStatus) GetTopLevelCondition

func (pbs *PolicyBindingStatus) GetTopLevelCondition() *apis.Condition

GetTopLevelCondition returns the top level Condition.

func (*PolicyBindingStatus) InitializeConditions

func (pbs *PolicyBindingStatus) InitializeConditions()

InitializeConditions sets relevant unset conditions to Unknown state.

func (*PolicyBindingStatus) IsReady

func (pbs *PolicyBindingStatus) IsReady() bool

IsReady returns true if the resource is ready overall.

func (*PolicyBindingStatus) MarkBindingAvailable

func (pbs *PolicyBindingStatus) MarkBindingAvailable()

MarkBindingAvailable marks the policy binding's Ready condition to True. This implements psbinding.BindableStatus.

func (*PolicyBindingStatus) MarkBindingFailure

func (pbs *PolicyBindingStatus) MarkBindingFailure(reason, messageFormat string, messageA ...interface{})

MarkBindingFailure marks the policy binding's Ready condition to False with the provided reason and message. This function is the same as MarkBindingUnavailable with a more friendly function signature.

func (*PolicyBindingStatus) MarkBindingUnavailable

func (pbs *PolicyBindingStatus) MarkBindingUnavailable(reason, message string)

MarkBindingUnavailable marks the policy binding's Ready condition to False with the provided reason and message. This implements psbinding.BindableStatus

func (*PolicyBindingStatus) PropagateBindingStatus

func (pbs *PolicyBindingStatus) PropagateBindingStatus(other *PolicyBindingStatus)

PropagateBindingStatus propagates the current binding status from another binding status.

func (*PolicyBindingStatus) SetObservedGeneration

func (pbs *PolicyBindingStatus) SetObservedGeneration(gen int64)

SetObservedGeneration implements psbinding.BindableStatus

type RequestOperation

type RequestOperation struct {
	// Hosts is a list of host names to match.
	Hosts []StringMatch `json:"hosts,omitempty"`

	// Paths is a list of paths to match.
	Paths []StringMatch `json:"paths,omitempty"`

	// Methods is a list of methods to match.
	Methods []string `json:"methods,omitempty"`
}

RequestOperation is the operation the request is taking.

func (*RequestOperation) DeepCopy

func (in *RequestOperation) DeepCopy() *RequestOperation

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequestOperation.

func (*RequestOperation) DeepCopyInto

func (in *RequestOperation) DeepCopyInto(out *RequestOperation)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RequestOperation) Validate

func (op *RequestOperation) Validate(ctx context.Context) *apis.FieldError

Validate validates a RequestOperation.

type StringMatch

type StringMatch struct {
	// Exact is to match the exact string.
	Exact string `json:"exact,omitempty"`

	// Prefix is to match the prefix of the string.
	Prefix string `json:"prefix,omitempty"`

	// Suffix is to match the suffix of the string.
	Suffix string `json:"suffix,omitempty"`

	// Presence is to match anything but empty.
	Presence bool `json:"presence,omitempty"`
}

StringMatch defines the specification to match a string.

func (*StringMatch) DeepCopy

func (in *StringMatch) DeepCopy() *StringMatch

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StringMatch.

func (*StringMatch) DeepCopyInto

func (in *StringMatch) DeepCopyInto(out *StringMatch)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*StringMatch) ToExpression

func (m *StringMatch) ToExpression() string

ToExpression returns the string expression of the string match.

func (*StringMatch) Validate

func (m *StringMatch) Validate(ctx context.Context) *apis.FieldError

Validate validates a StringMatch.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL