models

package
v0.1.19 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProjectModelName                  = "g:model:project"
	SeedModelName                     = "g:model:seed"
	ShootModelName                    = "g:model:shoot"
	MachineModelName                  = "g:model:machine"
	BackupBucketModelName             = "g:model:backup_bucket"
	CloudProfileModelName             = "g:model:cloud_profile"
	CloudProfileAWSImageModelName     = "g:model:cloud_profile_aws_image"
	CloudProfileGCPImageModelName     = "g:model:cloud_profile_gcp_image"
	CloudProfileAzureImageModelName   = "g:model:cloud_profile_azure_image"
	PersistentVolumeModelName         = "g:model:persistent_volume"
	ProjectMemberModelName            = "g:model:project_member"
	DNSRecordModelName                = "g:model:dns_record"
	DNSEntryModelName                 = "g:model:dns_entry"
	BastionModelName                  = "g:model:bastion"
	ShootToProjectModelName           = "g:model:link_shoot_to_project"
	ShootToSeedModelName              = "g:model:link_shoot_to_seed"
	MachineToShootModelName           = "g:model:link_machine_to_shoot"
	AWSImageToCloudProfileModelName   = "g:model:link_aws_image_to_cloud_profile"
	GCPImageToCloudProfileModelName   = "g:model:link_gcp_image_to_cloud_profile"
	AzureImageToCloudProfileModelName = "g:model:link_azure_image_to_cloud_profile"
	ProjectToMemberModelName          = "g:model:link_project_to_member"
)

Names for the various models provided by this package. These names are used for registering models with registry.ModelRegistry

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSImageToCloudProfile

type AWSImageToCloudProfile struct {
	bun.BaseModel `bun:"table:l_g_aws_image_to_cloud_profile"`
	coremodels.Model

	AWSImageID     uuid.UUID `bun:"aws_image_id,notnull,type:uuid,unique:l_g_aws_image_to_cloud_profile_key"`
	CloudProfileID uuid.UUID `bun:"cloud_profile_id,notnull,type:uuid,unique:l_g_aws_image_to_cloud_profile_key"`
}

AWSImageToCloudProfile represents a link table connecting the CloudProfileAWSImage with CloudProfile.

type AzureImageToCloudProfile added in v0.1.1

type AzureImageToCloudProfile struct {
	bun.BaseModel `bun:"table:l_g_azure_image_to_cloud_profile"`
	coremodels.Model

	AzureImageID   uuid.UUID `bun:"azure_image_id,notnull,type:uuid,unique:l_g_azure_image_to_cloud_profile_key"`
	CloudProfileID uuid.UUID `bun:"cloud_profile_id,notnull,type:uuid,unique:l_g_azure_image_to_cloud_profile_key"`
}

AzureImageToCloudProfile represents a link table connecting the CloudProfileAzureImage with CloudProfile.

type BackupBucket

type BackupBucket struct {
	bun.BaseModel `bun:"table:g_backup_bucket"`
	coremodels.Model

	Name              string    `bun:"name,notnull,unique"`
	ProviderType      string    `bun:"provider_type,notnull"`
	RegionName        string    `bun:"region_name,notnull"`
	State             string    `bun:"state,nullzero"`
	StateProgress     int       `bun:"state_progress,nullzero"`
	SeedName          string    `bun:"seed_name,notnull"`
	CreationTimestamp time.Time `bun:"creation_timestamp,nullzero"`
	Seed              *Seed     `bun:"rel:has-one,join:seed_name=name"`
}

BackupBucket represents a Gardener BackupBucket resource

type Bastion added in v0.1.19

type Bastion struct {
	bun.BaseModel `bun:"table:g_bastion"`
	coremodels.Model

	Name      string `bun:"name,notnull,unique:g_bastion_key"`
	Namespace string `bun:"namespace,notnull,unique:g_bastion_key"`
	SeedName  string `bun:"seed_name,notnull,unique:g_bastion_key"`
	IP        net.IP `bun:"ip,nullzero"`
	Hostname  string `bun:"hostname,nullzero"`
	Seed      *Seed  `bun:"rel:has-one,join:seed_name=name"`
}

Bastion represents a Gardener Bastion instance

type CloudProfile

type CloudProfile struct {
	bun.BaseModel `bun:"table:g_cloud_profile"`
	coremodels.Model

	Name              string    `bun:"name,notnull,unique"`
	Type              string    `bun:"type,notnull"`
	CreationTimestamp time.Time `bun:"creation_timestamp,nullzero"`
}

CloudProfile represents a Gardener CloudProfile resource

type CloudProfileAWSImage

