v1alpha1

package
v0.0.0-...-7d835c8 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the torrent v1alpha1 API group +kubebuilder:object:generate=true +groupName=torrent.alphayax.com

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "torrent.alphayax.com", 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 BtServer

type BtServer struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   BtServerSpec   `json:"spec,omitempty"`
	Status BtServerStatus `json:"status,omitempty"`
}

BtServer is the Schema for the btservers API +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.state` +kubebuilder:printcolumn:name="Type",type=string,JSONPath=`.spec.type` +kubebuilder:printcolumn:name="Uri",type=string,JSONPath=`.spec.serverUri` +kubebuilder:printcolumn:name="Version",type=string,JSONPath=`.status.serverVersion`

func (*BtServer) DeepCopy

func (in *BtServer) DeepCopy() *BtServer

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

func (*BtServer) DeepCopyInto

func (in *BtServer) DeepCopyInto(out *BtServer)

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

func (*BtServer) DeepCopyObject

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

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type BtServerList

type BtServerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []BtServer `json:"items"`
}

BtServerList contains a list of BtServer

func (*BtServerList) DeepCopy

func (in *BtServerList) DeepCopy() *BtServerList

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

func (*BtServerList) DeepCopyInto

func (in *BtServerList) DeepCopyInto(out *BtServerList)

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

func (*BtServerList) DeepCopyObject

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

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type BtServerSpec

type BtServerSpec struct {
	ServerUri   string                  `json:"serverUri"`
	Type        string                  `json:"type"`
	Credentials BtServerSpecCredentials `json:"credentials,omitempty"`
}

BtServerSpec defines the DESIRED state of BtServer

func (*BtServerSpec) DeepCopy

func (in *BtServerSpec) DeepCopy() *BtServerSpec

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

func (*BtServerSpec) DeepCopyInto

func (in *BtServerSpec) DeepCopyInto(out *BtServerSpec)

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

type BtServerSpecCredentials

type BtServerSpecCredentials struct {
	Username           string         `json:"username,omitempty"`
	Password           string         `json:"password,omitempty"`
	PasswordFromSecret ItemFromSecret `json:"passwordFromSecret,omitempty"`
	UsernameFromSecret ItemFromSecret `json:"usernameFromSecret,omitempty"`
}

func (*BtServerSpecCredentials) DeepCopy

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

func (*BtServerSpecCredentials) DeepCopyInto

func (in *BtServerSpecCredentials) DeepCopyInto(out *BtServerSpecCredentials)

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

type BtServerStatus

type BtServerStatus struct {
	State         string `json:"state,omitempty"`
	ServerVersion string `json:"serverVersion,omitempty"`
}

BtServerStatus defines the OBSERVED state of BtServer

func (*BtServerStatus) DeepCopy

func (in *BtServerStatus) DeepCopy() *BtServerStatus

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

func (*BtServerStatus) DeepCopyInto

func (in *BtServerStatus) DeepCopyInto(out *BtServerStatus)

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

type ItemFromSecret

type ItemFromSecret struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
	Key       string `json:"key"`
}

func (*ItemFromSecret) DeepCopy

func (in *ItemFromSecret) DeepCopy() *ItemFromSecret

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

func (*ItemFromSecret) DeepCopyInto

func (in *ItemFromSecret) DeepCopyInto(out *ItemFromSecret)

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

type ServerRef

type ServerRef struct {
	Namespace string `json:"namespace"`
	Name      string `json:"name"`
}

func (*ServerRef) DeepCopy

func (in *ServerRef) DeepCopy() *ServerRef

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

func (*ServerRef) DeepCopyInto

func (in *ServerRef) DeepCopyInto(out *ServerRef)

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

func (*ServerRef) GetNamespacedName

func (s *ServerRef) GetNamespacedName() types.NamespacedName

type Torrent

type Torrent struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   TorrentSpec   `json:"spec,omitempty"`
	Status TorrentStatus `json:"status,omitempty"`
}

Torrent is the Schema for the torrents API +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.state` +kubebuilder:printcolumn:name="Ratio",type=string,JSONPath=`.status.ratio` +kubebuilder:printcolumn:name="Seed",type=string,JSONPath=`.status.peers.seeders` +kubebuilder:printcolumn:name="Leech",type=string,JSONPath=`.status.peers.leechers` +kubebuilder:printcolumn:name="Content",type=string,JSONPath=`.spec.name`

func (*Torrent) DeepCopy

