v1alpha1

package
v0.0.0-...-a4686c1 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "postgres.glints.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 ObjectType

type ObjectType string
const (
	ObjectTypeTable    ObjectType = "table"
	ObjectTypeSequence ObjectType = "sequence"
	ObjectTypeDatabase ObjectType = "database"
	ObjectTypeSchema   ObjectType = "schema"
	ObjectTypeFunction ObjectType = "function"
)

func (ObjectType) ValidPrivileges

func (o ObjectType) ValidPrivileges() map[string]struct{}

type PostgresColumn

type PostgresColumn struct {
	// Name of the column
	Name string `json:"name"`

	// DataType is the data type of the column
	DataType string `json:"dataType"`

	// Nullable determines whether the created column can be NULL
	Nullable bool `json:"nullable"`

	// PrimaryKey defines whether the column is part of the table's primary key
	PrimaryKey bool `json:"primaryKey"`
}

PostgresColumn represents a column

func (*PostgresColumn) DeepCopy

func (in *PostgresColumn) DeepCopy() *PostgresColumn

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

func (*PostgresColumn) DeepCopyInto

func (in *PostgresColumn) DeepCopyInto(out *PostgresColumn)

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

type PostgresConfig

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

	Spec   PostgresConfigSpec   `json:"spec,omitempty"`
	Status PostgresConfigStatus `json:"status,omitempty"`
}

PostgresConfig is the Schema for the postgresconfigs API

func (*PostgresConfig) DeepCopy

func (in *PostgresConfig) DeepCopy() *PostgresConfig

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

func (*PostgresConfig) DeepCopyInto

func (in *PostgresConfig) DeepCopyInto(out *PostgresConfig)

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

func (*PostgresConfig) DeepCopyObject

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

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

type PostgresConfigList

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

PostgresConfigList contains a list of PostgresConfig

func (*PostgresConfigList) DeepCopy

func (in *PostgresConfigList) DeepCopy() *PostgresConfigList

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

func (*PostgresConfigList) DeepCopyInto

func (in *PostgresConfigList) DeepCopyInto(out *PostgresConfigList)

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

func (*PostgresConfigList) DeepCopyObject

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

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

type PostgresConfigSpec

type PostgresConfigSpec struct {

	// PostgresRef is a reference to the PostgreSQL server to configure
	PostgresRef PostgresRef `json:"postgresRef"`

	// Publications is a list of publications to be created
	Publications []Publication `json:"publications,omitempty"`

	// Tables is a list of tables to be created
	Tables []Table `json:"table,omitempty"`
}

PostgresConfigSpec defines the desired state of PostgresConfig

func (*PostgresConfigSpec) DeepCopy

func (in *PostgresConfigSpec) DeepCopy() *PostgresConfigSpec

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

func (*PostgresConfigSpec) DeepCopyInto

func (in *PostgresConfigSpec) DeepCopyInto(out *PostgresConfigSpec)

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

type PostgresConfigStatus

type PostgresConfigStatus struct {

	// Configured indicates whether the target PostgreSQL server has been
	// successfully configured according to spec
	Configured bool `json:"configured"`
}

PostgresConfigStatus defines the observed state of PostgresConfig

func (*PostgresConfigStatus) DeepCopy

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

func (*PostgresConfigStatus) DeepCopyInto

func (in *PostgresConfigStatus) DeepCopyInto(out *PostgresConfigStatus)

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

type PostgresGrant

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

	Spec   PostgresGrantSpec   `json:"spec,omitempty"`
	Status PostgresGrantStatus `json:"status,omitempty"`
}

PostgresGrant is the Schema for the postgresgrants API

func (*PostgresGrant) DeepCopy

func (in *PostgresGrant) DeepCopy() *PostgresGrant

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

func (*PostgresGrant) DeepCopyInto

func (in *PostgresGrant) DeepCopyInto(out *PostgresGrant)

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

