Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the urlshortener v1alpha1 API group +kubebuilder:object:generate=true +groupName=urlshortener.cedi.dev
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "urlshortener.cedi.dev", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type Redirect ¶
type Redirect struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec RedirectSpec `json:"spec,omitempty"` Status RedirectStatus `json:"status,omitempty"` }
Redirect is the Schema for the redirects API +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:scope=Namespaced +kubebuilder:printcolumn:name="Source",type=string,JSONPath=`.spec.source` +kubebuilder:printcolumn:name="Target",type=string,JSONPath=`.spec.target` +kubebuilder:printcolumn:name="Code",type=string,JSONPath=`.spec.code`
func (*Redirect) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Redirect.
func (*Redirect) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Redirect) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type RedirectList ¶
type RedirectList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Redirect `json:"items"` }
RedirectList contains a list of Redirect
func (*RedirectList) DeepCopy ¶
func (in *RedirectList) DeepCopy() *RedirectList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedirectList.
func (*RedirectList) DeepCopyInto ¶
func (in *RedirectList) DeepCopyInto(out *RedirectList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RedirectList) DeepCopyObject ¶
func (in *RedirectList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type RedirectSpec ¶
type RedirectSpec struct { // Source is the source URL from which the redirection happens // +kubebuilder:validation:Required Source string `json:"source"` // Target is the destination URL to which the redirection happen // +kubebuilder:validation:Required Target string `json:"target"` // Code is the URL Code used for the redirection. Default 308 // +kubebuilder:validation:Enum=300;301;302;303;304;305;307;308 // +kubebuilder:default:=308 Code int `json:"code,omitempty"` // TLS configure if you want to enable TLS // +kubebuilder:default:={enable: false} TLS TLSSpec `json:"tls,omitempty"` // IngressClassName makes it possible to override the ingress-class // +kubebuilder:default:=nginx IngressClassName string `json:"ingressClassName,omitempty"` }
RedirectSpec defines the desired state of Redirect
func (*RedirectSpec) DeepCopy ¶
func (in *RedirectSpec) DeepCopy() *RedirectSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedirectSpec.
func (*RedirectSpec) DeepCopyInto ¶
func (in *RedirectSpec) DeepCopyInto(out *RedirectSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RedirectStatus ¶
type RedirectStatus struct { Target string `json:"target,omitempty"` IngressName []string `json:"ingressNames,omitempty"` }
RedirectStatus defines the observed state of Redirect
func (*RedirectStatus) DeepCopy ¶
func (in *RedirectStatus) DeepCopy() *RedirectStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedirectStatus.
func (*RedirectStatus) DeepCopyInto ¶
func (in *RedirectStatus) DeepCopyInto(out *RedirectStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ShortLink ¶
type ShortLink struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ShortLinkSpec `json:"spec,omitempty"` Status ShortLinkStatus `json:"status,omitempty"` }
ShortLink is the Schema for the shortlinks API +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:scope=Namespaced +kubebuilder:printcolumn:name="Target",type=string,JSONPath=`.spec.target` +kubebuilder:printcolumn:name="Code",type=string,JSONPath=`.spec.code` +kubebuilder:printcolumn:name="After",type=string,JSONPath=`.spec.after` +kubebuilder:printcolumn:name="Invoked",type=string,JSONPath=`.status.count` +k8s:openapi-gen=true
func (*ShortLink) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShortLink.
func (*ShortLink) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ShortLink) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ShortLinkList ¶
type ShortLinkList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ShortLink `json:"items"` }
ShortLinkList contains a list of ShortLink +kubebuilder:object:root=true
func (*ShortLinkList) DeepCopy ¶
func (in *ShortLinkList) DeepCopy() *ShortLinkList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShortLinkList.
func (*ShortLinkList) DeepCopyInto ¶
func (in *ShortLinkList) DeepCopyInto(out *ShortLinkList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ShortLinkList) DeepCopyObject ¶
func (in *ShortLinkList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ShortLinkSpec ¶
type ShortLinkSpec struct { // Owner is the GitHub user name which created the shortlink // +kubebuilder:validation:Required Owner string `json:"owner"` // Co-Owners are the GitHub user name which can also administrate this shortlink // +kubebuilder:validation:Optional CoOwners []string `json:"owners,omitempty"` // Target specifies the target to which we will redirect // +kubebuilder:validation:Required // +kubebuilder:validation:MinLength=1 Target string `json:"target"` // RedirectAfter specifies after how many seconds to redirect (Default=3) // +kubebuilder:default:=0 // +kubebuilder:validation:Minimum=0 // +kubebuilder:validation:Maximum=99 RedirectAfter int64 `json:"after,omitempty"` // Code is the URL Code used for the redirection. // leave on default (307) when using the HTML behavior. However, if you whish to use a HTTP 3xx redirect, set to the appropriate 3xx status code // +kubebuilder:validation:Enum=200;300;301;302;303;304;305;307;308 // +kubebuilder:default:=307 Code int `json:"code,omitempty" enums:"200,300,301,302,303,304,305,307,308"` }
ShortLinkSpec defines the desired state of ShortLink
func (*ShortLinkSpec) DeepCopy ¶
func (in *ShortLinkSpec) DeepCopy() *ShortLinkSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShortLinkSpec.
func (*ShortLinkSpec) DeepCopyInto ¶
func (in *ShortLinkSpec) DeepCopyInto(out *ShortLinkSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ShortLinkStatus ¶
type ShortLinkStatus struct { // Count represents how often this ShortLink has been called // +kubebuilder:default:=0 // +kubebuilder:validation:Minimum=0 Count int `json:"count"` //LastModified is a date-time when the ShortLink was last modified // +kubebuilder:validation:Format:date-time // +kubebuilder:validation:Optional LastModified string `json:"lastmodified"` // ChangedBy indicates who (GitHub User) changed the Shortlink last // +kubebuilder:validation:Optional ChangedBy string `json:"changedby"` }
ShortLinkStatus defines the observed state of ShortLink
func (*ShortLinkStatus) DeepCopy ¶
func (in *ShortLinkStatus) DeepCopy() *ShortLinkStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShortLinkStatus.
func (*ShortLinkStatus) DeepCopyInto ¶
func (in *ShortLinkStatus) DeepCopyInto(out *ShortLinkStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TLSSpec ¶
type TLSSpec struct { // +kubebuilder:default:=false Enable bool `json:"enable,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` }
TLSSpec holds the TLS configuration used
func (*TLSSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSSpec.
func (*TLSSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.