type CloudProfileAWSImage struct {
	bun.BaseModel `bun:"table:g_cloud_profile_aws_image"`
	coremodels.Model

	Name             string        `bun:"name,notnull,unique:g_cloud_profile_aws_image_key"`
	Version          string        `bun:"version,notnull,unique:g_cloud_profile_aws_image_key"`
	RegionName       string        `bun:"region_name,notnull,unique:g_cloud_profile_aws_image_key"`
	AMI              string        `bun:"ami,notnull,unique:g_cloud_profile_aws_image_key"`
	Architecture     string        `bun:"architecture,notnull"`
	CloudProfileName string        `bun:"cloud_profile_name,notnull,unique:g_cloud_profile_aws_image_key"`
	CloudProfile     *CloudProfile `bun:"rel:has-one,join:cloud_profile_name=name"`
}

CloudProfileAWSImage represents an AWS Machine Image collected from a CloudProfile. It is a separate resource to AMIs in the aws package, as we must match between what is required (this) and what is (AMIs)

type CloudProfileAzureImage added in v0.1.1

type CloudProfileAzureImage struct {
	bun.BaseModel `bun:"table:g_cloud_profile_azure_image"`
	coremodels.Model

	Name             string        `bun:"name,notnull,unique:g_cloud_profile_azure_image_key"`
	Version          string        `bun:"version,notnull,unique:g_cloud_profile_azure_image_key"`
	Architecture     string        `bun:"architecture,notnull,unique:g_cloud_profile_azure_image_key"`
	CloudProfileName string        `bun:"cloud_profile_name,notnull,unique:g_cloud_profile_azure_image_key"`
	ImageID          string        `bun:"image_id,notnull,unique:g_cloud_profile_azure_image_key"`
	CloudProfile     *CloudProfile `bun:"rel:has-one,join:cloud_profile_name=name"`
}

CloudProfileAzureImage represents an Azure Machine Image collected from a CloudProfile.

type CloudProfileGCPImage

type CloudProfileGCPImage struct {
	bun.BaseModel `bun:"table:g_cloud_profile_gcp_image"`
	coremodels.Model

	Name             string        `bun:"name,notnull,unique:g_cloud_profile_gcp_image_key"`
	Version          string        `bun:"version,notnull,unique:g_cloud_profile_gcp_image_key"`
	Image            string        `bun:"image,notnull,unique:g_cloud_profile_gcp_image_key"`
	Architecture     string        `bun:"architecture,notnull"`
	CloudProfileName string        `bun:"cloud_profile_name,notnull,unique:g_cloud_profile_gcp_image_key"`
	CloudProfile     *CloudProfile `bun:"rel:has-one,join:cloud_profile_name=name"`
}

CloudProfileGCPImage represents a GCP Machine Image collected from a CloudProfile.

type CloudProfileOpenStackImage added in v0.1.11

type CloudProfileOpenStackImage struct {
	bun.BaseModel `bun:"table:g_cloud_profile_openstack_image"`
	coremodels.Model

	Name             string        `bun:"name,notnull,unique:g_cloud_profile_openstack_image_key"`
	Version          string        `bun:"version,notnull,unique:g_cloud_profile_openstack_image_key"`
	RegionName       string        `bun:"region_name,notnull,unique:g_cloud_profile_openstack_image_key"`
	ImageID          string        `bun:"image_id,notnull,unique:g_cloud_profile_openstack_image_key"`
	Architecture     string        `bun:"architecture,notnull"`
	CloudProfileName string        `bun:"cloud_profile_name,notnull,unique:g_cloud_profile_openstack_image_key"`
	CloudProfile     *CloudProfile `bun:"rel:has-one,join:cloud_profile_name=name"`
}

CloudProfileOpenStackImage represents an OpenStack Machine Image listed in a CloudProfile.

type DNSEntry added in v0.1.19

type DNSEntry struct {
	bun.BaseModel `bun:"table:g_dns_entry"`
	coremodels.Model

	Name              string    `bun:"name,notnull,unique:g_dns_entry_key"`
	Namespace         string    `bun:"namespace,notnull,unique:g_dns_entry_key"`
	SeedName          string    `bun:"seed_name,notnull,unique:g_dns_entry_key"`
	Value             string    `bun:"value,notnull,unique:g_dns_entry_key"`
	FQDN              string    `bun:"fqdn,notnull"`
	TTL               *int64    `bun:"ttl"`
	DNSZone           string    `bun:"dns_zone,notnull"`
	ProviderType      string    `bun:"provider_type,notnull"`
	Provider          string    `bun:"provider,notnull"`
	CreationTimestamp time.Time `bun:"creation_timestamp,nullzero"`
	Seed              *Seed     `bun:"rel:has-one,join:seed_name=name"`
}

