v1alpha1

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the database v1alpha1 API group +kubebuilder:object:generate=true +groupName=database.zncdata.dev

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "database.zncdata.dev", 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 Database

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

	Spec   DatabaseSpec   `json:"spec,omitempty"`
	Status DatabaseStatus `json:"status,omitempty"`
}

Database is the Schema for the databases API

func (*Database) DeepCopy

func (in *Database) DeepCopy() *Database

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

func (*Database) DeepCopyInto

func (in *Database) DeepCopyInto(out *Database)

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

func (*Database) DeepCopyObject

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

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

type DatabaseConnection

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

	Spec   DatabaseConnectionSpec   `json:"spec,omitempty"`
	Status DatabaseConnectionStatus `json:"status,omitempty"`
}

DatabaseConnection is the Schema for the databaseconnections API

func (*DatabaseConnection) DeepCopy

func (in *DatabaseConnection) DeepCopy() *DatabaseConnection

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

func (*DatabaseConnection) DeepCopyInto

func (in *DatabaseConnection) DeepCopyInto(out *DatabaseConnection)

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

func (*DatabaseConnection) DeepCopyObject

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

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

type DatabaseConnectionList

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

DatabaseConnectionList contains a list of DatabaseConnection

func (*DatabaseConnectionList) DeepCopy

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

func (*DatabaseConnectionList) DeepCopyInto

func (in *DatabaseConnectionList) DeepCopyInto(out *DatabaseConnectionList)

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

func (*DatabaseConnectionList) DeepCopyObject

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

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

type DatabaseConnectionProvider

type DatabaseConnectionProvider struct {
	// +kubebuilder:validation:Optional
	Mysql *MysqlProvider `json:"mysql,omitempty"`
	// +kubebuilder:validation:Optional
	Postgres *PostgresProvider `json:"postgres,omitempty"`
	// +kubebuilder:validation:Optional
	Redis *RedisProvider `json:"redis,omitempty"`
}

DatabaseConnectionProvider defines the enum provider for DataConnection. You can choose one of mysql, postgres, redis, and provider is required.

func (*DatabaseConnectionProvider) DeepCopy

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

func (*DatabaseConnectionProvider) DeepCopyInto

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

type DatabaseConnectionSpec

type DatabaseConnectionSpec struct {
	// +kubebuilder:validation:Required
	Provider *DatabaseConnectionProvider `json:"provider,omitempty"`

	// +kubebuilder:validation:Optional
	Default bool `json:"default,omitempty"`
}

DatabaseConnectionSpec defines the desired state of DatabaseConnection

func (*DatabaseConnectionSpec) DeepCopy

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

func (*DatabaseConnectionSpec) DeepCopyInto

func (in *DatabaseConnectionSpec) DeepCopyInto(out *DatabaseConnectionSpec)

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

type DatabaseConnectionStatus

type DatabaseConnectionStatus struct {
	// +kubebuilder:validation:Optional
	Conditions []metav1.Condition `json:"condition,omitempty"`
}

func (*DatabaseConnectionStatus) DeepCopy

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

func (*DatabaseConnectionStatus) DeepCopyInto

func (in *DatabaseConnectionStatus) DeepCopyInto(out *DatabaseConnectionStatus)

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

type DatabaseCredentialSpec

type DatabaseCredentialSpec struct {
	// ExistSecret is a Secret name, created by user.
	// It includes Username and Password, it is encrypted by base64.
	// If ExistSecret is not empty, Username and Password will be ignored.
	// +kubebuilder:validation:Optional
	ExistSecret string `json:"existingSecret,omitempty"`

	// Username is the username for the database.
	// +kubebuilder:validation:Optional
	Username string `json:"username,omitempty"`

	// Password is the password for the database.
	// +kubebuilder:validation:Optional
	Password string `json:"password,omitempty"`
}

DatabaseCredentialSpec include: Username and Password or ExistSecret.

func (*DatabaseCredentialSpec) DeepCopy

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

func (*DatabaseCredentialSpec) DeepCopyInto

func (in *DatabaseCredentialSpec) DeepCopyInto(out *DatabaseCredentialSpec)

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

type DatabaseList

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

DatabaseList contains a list of Database

func (*DatabaseList) DeepCopy

func (in *DatabaseList) DeepCopy() *DatabaseList

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

func (*DatabaseList) DeepCopyInto

func (in *DatabaseList) DeepCopyInto(out *DatabaseList)

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

func (*DatabaseList) DeepCopyObject

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

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

type DatabaseSpec

type DatabaseSpec struct {

	//+kubebuilder:validation:Required
	DatabaseName string `json:"databaseName,omitempty"`

	// Name of DatabaseConnection CR to use for this database.
	//+kubebuilder:validation:Required
	Reference string `json:"reference,omitempty"`

	// Credential is the credential for the database.
	// It contains Username and Password, or ExistSecret.
	//+kubebuilder:validation:Required
	Credential *DatabaseCredentialSpec `json:"credential,omitempty"`
}

DatabaseSpec defines the desired connection info of Database

func (*DatabaseSpec) DeepCopy

func (in *DatabaseSpec) DeepCopy() *DatabaseSpec

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

func (*DatabaseSpec) DeepCopyInto

func (in *DatabaseSpec) DeepCopyInto(out *DatabaseSpec)

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

type DatabaseStatus

type DatabaseStatus struct {
	// +kubebuilder:validation:Optional
	Conditions []metav1.Condition `json:"condition,omitempty"`
}

func (*DatabaseStatus) DeepCopy

func (in *DatabaseStatus) DeepCopy() *DatabaseStatus

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

func (*DatabaseStatus) DeepCopyInto

func (in *DatabaseStatus) DeepCopyInto(out *DatabaseStatus)

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

type MysqlProvider

type MysqlProvider struct {
	// +kubebuilder:default=mysql
	// +kubebuilder:validation:Required
	Driver string `json:"driver,omitempty"`
	// +kubebuilder:validation:Required
	Host string `json:"host,omitempty"`
	// +kubebuilder:validation:Required
	Port int `json:"port,omitempty"`
	// +kubebuilder:validation:Required
	SSL bool `json:"ssl,omitempty"`
	// +kubebuilder:validation:Required
	Credential *DatabaseCredentialSpec `json:"credential,omitempty"`
}

MysqlProvider defines the desired connection info of Mysql

func (*MysqlProvider) DeepCopy

func (in *MysqlProvider) DeepCopy() *MysqlProvider

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

func (*MysqlProvider) DeepCopyInto

func (in *MysqlProvider) DeepCopyInto(out *MysqlProvider)

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

type PostgresProvider

type PostgresProvider struct {
	// +kubebuilder:default=org.postgresql.Driver
	Driver string `json:"driver,omitempty"`
	// +kubebuilder:validation:Required
	Host string `json:"host,omitempty"`
	// +kubebuilder:validation:Required
	Port int `json:"port,omitempty"`
	// +kubebuilder:validation:Required
	SSL bool `json:"ssl,omitempty"`
	// +kubebuilder:validation:Required
	Credential *DatabaseCredentialSpec `json:"credential,omitempty"`
}

PostgresProvider defines the desired connection info of Postgres

func (*PostgresProvider) DeepCopy

func (in *PostgresProvider) DeepCopy() *PostgresProvider

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

func (*PostgresProvider) DeepCopyInto

func (in *PostgresProvider) DeepCopyInto(out *PostgresProvider)

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

type RedisProvider

type RedisProvider struct {
	// +kubebuilder:validation:Required
	Host string `json:"host,omitempty"`
	// +kubebuilder:validation:Required
	Port string `json:"port,omitempty"`
}

RedisProvider defines the desired connection info of Redis

func (*RedisProvider) DeepCopy

func (in *RedisProvider) DeepCopy() *RedisProvider

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

func (*RedisProvider) DeepCopyInto

func (in *RedisProvider) DeepCopyInto(out *RedisProvider)

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