func (in *Torrent) DeepCopy() *Torrent

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

func (*Torrent) DeepCopyInto

func (in *Torrent) DeepCopyInto(out *Torrent)

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

func (*Torrent) DeepCopyObject

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

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type TorrentList

type TorrentList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Torrent `json:"items"`
}

TorrentList contains a list of Torrent

func (*TorrentList) DeepCopy

func (in *TorrentList) DeepCopy() *TorrentList

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

func (*TorrentList) DeepCopyInto

func (in *TorrentList) DeepCopyInto(out *TorrentList)

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

func (*TorrentList) DeepCopyObject

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

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type TorrentSpec

type TorrentSpec struct {
	//+kubebuilder:validation:Required
	ServerRef ServerRef `json:"serverRef"`

	// Hash represent the torrent Hash. It is used to identify the torrent and set by the Bittorrent Server.
	// TODO: Should be in status ??
	Hash string `json:"hash,omitempty"`

	// Name of the torrent
	//+kubebuilder:validation:Optional
	Name string `json:"name,omitempty"`

	//+kubebuilder:validation:Optional
	URL string `json:"url,omitempty"`

	// Paused will add the torrent in the paused state
	//+kubebuilder:validation:Optional
	//+kubebuilder:default:=false
	Paused bool `json:"paused"`

	// KeepFiles will keep the downloaded files after the torrent is removed
	//+kubebuilder:validation:Optional
	//+kubebuilder:default:=true
	KeepFiles bool `json:"keepFiles"`

	// ManagedBy define if the torrent is managed by kubernetes or not
	//+kubebuilder:validation:Optional
	//+kubebuilder:default:=k8s
	ManagedBy string `json:"managedBy,omitempty"`

	// DownloadDir define the folder where the files will be downloaded
	//+kubebuilder:validation:Optional
	DownloadDir string `json:"downloadDir,omitempty"`
}

TorrentSpec defines the DESIRED state of Torrent

func (*TorrentSpec) DeepCopy

func (in *TorrentSpec) DeepCopy() *TorrentSpec

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

func (*TorrentSpec) DeepCopyInto

func (in *TorrentSpec) DeepCopyInto(out *TorrentSpec)

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

type TorrentStatus

type TorrentStatus struct {
	AddedOn  string             `json:"addedOn"`
	State    string             `json:"state,omitempty"`
	Ratio    string             `json:"ratio,omitempty"`
	Progress string             `json:"progress,omitempty"`
	Size     string             `json:"size"`
	Eta      string             `json:"eta"`
	Speed    TorrentStatusSpeed `json:"speed"`
	Peers    TorrentStatusPeers `json:"peers"`
	Data     TorrentStatusData  `json:"data"`
}

TorrentStatus defines the OBSERVED state of Torrent

func (*TorrentStatus) DeepCopy

func (in *TorrentStatus) DeepCopy() *TorrentStatus

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

func (*TorrentStatus) DeepCopyInto

func (in *TorrentStatus) DeepCopyInto(out *TorrentStatus)

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

type TorrentStatusData

type TorrentStatusData struct {
	Downloaded string `json:"downloaded,omitempty"`
	Uploaded   string `json:"uploaded,omitempty"`
}

func (*TorrentStatusData) DeepCopy

func (in *TorrentStatusData) DeepCopy() *TorrentStatusData

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

func (*TorrentStatusData) DeepCopyInto

func (in *TorrentStatusData) DeepCopyInto(out *TorrentStatusData)

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

type TorrentStatusPeers

type TorrentStatusPeers struct {
	Seeders  string `json:"seeders"`
	Leechers string `json:"leechers"`
}

func (*TorrentStatusPeers) DeepCopy

func (in *TorrentStatusPeers) DeepCopy() *TorrentStatusPeers

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

func (*TorrentStatusPeers) DeepCopyInto

func (in *TorrentStatusPeers) DeepCopyInto(out *TorrentStatusPeers)

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

type TorrentStatusSpeed

type TorrentStatusSpeed struct {
	DlSpeed int `json:"dlSpeed"`
	UpSpeed int `json:"upSpeed"`
}

func (*TorrentStatusSpeed) DeepCopy

func (in *TorrentStatusSpeed) DeepCopy() *TorrentStatusSpeed

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

func (*TorrentStatusSpeed) DeepCopyInto

func (in *TorrentStatusSpeed) DeepCopyInto(out *TorrentStatusSpeed)

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