DNSEntry represents a Gardener DNSEntry resource

type DNSRecord added in v0.1.19

type DNSRecord struct {
	bun.BaseModel `bun:"table:g_dns_record"`
	coremodels.Model

	Name              string    `bun:"name,notnull,unique:g_dns_record_key"`
	Namespace         string    `bun:"namespace,notnull,unique:g_dns_record_key"`
	SeedName          string    `bun:"seed_name,notnull,unique:g_dns_record_key"`
	Value             string    `bun:"value,notnull,unique:g_dns_record_key"`
	RecordType        string    `bun:"record_type,notnull"`
	FQDN              string    `bun:"fqdn,notnull"`
	TTL               *int64    `bun:"ttl"`
	Region            string    `bun:"region,nullzero"`
	DNSZone           string    `bun:"dns_zone,notnull"`
	CreationTimestamp time.Time `bun:"creation_timestamp,nullzero"`
	Seed              *Seed     `bun:"rel:has-one,join:seed_name=name"`
}

DNSRecord represents a Gardener DNSRecord resource

type GCPImageToCloudProfile

type GCPImageToCloudProfile struct {
	bun.BaseModel `bun:"table:l_g_gcp_image_to_cloud_profile"`
	coremodels.Model

	GCPImageID     uuid.UUID `bun:"gcp_image_id,notnull,type:uuid,unique:l_g_gcp_image_to_cloud_profile_key"`
	CloudProfileID uuid.UUID `bun:"cloud_profile_id,notnull,type:uuid,unique:l_g_gcp_image_to_cloud_profile_key"`
}

GCPImageToCloudProfile represents a link table connecting the CloudProfileGCPImage with CloudProfile.

type Machine

type Machine struct {
	bun.BaseModel `bun:"table:g_machine"`
	coremodels.Model

	Name              string    `bun:"name,notnull,unique:g_machine_name_namespace_key"`
	Namespace         string    `bun:"namespace,notnull,unique:g_machine_name_namespace_key"`
	ProviderID        string    `bun:"provider_id,notnull"`
	Status            string    `bun:"status,notnull"`
	Node              string    `bun:"node,nullzero"`
	SeedName          string    `bun:"seed_name,notnull"`
	CreationTimestamp time.Time `bun:"creation_timestamp,nullzero"`
	Seed              *Seed     `bun:"rel:has-one,join:seed_name=name"`
	Shoot             *Shoot    `bun:"rel:has-one,join:namespace=technical_id"`
}

Machine represents a Gardener machine

type MachineToShoot

type MachineToShoot struct {
	bun.BaseModel `bun:"table:l_g_machine_to_shoot"`
	coremodels.Model

	ShootID   uuid.UUID `bun:"shoot_id,notnull,type:uuid,unique:l_g_machine_to_shoot_key"`
	MachineID uuid.UUID `bun:"machine_id,notnull,type:uuid,unique:l_g_machine_to_shoot_key"`
}

MachineToShoot represents a link table connecting the Machine with Shoot.

type OpenStackImageToCloudProfile added in v0.1.11

type OpenStackImageToCloudProfile struct {
	bun.BaseModel `bun:"table:l_g_openstack_image_to_cloud_profile"`
	coremodels.Model

	OpenStackImageID uuid.UUID `bun:"openstack_image_id,notnull,type:uuid,unique:l_g_openstack_image_to_cloud_profile_key"`
	CloudProfileID   uuid.UUID `bun:"cloud_profile_id,notnull,type:uuid,unique:l_g_openstack_image_to_cloud_profile_key"`
}

OpenStackImageToCloudProfile represents a link table connecting the CloudProfileOpenStackImage with CloudProfile.

type PersistentVolume added in v0.1.4

type PersistentVolume struct {
	bun.BaseModel `bun:"table:g_persistent_volume"`
	coremodels.Model

	Name              string    `bun:"name,notnull,unique:g_persistent_volume_key"`
	SeedName          string    `bun:"seed_name,notnull,unique:g_persistent_volume_key"`
	Provider          string    `bun:"provider,nullzero"`
	DiskRef           string    `bun:"disk_ref,nullzero"`
	Status            string    `bun:"status,notnull"`
	Capacity          string    `bun:"capacity,notnull"`
	StorageClass      string    `bun:"storage_class,notnull"`
	VolumeMode        string    `bun:"volume_mode,nullzero"`
	CreationTimestamp time.Time `bun:"creation_timestamp,nullzero"`
	Seed              *Seed     `bun:"rel:has-one,join:seed_name=name"`
}