func (*PostgresGrant) DeepCopyObject

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

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

func (*PostgresGrant) IdentifiersForType

func (g *PostgresGrant) IdentifiersForType(o ObjectType) []pgx.Identifier

IdentifiersForType returns the list of identifiers defined for a given object type within the grant. If the object type is invalid, nil is returned.

func (*PostgresGrant) PrivilegesForType

func (g *PostgresGrant) PrivilegesForType(o ObjectType) []string

PrivilegesForType returns the list of privileges defined for a given object type within the grant. If the object type is invalid, nil is returned.

func (*PostgresGrant) SetupWebhookWithManager

func (r *PostgresGrant) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*PostgresGrant) ValidateCreate

func (r *PostgresGrant) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*PostgresGrant) ValidateDelete

func (r *PostgresGrant) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*PostgresGrant) ValidateUpdate

func (r *PostgresGrant) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type PostgresGrantList

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

PostgresGrantList contains a list of PostgresGrant

func (*PostgresGrantList) DeepCopy

func (in *PostgresGrantList) DeepCopy() *PostgresGrantList

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

func (*PostgresGrantList) DeepCopyInto

func (in *PostgresGrantList) DeepCopyInto(out *PostgresGrantList)

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

func (*PostgresGrantList) DeepCopyObject

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

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

type PostgresGrantSpec

type PostgresGrantSpec struct {

	// PostgresRef is a reference to the PostgreSQL server to configure
	PostgresRef PostgresRef `json:"postgresRef"`

	// Role to grant privileges to
	Role string `json:"role"`

	// Tables is the list of tables to grant privileges for
	Tables []PostgresIdentifier `json:"tables,omitempty"`

	// TablePrivileges is the list of privileges to grant
	// Must be one of: SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER, ALL
	TablePrivileges []string `json:"tablePrivileges,omitempty"`

	// Sequences is the list of sequences to grant privileges for
	Sequences []PostgresIdentifier `json:"sequences,omitempty"`

	// SequencePrivileges is the list of privileges to grant
	// Must be one of: USAGE, SELECT, UPDATE, ALL
	SequencePrivileges []string `json:"sequencePrivileges,omitempty"`

	// Databases is the list of databases to grant privileges for
	Databases []string `json:"databases,omitempty"`

	// DatabasePrivileges is the list of privileges to grant
	// Must be one of: CREATE, CONNECT, TEMPORARY, TEMP, ALL
	DatabasePrivileges []string `json:"databasePrivileges,omitempty"`

	// Schemas  is the list of schemas to grant privileges for
	Schemas []string `json:"schemas,omitempty"`

	// SchemaPrivileges is the list of privileges to grant
	// Must be one of: CREATE, USAGE, ALL
	SchemaPrivileges []string `json:"schemaPrivileges,omitempty"`

	// Functions  is the list of functions to grant privileges for
	Functions []PostgresIdentifier `json:"functions,omitempty"`

	// FunctionPrivileges is the list of privileges to grant
	// Must be one of: EXECUTE, ALL
	FunctionPrivileges []string `json:"functionPrivileges,omitempty"`
}

PostgresGrantSpec defines the desired state of PostgresGrant

func (*PostgresGrantSpec) DeepCopy

func (in *PostgresGrantSpec) DeepCopy() *PostgresGrantSpec

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

func (*PostgresGrantSpec) DeepCopyInto

func (in *PostgresGrantSpec) DeepCopyInto(out *PostgresGrantSpec)

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

type PostgresGrantStatus

type PostgresGrantStatus struct {
}

PostgresGrantStatus defines the observed state of PostgresGrant

func (*PostgresGrantStatus) DeepCopy

func (in *PostgresGrantStatus) DeepCopy() *PostgresGrantStatus

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

func (*PostgresGrantStatus) DeepCopyInto

func (in *PostgresGrantStatus) DeepCopyInto(out *PostgresGrantStatus)

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

