Documentation ¶
Overview ¶
Package v1 contains API Schema definitions for the apps v1 API group +kubebuilder:object:generate=true +groupName=apps.vadasambar.com
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "apps.vadasambar.com", Version: "v1"} // 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 Comparison ¶
type Comparison string
type Filter ¶
type Filter struct { // Number of Hacker News articles you want. // +kubebuilder:validation:Maximum:=20 Limit int `json:"limit"` // Type of Hacker News articles you are looking for. // Has to be either of: job,story,comment,poll,pollopt // +kubebuilder:validation:Enum:=job;story;comment;poll;pollopt Type string `json:"type,omitempty"` // Score of Hacker News articles you are looking for. // Specify it like: // score: ">=10", score: "<10", score: "=10", score: "!=10" Score Comparison `json:"score"` // Number of direct (first level) comments in the article. // Specify it like: // descendents: ">=10", descendents: "<10", descendents: "=10", descendents: "!=10" Descendants Comparison `json:"descendents"` }
Filter allows you to filter and get the Hacker News articles you want
func (*Filter) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Filter.
func (*Filter) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GetIdResponse ¶
type GetIdResponse struct { By string `json:"by"` Descendants int `json:"descendants"` ID int `json:"id"` Kids []int `json:"kids"` Score int `json:"score"` Time int `json:"time"` Title string `json:"title"` Type Type `json:"type"` URL string `json:"url"` }
Generated using https://mholt.github.io/json-to-go/ by converting get Id http json response to go struct
func (*GetIdResponse) DeepCopy ¶
func (in *GetIdResponse) DeepCopy() *GetIdResponse
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GetIdResponse.
func (*GetIdResponse) DeepCopyInto ¶
func (in *GetIdResponse) DeepCopyInto(out *GetIdResponse)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HNews ¶
type HNews struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec HNewsSpec `json:"spec"` Status HNewsStatus `json:"status,omitempty"` }
+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:JSONPath=.spec.filter.type,name=Type,type=string +kubebuilder:printcolumn:JSONPath=.spec.filter.score,name=Score,type=string +kubebuilder:printcolumn:JSONPath=.spec.filter.limit,name=Limit,type=integer +kubebuilder:printcolumn:JSONPath=.spec.filter.descendents,name=Descendents,type=string +kubebuilder:printcolumn:JSONPath=.status.lastSyncedAt,name=LastSyncedAt,type=string HNews is the Schema for the hnews API
func (*HNews) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HNews.
func (*HNews) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HNews) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type HNewsList ¶
type HNewsList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []HNews `json:"items"` }
HNewsList contains a list of HNews
func (*HNewsList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HNewsList.
func (*HNewsList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HNewsList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type HNewsSpec ¶
type HNewsSpec struct {
Filter Filter `json:"filter,omitempty"`
}
HNewsSpec defines the desired state of HNews
func (*HNewsSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HNewsSpec.
func (*HNewsSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HNewsStatus ¶
type HNewsStatus struct { // Important: Run "make" to regenerate code after modifying this file Links []Link `json:"link"` LastSyncedAt metav1.Time `json:"lastSyncedAt,omitempty"` }
HNewsStatus defines the observed state of HNews
func (*HNewsStatus) DeepCopy ¶
func (in *HNewsStatus) DeepCopy() *HNewsStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HNewsStatus.
func (*HNewsStatus) DeepCopyInto ¶
func (in *HNewsStatus) DeepCopyInto(out *HNewsStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Link ¶
type Link struct { // HNewsUrl refers to the URL of the HNews page // e.g., https://news.ycombinator.com/item?id=31316372 HNewsUrl string `json:"hnews_url"` // ArticleUrl refers to the URL which is shared on the HNews page above // e.g., https://swelltype.com/yep-i-created-the-new-avatar-font/ ArticleUrl string `json:"article_url"` Descendents int `json:"descendents"` Score int `json:"score"` }
Link holds the information about Hacker News article for which satisfies the filter
func (*Link) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Link.
func (*Link) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.