v1alpha2

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package v1alpha2 contains the v1alpha2 group Sample resources of the http provider. +kubebuilder:object:generate=true +groupName=http.crossplane.io +versionName=v1alpha2

Index

Constants

View Source
const (
	Group   = "http.crossplane.io"
	Version = "v1alpha2"
)

Package type metadata.

View Source
const (
	ExpectedResponseCheckTypeDefault = "DEFAULT"
	ExpectedResponseCheckTypeCustom  = "CUSTOM"
)
View Source
const (
	ActionCreate  = "CREATE"
	ActionObserve = "OBSERVE"
	ActionUpdate  = "UPDATE"
	ActionRemove  = "REMOVE"
)

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: Group, Version: Version}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
)
View Source
var (
	RequestKind             = reflect.TypeOf(Request{}).Name()
	RequestGroupKind        = schema.GroupKind{Group: Group, Kind: RequestKind}.String()
	RequestKindAPIVersion   = RequestKind + "." + SchemeGroupVersion.String()
	RequestGroupVersionKind = SchemeGroupVersion.WithKind(RequestKind)
)

Request type metadata.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	LastUpdated string   `json:"lastUpdated,omitempty"`
	Response    Response `json:"response,omitempty"`
}

func (*Cache) DeepCopy

func (in *Cache) DeepCopy() *Cache

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

func (*Cache) DeepCopyInto

func (in *Cache) DeepCopyInto(out *Cache)

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

type ExpectedResponseCheck added in v1.0.5

type ExpectedResponseCheck struct {
	// Type specifies the type of the expected response check.
	// +kubebuilder:validation:Enum=DEFAULT;CUSTOM
	Type string `json:"type,omitempty"`

	// Logic specifies the custom logic for the expected response check.
	Logic string `json:"logic,omitempty"`
}

func (*ExpectedResponseCheck) DeepCopy added in v1.0.5

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

func (*ExpectedResponseCheck) DeepCopyInto added in v1.0.5

func (in *ExpectedResponseCheck) DeepCopyInto(out *ExpectedResponseCheck)

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

type Mapping

type Mapping struct {
	// Either Method or Action must be specified. If both are omitted, the mapping will not be used.
	// +kubebuilder:validation:Enum=POST;GET;PUT;DELETE
	// Method specifies the HTTP method for the request.
	Method string `json:"method,omitempty"`

	// +kubebuilder:validation:Enum=CREATE;OBSERVE;UPDATE;REMOVE
	// Action specifies the intended action for the request.
	Action string `json:"action,omitempty"`

	// Body specifies the body of the request.
	Body string `json:"body,omitempty"`

	// URL specifies the URL for the request.
	URL string `json:"url"`

	// Headers specifies the headers for the request.
	Headers map[string][]string `json:"headers,omitempty"`
}

func (*Mapping) DeepCopy

func (in *Mapping) DeepCopy() *Mapping

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

func (*Mapping) DeepCopyInto

func (in *Mapping) DeepCopyInto(out *Mapping)

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

type Payload

type Payload struct {
	// BaseUrl specifies the base URL for the request.
	BaseUrl string `json:"baseUrl,omitempty"`

	// Body specifies data to be used in the request body.
	Body string `json:"body,omitempty"`
}

func (*Payload) DeepCopy

func (in *Payload) DeepCopy() *Payload

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

func (*Payload) DeepCopyInto

func (in *Payload) DeepCopyInto(out *Payload)

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

type Request

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

	Spec   RequestSpec   `json:"spec"`
	Status RequestStatus `json:"status,omitempty"`
}

A Request is an example API type. +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:subresource:status +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,http} +kubebuilder:storageversion

func (*Request) DeepCopy

func (in *Request) DeepCopy() *Request

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

func (*Request) DeepCopyInto

func (in *Request) DeepCopyInto(out *Request)

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

func (*Request) DeepCopyObject

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

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

func (*Request) GetCondition

func (mg *Request) GetCondition(ct xpv1.ConditionType) xpv1.Condition

GetCondition of this Request.

func (*Request) GetDeletionPolicy

func (mg *Request) GetDeletionPolicy() xpv1.DeletionPolicy

GetDeletionPolicy of this Request.

func (*Request) GetManagementPolicies added in v1.0.2

func (mg *Request) GetManagementPolicies() xpv1.ManagementPolicies

GetManagementPolicies of this Request.

func (*Request) GetProviderConfigReference

func (mg *Request) GetProviderConfigReference() *xpv1.Reference

GetProviderConfigReference of this Request.

func (*Request) GetPublishConnectionDetailsTo

func (mg *Request) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo

GetPublishConnectionDetailsTo of this Request.

func (*Request) GetWriteConnectionSecretToReference

func (mg *Request) GetWriteConnectionSecretToReference() *xpv1.SecretReference

GetWriteConnectionSecretToReference of this Request.

func (*Request) ResetFailures

func (d *Request) ResetFailures()

func (*Request) SetBody

func (d *Request) SetBody(body string)

func (*Request) SetCache

func (d *Request) SetCache(statusCode int, headers map[string][]string, body string)

func (*Request) SetConditions

func (mg *Request) SetConditions(c ...xpv1.Condition)

SetConditions of this Request.

func (*Request) SetDeletionPolicy

func (mg *Request) SetDeletionPolicy(r xpv1.DeletionPolicy)

SetDeletionPolicy of this Request.

func (*Request) SetError

func (d *Request) SetError(err error)

func (*Request) SetHeaders

func (d *Request) SetHeaders(headers map[string][]string)

func (*Request) SetManagementPolicies added in v1.0.2

