Documentation ¶
Overview ¶
Package v1 contains API Schema definitions for the games v1 API group +kubebuilder:object:generate=true +groupName=games.vlad.io
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "games.vlad.io", 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 Identifier ¶
type Identifier string
const ( IdentifierPlayer Identifier = "Player" IdentifierComputer Identifier = "Computer" )
type TicTacToe ¶
type TicTacToe struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec TicTacToeSpec `json:"spec"` Status TicTacToeStatus `json:"status,omitempty"` }
TicTacToe is the Schema for the tictactoes API
func (*TicTacToe) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TicTacToe.
func (*TicTacToe) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TicTacToe) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TicTacToeList ¶
type TicTacToeList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []TicTacToe `json:"items"` }
TicTacToeList contains a list of TicTacToe
func (*TicTacToeList) DeepCopy ¶
func (in *TicTacToeList) DeepCopy() *TicTacToeList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TicTacToeList.
func (*TicTacToeList) DeepCopyInto ¶
func (in *TicTacToeList) DeepCopyInto(out *TicTacToeList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TicTacToeList) DeepCopyObject ¶
func (in *TicTacToeList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TicTacToeSpec ¶
type TicTacToeSpec struct { // User's move // +kubebuilder:validation:Pattern:=(^[A-C][1-3]$)|^$ // +kubebuilder:default:="" Move string `json:"move"` // Whether the game is played between two actual players // +kubebuilder:default:=false PVP bool `json:"pvp"` }
TicTacToeSpec defines the desired state of TicTacToe
func (*TicTacToeSpec) DeepCopy ¶
func (in *TicTacToeSpec) DeepCopy() *TicTacToeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TicTacToeSpec.
func (*TicTacToeSpec) DeepCopyInto ¶
func (in *TicTacToeSpec) DeepCopyInto(out *TicTacToeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TicTacToeStatus ¶
type TicTacToeStatus struct { // Specifies whose turn is it to play Turn Identifier `json:"turn,omitempty"` // Game state table Table string `json:"table,omitempty"` // Indicates who won the game Winner string `json:"winner,omitempty"` // Moves that have been made MoveHistory []string `json:"moveHistory,omitempty"` }
TicTacToeStatus defines the observed state of TicTacToe
func (*TicTacToeStatus) DeepCopy ¶
func (in *TicTacToeStatus) DeepCopy() *TicTacToeStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TicTacToeStatus.
func (*TicTacToeStatus) DeepCopyInto ¶
func (in *TicTacToeStatus) DeepCopyInto(out *TicTacToeStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.