type PostgresIdentifier

type PostgresIdentifier struct {
	// Name is the name of the table
	Name string `json:"name"`

	// Schema is the name of the schema the table resides in
	Schema string `json:"schema"`
}

PostgresIdentifier represents an identifier for a table, e.g. a pair of schema and table name.

func (*PostgresIdentifier) DeepCopy

func (in *PostgresIdentifier) DeepCopy() *PostgresIdentifier

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

func (*PostgresIdentifier) DeepCopyInto

func (in *PostgresIdentifier) DeepCopyInto(out *PostgresIdentifier)

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

type PostgresPublication

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

	Spec   PostgresPublicationSpec   `json:"spec,omitempty"`
	Status PostgresPublicationStatus `json:"status,omitempty"`
}

PostgresPublication is the Schema for the postgrespublications API

func (*PostgresPublication) DeepCopy

func (in *PostgresPublication) DeepCopy() *PostgresPublication

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

func (*PostgresPublication) DeepCopyInto

func (in *PostgresPublication) DeepCopyInto(out *PostgresPublication)

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

func (*PostgresPublication) DeepCopyObject

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

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

type PostgresPublicationList

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

PostgresPublicationList contains a list of PostgresPublication

func (*PostgresPublicationList) DeepCopy

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

func (*PostgresPublicationList) DeepCopyInto

func (in *PostgresPublicationList) DeepCopyInto(out *PostgresPublicationList)

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

func (*PostgresPublicationList) DeepCopyObject

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

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

type PostgresPublicationSpec

type PostgresPublicationSpec struct {

	// PostgresRef is a reference to the PostgreSQL server to configure
	PostgresRef PostgresRef `json:"postgresRef"`

	// Name is the name of the publication to create
	Name string `json:"name"`

	// Tables is the list of tables to include in the publication. If the list
	// is empty or omitted, publication is created for all tables
	Tables []PostgresIdentifier `json:"tables"`

	// Operations determines which DML operations will be published by the
	// publication to subscribers. The allowed operations are insert, update,
	// delete, and truncate. If left empty or omitted, all operations are
	// published
	Operations []string `json:"operations,omitempty"`
}

PostgresPublicationSpec defines the desired state of PostgresPublication

func (*PostgresPublicationSpec) DeepCopy

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

func (*PostgresPublicationSpec) DeepCopyInto

func (in *PostgresPublicationSpec) DeepCopyInto(out *PostgresPublicationSpec)

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

type PostgresPublicationStatus

type PostgresPublicationStatus struct {
}

PostgresPublicationStatus defines the observed state of PostgresPublication

func (*PostgresPublicationStatus) DeepCopy

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

func (*PostgresPublicationStatus) DeepCopyInto

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

type PostgresRef

type PostgresRef struct {
	// Host is the host of the PostgreSQL server to configure
	Host string `json:"host,omitempty"`

	// Port is the port of the PostgreSQL server to configure
	Port uint16 `json:"port,omitempty"`

	// Database is the name of the database to configure
	Database string `json:"database,omitempty"`

	// SecretRef is a reference to a secret in the same namespace that contains
	// credentials to authenticate against the PostgreSQL server
	SecretRef SecretRef `json:"secretRef"`

	// Variant is for specific database-as-a-service providers. Valid values
	// are: aiven, standard. The default value is "standard"
	Variant string `json:"variant,omitempty"`
}

PostgresRef is a reference to a PostgreSQL server

func (*PostgresRef) DeepCopy

func (in *PostgresRef) DeepCopy() *PostgresRef

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

func (*PostgresRef) DeepCopyInto

func (in *PostgresRef) DeepCopyInto(out *PostgresRef)

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

type PostgresTable

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

	Spec   PostgresTableSpec   `json:"spec,omitempty"`
	Status PostgresTableStatus `json:"status,omitempty"`
}

PostgresTable is the Schema for the postgrestables API