PersistentVolume represents a Kubernetes PV in Gardener

type Project

type Project struct {
	bun.BaseModel `bun:"table:g_project"`
	coremodels.Model

	Name              string           `bun:"name,notnull,unique"`
	Namespace         string           `bun:"namespace,notnull"`
	Status            string           `bun:"status,notnull"`
	Purpose           string           `bun:"purpose,notnull"`
	Owner             string           `bun:"owner,notnull"`
	CreationTimestamp time.Time        `bun:"creation_timestamp,nullzero"`
	Shoots            []*Shoot         `bun:"rel:has-many,join:name=project_name"`
	Members           []*ProjectMember `bun:"rel:has-many,join:name=project_name"`
}

Project represents a Gardener project

type ProjectMember added in v0.1.8

type ProjectMember struct {
	bun.BaseModel `bun:"table:g_project_member"`
	coremodels.Model

	Name        string   `bun:"name,notnull,unique:g_project_member_key"`
	ProjectName string   `bun:"project_name,notnull,unique:g_project_member_key"`
	Kind        string   `bun:"kind,notnull"`
	Role        string   `bun:"role,notnull"`
	Project     *Project `bun:"rel:has-one,join:project_name=name"`
}

ProjectMember represents a member of a Gardener Project

type ProjectToMember added in v0.1.8

type ProjectToMember struct {
	bun.BaseModel `bun:"table:l_g_project_to_member"`
	coremodels.Model

	ProjectID uuid.UUID `bun:"project_id,notnull,type:uuid,unique:l_g_project_to_member_key"`
	MemberID  uuid.UUID `bun:"member_id,notnull,type:uuid,unique:l_g_project_to_member_key"`
}

ProjectToMember represents a link table connecting the Project and ProjectMember models.

type Seed

type Seed struct {
	bun.BaseModel `bun:"table:g_seed"`
	coremodels.Model

	Name              string     `bun:"name,notnull,unique"`
	KubernetesVersion string     `bun:"kubernetes_version,notnull"`
	CreationTimestamp time.Time  `bun:"creation_timestamp,nullzero"`
	Machines          []*Machine `bun:"rel:has-many,join:name=seed_name"`
	Shoots            []*Shoot   `bun:"rel:has-many,join:name=seed_name"`
}

Seed represents a Gardener seed

type Shoot

type Shoot struct {
	bun.BaseModel `bun:"table:g_shoot"`
	coremodels.Model

	Name              string     `bun:"name,notnull"`
	TechnicalID       string     `bun:"technical_id,notnull,unique"`
	Namespace         string     `bun:"namespace,notnull"`
	ProjectName       string     `bun:"project_name,notnull"`
	CloudProfile      string     `bun:"cloud_profile,notnull"`
	Purpose           string     `bun:"purpose,notnull"`
	SeedName          string     `bun:"seed_name,notnull"`
	Status            string     `bun:"status,notnull"`
	IsHibernated      bool       `bun:"is_hibernated,notnull"`
	CreatedBy         string     `bun:"created_by,notnull"`
	Region            string     `bun:"region,nullzero"`
	KubernetesVersion string     `bun:"k8s_version,nullzero"`
	CreationTimestamp time.Time  `bun:"creation_timestamp,nullzero"`
	WorkerGroups      []string   `bun:"worker_groups,array,nullzero"`
	WorkerPrefixes    []string   `bun:"worker_prefixes,array,nullzero"`
	Seed              *Seed      `bun:"rel:has-one,join:seed_name=name"`
	Project           *Project   `bun:"rel:has-one,join:project_name=name"`
	Machines          []*Machine `bun:"rel:has-many,join:technical_id=namespace"`
}

Shoot represents a Gardener shoot

type ShootToProject

type ShootToProject struct {
	bun.BaseModel `bun:"table:l_g_shoot_to_project"`
	coremodels.Model

	ShootID   uuid.UUID `bun:"shoot_id,notnull,type:uuid,unique:l_g_shoot_to_project_key"`
	ProjectID uuid.UUID `bun:"project_id,notnull,type:uuid,unique:l_g_shoot_to_project_key"`
}

ShootToProject represents a link table connecting the Shoot with Project.

type ShootToSeed

type ShootToSeed struct {
	bun.BaseModel `bun:"table:l_g_shoot_to_seed"`
	coremodels.Model

	ShootID uuid.UUID `bun:"shoot_id,notnull,type:uuid,unique:l_g_shoot_to_seed_key"`
	SeedID  uuid.UUID `bun:"seed_id,notnull,type:uuid,unique:l_g_shoot_to_seed_key"`
}

ShootToSeed represents a link table connecting the Shoot with Seed.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL