v1

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the t4s v1 API group +kubebuilder:object:generate=true +groupName=t4s.tkna.net

Index

Constants

View Source
const (
	Playing  = BoardState("Playing")
	GameOver = BoardState("GameOver")
)

Variables

View Source
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

func SetupWebhookWithManager(mgr ctrl.Manager) error

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

func (in *Action) DeepCopy() *Action

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

func (*Action) DeepCopyInto

func (in *Action) DeepCopyInto(out *Action)

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

func (*Action) DeepCopyObject

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

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

func (in *Board) DeepCopy() *Board

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

func (*Board) DeepCopyInto

func (in *Board) DeepCopyInto(out *Board)

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

func (*Board) DeepCopyObject

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

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

func (in *BoardList) DeepCopy() *BoardList

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

func (*BoardList) DeepCopyInto

func (in *BoardList) DeepCopyInto(out *BoardList)

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

func (*BoardList) DeepCopyObject

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

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

func (in *BoardSpec) DeepCopy() *BoardSpec

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

func (*BoardSpec) DeepCopyInto

func (in *BoardSpec) DeepCopyInto(out *BoardSpec)

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

type Coord struct {
	X int `json:"x,omitempty"`
	Y int `json:"y,omitempty"`
}

func (*Coord) DeepCopy

func (in *Coord) DeepCopy() *Coord

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

func (*Coord) DeepCopyInto

func (in *Coord) DeepCopyInto(out *Coord)

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

func (in *Cron) DeepCopy() *Cron

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

func (*Cron) DeepCopyInto

func (in *Cron) DeepCopyInto(out *Cron)

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

func (*Cron) DeepCopyObject

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

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

func (in *CronList) DeepCopy() *CronList

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

func (*CronList) DeepCopyInto

func (in *CronList) DeepCopyInto(out *CronList)

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

func (*CronList) DeepCopyObject

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

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

func (in *CronSpec) DeepCopy() *CronSpec

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

func (*CronSpec) DeepCopyInto

func (in *CronSpec) DeepCopyInto(out *CronSpec)

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

func (in *Mino) DeepCopy() *Mino

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

func (*Mino) DeepCopyInto

func (in *Mino) DeepCopyInto(out *Mino)

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

func (*Mino) DeepCopyObject

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

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

func (in *MinoList) DeepCopy() *MinoList

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

func (*MinoList) DeepCopyInto

func (in *MinoList) DeepCopyInto(out *MinoList)

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

func (*MinoList) DeepCopyObject

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

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

func (in *MinoSpec) DeepCopy() *MinoSpec

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

func (*MinoSpec) DeepCopyInto

func (in *MinoSpec) DeepCopyInto(out *MinoSpec)

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

func (in *T4s) DeepCopy() *T4s

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

func (*T4s) DeepCopyInto

func (in *T4s) DeepCopyInto(out *T4s)

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

func (*T4s) DeepCopyObject

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

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

func (in *T4sList) DeepCopy() *T4sList

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

func (*T4sList) DeepCopyInto

func (in *T4sList) DeepCopyInto(out *T4sList)

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

func (*T4sList) DeepCopyObject

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

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

func (in *T4sSpec) DeepCopy() *T4sSpec

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

func (*T4sSpec) DeepCopyInto

func (in *T4sSpec) DeepCopyInto(out *T4sSpec)

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

func (in *T4sStatus) DeepCopy() *T4sStatus

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

func (*T4sStatus) DeepCopyInto

func (in *T4sStatus) DeepCopyInto(out *T4sStatus)

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