func (*PostgresTable) DeepCopy

func (in *PostgresTable) DeepCopy() *PostgresTable

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

func (*PostgresTable) DeepCopyInto

func (in *PostgresTable) DeepCopyInto(out *PostgresTable)

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

func (*PostgresTable) DeepCopyObject

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

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

type PostgresTableList

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

PostgresTableList contains a list of PostgresTable

func (*PostgresTableList) DeepCopy

func (in *PostgresTableList) DeepCopy() *PostgresTableList

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

func (*PostgresTableList) DeepCopyInto

func (in *PostgresTableList) DeepCopyInto(out *PostgresTableList)

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

func (*PostgresTableList) DeepCopyObject

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

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

type PostgresTableSpec

type PostgresTableSpec struct {

	// PostgresRef is a reference to the PostgreSQL server to configure
	PostgresRef PostgresRef `json:"postgresRef"`

	// Columns is the list of columns to be created
	Columns []PostgresColumn `json:"columns"`

	// Inherit fields from PostgresIdentifier
	PostgresIdentifier `json:""`
}

PostgresTableSpec defines the desired state of PostgresTable

func (*PostgresTableSpec) DeepCopy

func (in *PostgresTableSpec) DeepCopy() *PostgresTableSpec

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

func (*PostgresTableSpec) DeepCopyInto

func (in *PostgresTableSpec) DeepCopyInto(out *PostgresTableSpec)

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

type PostgresTableStatus

type PostgresTableStatus struct {
}

PostgresTableStatus defines the observed state of PostgresTable

func (*PostgresTableStatus) DeepCopy

func (in *PostgresTableStatus) DeepCopy() *PostgresTableStatus

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

func (*PostgresTableStatus) DeepCopyInto

func (in *PostgresTableStatus) DeepCopyInto(out *PostgresTableStatus)

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

type Publication

type Publication struct {
	// Name is the name of the publication to create
	Name string `json:"name"`

	// Tables is the list of tables to include in the publication. If the list
	// is empty or omitted, publication is created for all tables
	Tables []PostgresIdentifier `json:"tables,omitempty"`

	// Operations determines which DML operations will be published by the
	// publication to subscribers. The allowed operations are insert, update,
	// delete, and truncate. If left empty or omitted, all operations are
	// published
	Operations []string `json:"operations,omitempty"`
}

Publication represents a PUBLICATION https://www.postgresql.org/docs/current/sql-createpublication.html

func (*Publication) DeepCopy

func (in *Publication) DeepCopy() *Publication

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

func (*Publication) DeepCopyInto

func (in *Publication) DeepCopyInto(out *Publication)

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

type SecretRef

type SecretRef struct {
	// SecretName is the name of the secret.
	SecretName string `json:"secretName,omitempty"`

	// UsernameKey is the name of the key in the secret storing the username.
	// The default value is POSTGRES_USER.
	UsernameKey string `json:"usernameKey,omitempty"`

	// PasswordKey is the name of the key in the secret storing the password.
	// The default value is POSTGRES_PASSWORD.
	PasswordKey string `json:"passwordKey,omitempty"`
}

SecretRef is a reference to a secret that exists in the same namespace.

func (*SecretRef) DeepCopy

func (in *SecretRef) DeepCopy() *SecretRef

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

func (*SecretRef) DeepCopyInto

func (in *SecretRef) DeepCopyInto(out *SecretRef)

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

type Table

type Table struct {
	// Columns is the list of columns to be created
	Columns []PostgresColumn `json:"columns"`

	// Inherit fields from PostgresIdentifier
	PostgresIdentifier `json:""`
}

Table represents a table https://www.postgresql.org/docs/current/sql-createtable.html

func (*Table) DeepCopy

func (in *Table) DeepCopy() *Table

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

func (*Table) DeepCopyInto

func (in *Table) DeepCopyInto(out *Table)

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