Documentation
¶
Overview ¶
Package v1 contains API Schema definitions for the t4s v1 API group +kubebuilder:object:generate=true +groupName=t4s.tkna.net
Index ¶
- Constants
- Variables
- func SetupWebhookWithManager(mgr ctrl.Manager) error
- type Action
- type ActionList
- type ActionSpec
- type ActionStatus
- type Board
- type BoardList
- type BoardSpec
- type BoardState
- type BoardStatus
- type Coord
- type Cron
- type CronList
- type CronSpec
- type CronStatus
- type CurrentMino
- type Mino
- type MinoList
- type MinoSpec
- type MinoStatus
- type T4s
- type T4sList
- type T4sSpec
- type T4sStatus
Constants ¶
const ( Playing = BoardState("Playing") GameOver = BoardState("GameOver") )
Variables ¶
var ( // GroupVersion is group version used to register these objects. GroupVersion = schema.GroupVersion{Group: "t4s.tkna.net", 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 ¶
func SetupWebhookWithManager ¶
Types ¶
type Action ¶
type Action struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ActionSpec `json:"spec,omitempty"`
Status ActionStatus `json:"status,omitempty"`
}
Action is the Schema for the actions API.
func (*Action) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Action.
func (*Action) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Action) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ActionList ¶
type ActionList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Action `json:"items"`
}
ActionList contains a list of Action.
func (*ActionList) DeepCopy ¶
func (in *ActionList) DeepCopy() *ActionList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionList.
func (*ActionList) DeepCopyInto ¶
func (in *ActionList) DeepCopyInto(out *ActionList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ActionList) DeepCopyObject ¶
func (in *ActionList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ActionSpec ¶
type ActionSpec struct {
// Op represents the kind of operation for current mino, for instance "left", "right", "down", "rot", or "drop".
Op string `json:"op"`
}
ActionSpec defines the desired state of Action.
func (*ActionSpec) DeepCopy ¶
func (in *ActionSpec) DeepCopy() *ActionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionSpec.
func (*ActionSpec) DeepCopyInto ¶
func (in *ActionSpec) DeepCopyInto(out *ActionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ActionStatus ¶
type ActionStatus struct {
}
ActionStatus defines the observed state of Action.
func (*ActionStatus) DeepCopy ¶
func (in *ActionStatus) DeepCopy() *ActionStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionStatus.
func (*ActionStatus) DeepCopyInto ¶
func (in *ActionStatus) DeepCopyInto(out *ActionStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Board ¶
type Board struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec BoardSpec `json:"spec,omitempty"`
Status BoardStatus `json:"status,omitempty"`
}
Board is the Schema for the boards API.
func (*Board) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Board.
func (*Board) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Board) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type BoardList ¶
type BoardList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Board `json:"items"`
}
BoardList contains a list of Board.
func (*BoardList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BoardList.
func (*BoardList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BoardList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type BoardSpec ¶
type BoardSpec struct {
// Width of the board (default: 11)
//+kubebuilder:validation:Minimum=3
//+kubebuilder:default=11
Width int `json:"width,omitempty"`
// Height of the board (default: 20)
//+kubebuilder:validation:Minimum=3
//+kubebuilder:default=20
Height int `json:"height,omitempty"`
// Wait time when a mino falls in millisec (default: 1000). The lower the value, the faster the falling speed. This value is inherited by Cron.
//+kubebuilder:validation:Minimum=0
//+kubebuilder:default=1000
Wait int `json:"wait,omitempty"`
// Desired state of the board. Possible values are "Playing" and "GameOver".
//+kubebuilder:default="GameOver"
State BoardState `json:"state,omitempty"`
}
BoardSpec defines the desired state of Board.
func (*BoardSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BoardSpec.
func (*BoardSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BoardState ¶
type BoardState string
BoardState defines the state of Board +kubebuilder:validation:Enum=Playing;GameOver
type BoardStatus ¶
type BoardStatus struct {
// Board Data
Data [][]int `json:"data,omitempty"`
// Current Mino Data
CurrentMino []CurrentMino `json:"currentMino,omitempty"`
// Current state of the board. Possible values are "Playing" and "GameOver".
State BoardState `json:"state,omitempty"`
}
BoardStatus defines the observed state of Board.
func (*BoardStatus) DeepCopy ¶
func (in *BoardStatus) DeepCopy() *BoardStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BoardStatus.
func (*BoardStatus) DeepCopyInto ¶
func (in *BoardStatus) DeepCopyInto(out *BoardStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Coord ¶
func (*Coord) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Coord.
func (*Coord) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Cron ¶
type Cron struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec CronSpec `json:"spec,omitempty"`
Status CronStatus `json:"status,omitempty"`
}
Cron is the Schema for the crons API.
func (*Cron) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cron.
func (*Cron) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Cron) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CronList ¶
type CronList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Cron `json:"items"`
}
CronList contains a list of Cron.
func (*CronList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CronList.
func (*CronList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CronList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CronSpec ¶
type CronSpec struct {
// Cron Controller is reconciled periodically every `Period` millisec.
Period int `json:"period"`
}
CronSpec defines the desired state of Cron.
func (*CronSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CronSpec.
func (*CronSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CronStatus ¶
type CronStatus struct {
}
CronStatus defines the observed state of Cron.
func (*CronStatus) DeepCopy ¶
func (in *CronStatus) DeepCopy() *CronStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CronStatus.
func (*CronStatus) DeepCopyInto ¶
func (in *CronStatus) DeepCopyInto(out *CronStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CurrentMino ¶
type CurrentMino struct {
MinoID int `json:"minoId,omitempty"`
Center Coord `json:"center,omitempty"`
RelativeCoords []Coord `json:"relativeCoords,omitempty"`
AbsoluteCoords []Coord `json:"absoluteCoords,omitempty"`
}
CurrentMino stores the current mino information.
func (CurrentMino) DeepCopy ¶
func (mino CurrentMino) DeepCopy() CurrentMino
func (*CurrentMino) DeepCopyInto ¶
func (in *CurrentMino) DeepCopyInto(out *CurrentMino)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Mino ¶
type Mino struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec MinoSpec `json:"spec,omitempty"`
Status MinoStatus `json:"status,omitempty"`
}
Mino is the Schema for the minoes API.
func (*Mino) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Mino.
func (*Mino) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Mino) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MinoList ¶
type MinoList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Mino `json:"items"`
}
MinoList contains a list of Mino.
func (*MinoList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MinoList.
func (*MinoList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MinoList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MinoSpec ¶
type MinoSpec struct {
// Id of the Mino. It must be greater than or equal to 1, as 0 is treated as a blank cell on the board.
MinoID int `json:"minoId,omitempty"`
// (Relative) coordinates of the Mino
Coords []Coord `json:"coords,omitempty"`
// Color of the Mino. It must be a string that Javascript recognizes as color, for instance "blue", "#0000FF" or "rgb(0, 0, 255)".
Color string `json:"color,omitempty"`
}
MinoSpec defines the desired state of Mino.
func (*MinoSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MinoSpec.
func (*MinoSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MinoStatus ¶
type MinoStatus struct {
}
MinoStatus defines the observed state of Mino.
func (*MinoStatus) DeepCopy ¶
func (in *MinoStatus) DeepCopy() *MinoStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MinoStatus.
func (*MinoStatus) DeepCopyInto ¶
func (in *MinoStatus) DeepCopyInto(out *MinoStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type T4s ¶
type T4s struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec T4sSpec `json:"spec,omitempty"`
Status T4sStatus `json:"status,omitempty"`
}
T4s is the Schema for the T4s API.
func (*T4s) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new T4s.
func (*T4s) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*T4s) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type T4sList ¶
type T4sList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []T4s `json:"items"`
}
T4sList contains a list of T4s.
func (*T4sList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new T4sList.
func (*T4sList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*T4sList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type T4sSpec ¶
type T4sSpec struct {
// Width of the board (default: 10). This value is inherited by Board.
//+kubebuilder:validation:Minimum=4
//+kubebuilder:validation:Maximum=20
//+kubebuilder:default=11
Width int `json:"width,omitempty"`
// Height of the board (default: 20). This value is inherited by Board.
//+kubebuilder:validation:Minimum=4
//+kubebuilder:validation:Maximum=30
//+kubebuilder:default=20
Height int `json:"height,omitempty"`
// Wait time when a mino falls in millisec (default: 1000). The lower the value, the faster the falling speed. This value is inherited by Board and Cron.
//+kubebuilder:validation:Minimum=200
//+kubebuilder:default=1000
Wait int `json:"wait,omitempty"`
// Type of the Service to which a user accesses to (default: NodePort). Supported values are "NodePort" and "LoadBalancer".
ServiceType string `json:"serviceType,omitempty"`
// Specifies NodePort value when serviceType is "NodePort". If not specified, it is allocated automatically by Kubernetes' NodePort mechanism.
NodePort int32 `json:"nodePort,omitempty"`
// Specifies LoadBalancerIP value when serviceType is "LoadBalancer".
LoadBalancerIP string `json:"loadBalancerIP,omitempty"`
// Specifies LoadBalancerSourceRanges when serviceType is "LoadBalancer".
LoadBalancerSourceRanges []string `json:"loadBalancerSourceRanges,omitempty"`
}
T4sSpec defines the desired state of T4s.
func (*T4sSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new T4sSpec.
func (*T4sSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type T4sStatus ¶
type T4sStatus struct {
}
T4sStatus defines the observed state of T4s.
func (*T4sStatus) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new T4sStatus.
func (*T4sStatus) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.