func (mg *Request) SetManagementPolicies(r xpv1.ManagementPolicies)

SetManagementPolicies of this Request.

func (*Request) SetProviderConfigReference

func (mg *Request) SetProviderConfigReference(r *xpv1.Reference)

SetProviderConfigReference of this Request.

func (*Request) SetPublishConnectionDetailsTo

func (mg *Request) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo)

SetPublishConnectionDetailsTo of this Request.

func (*Request) SetRequestDetails

func (d *Request) SetRequestDetails(url, method, body string, headers map[string][]string)

func (*Request) SetStatusCode

func (d *Request) SetStatusCode(statusCode int)

func (*Request) SetWriteConnectionSecretToReference

func (mg *Request) SetWriteConnectionSecretToReference(r *xpv1.SecretReference)

SetWriteConnectionSecretToReference of this Request.

type RequestList

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

RequestList contains a list of Request

func (*RequestList) DeepCopy

func (in *RequestList) DeepCopy() *RequestList

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

func (*RequestList) DeepCopyInto

func (in *RequestList) DeepCopyInto(out *RequestList)

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

func (*RequestList) DeepCopyObject

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

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

func (*RequestList) GetItems

func (l *RequestList) GetItems() []resource.Managed

GetItems of this RequestList.

type RequestParameters

type RequestParameters struct {
	// Mappings defines the HTTP mappings for different methods.
	Mappings []Mapping `json:"mappings"`

	// Payload defines the payload for the request.
	Payload Payload `json:"payload"`

	// Headers defines default headers for each request.
	Headers map[string][]string `json:"headers,omitempty"`

	// WaitTimeout specifies the maximum time duration for waiting.
	WaitTimeout *metav1.Duration `json:"waitTimeout,omitempty"`

	// InsecureSkipTLSVerify, when set to true, skips TLS certificate checks for the HTTP request
	InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify,omitempty"`

	// SecretInjectionConfig specifies the secrets receiving patches for response data.
	SecretInjectionConfigs []SecretInjectionConfig `json:"secretInjectionConfigs,omitempty"`

	// ExpectedResponseCheck specifies the mechanism to validate the GET response against expected value.
	ExpectedResponseCheck ExpectedResponseCheck `json:"expectedResponseCheck,omitempty"`
}

RequestParameters are the configurable fields of a Request.

func (*RequestParameters) DeepCopy

func (in *RequestParameters) DeepCopy() *RequestParameters

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

func (*RequestParameters) DeepCopyInto

func (in *RequestParameters) DeepCopyInto(out *RequestParameters)

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

type RequestSpec

type RequestSpec struct {
	xpv1.ResourceSpec `json:",inline"`
	ForProvider       RequestParameters `json:"forProvider"`
}

A RequestSpec defines the desired state of a Request.

func (*RequestSpec) DeepCopy

func (in *RequestSpec) DeepCopy() *RequestSpec

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

func (*RequestSpec) DeepCopyInto

func (in *RequestSpec) DeepCopyInto(out *RequestSpec)

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

type RequestStatus

type RequestStatus struct {
	xpv1.ResourceStatus `json:",inline"`
	Response            Response `json:"response,omitempty"`
	Cache               Cache    `json:"cache,omitempty"`
	Failed              int32    `json:"failed,omitempty"`
	Error               string   `json:"error,omitempty"`
	RequestDetails      Mapping  `json:"requestDetails,omitempty"`
}

A RequestStatus represents the observed state of a Request.

func (*RequestStatus) DeepCopy

func (in *RequestStatus) DeepCopy() *RequestStatus

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

func (*RequestStatus) DeepCopyInto

func (in *RequestStatus) DeepCopyInto(out *RequestStatus)

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

type Response

type Response struct {
	StatusCode int                 `json:"statusCode,omitempty"`
	Body       string              `json:"body,omitempty"`
	Headers    map[string][]string `json:"headers,omitempty"`
}

RequestObservation are the observable fields of a Request.

func (*Response) DeepCopy

func (in *Response) DeepCopy() *Response

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

func (*Response) DeepCopyInto

func (in *Response) DeepCopyInto(out *Response)

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

type SecretInjectionConfig

type SecretInjectionConfig struct {
	// SecretRef contains the name and namespace of the Kubernetes secret where the data will be injected.
	SecretRef SecretRef `json:"secretRef"`

	// SecretKey is the key within the Kubernetes secret where the data will be injected.
	SecretKey string `json:"secretKey"`

	// ResponsePath is is a jq filter expression represents the path in the response where the secret value will be extracted from.
	ResponsePath string `json:"responsePath"`

	// SetOwnerReference determines whether to set the owner reference on the Kubernetes secret.
	SetOwnerReference bool `json:"setOwnerReference,omitempty"`
}

SecretInjectionConfig represents the configuration for injecting secret data into a Kubernetes secret.

func (*SecretInjectionConfig) DeepCopy

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

func (*SecretInjectionConfig) DeepCopyInto

func (in *SecretInjectionConfig) DeepCopyInto(out *SecretInjectionConfig)

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

type SecretRef

type SecretRef struct {
	// Name is the name of the Kubernetes secret.
	Name string `json:"name"`

	// Namespace is the namespace of the Kubernetes secret.
	Namespace string `json:"namespace"`
}

SecretRef contains the name and namespace of a Kubernetes secret.

func (*SecretRef) DeepCopy

func (in *SecretRef) DeepCopy() *SecretRef

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

func (*SecretRef) DeepCopyInto

func (in *SecretRef) DeepCopyInto(out *SecretRef)

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

Jump to

Keyboard shortcuts

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