entities

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppIndexes = []repos.IndexField{
	{
		Field: []repos.IndexKey{
			{Key: fields.Id, Value: repos.IndexAsc},
		},
		Unique: true,
	},
	{
		Field: []repos.IndexKey{
			{Key: fields.MetadataName, Value: repos.IndexAsc},
			{Key: fields.MetadataNamespace, Value: repos.IndexAsc},
			{Key: fields.AccountName, Value: repos.IndexAsc},
			{Key: fields.EnvironmentName, Value: repos.IndexAsc},
		},
		Unique: true,
	},
	{
		Field: []repos.IndexKey{
			{Key: fc.AppSpecInterceptToDevice, Value: repos.IndexAsc},
		},
	},
}
View Source
var ClusterManagedServiceIndices = []repos.IndexField{
	{
		Field: []repos.IndexKey{
			{Key: "id", Value: repos.IndexAsc},
		},
		Unique: true,
	},
	{
		Field: []repos.IndexKey{
			{Key: "metadata.name", Value: repos.IndexAsc},
			{Key: "accountName", Value: repos.IndexAsc},
			{Key: "clusterName", Value: repos.IndexAsc},
		},
		Unique: true,
	},
}
View Source
var ConfigIndexes = []repos.IndexField{
	{
		Field: []repos.IndexKey{
			{Key: fields.Id, Value: repos.IndexAsc},
		},
		Unique: true,
	},
	{
		Field: []repos.IndexKey{
			{Key: fields.MetadataName, Value: repos.IndexAsc},
			{Key: fields.MetadataNamespace, Value: repos.IndexAsc},
			{Key: fields.AccountName, Value: repos.IndexAsc},
			{Key: fields.EnvironmentName, Value: repos.IndexAsc},
		},
		Unique: true,
	},
}
View Source
var EnvironmentIndexes = []repos.IndexField{
	{
		Field: []repos.IndexKey{
			{Key: fields.Id, Value: repos.IndexAsc},
		},
		Unique: true,
	},
	{
		Field: []repos.IndexKey{
			{Key: fields.MetadataName, Value: repos.IndexAsc},
			{Key: fields.MetadataNamespace, Value: repos.IndexAsc},
			{Key: fields.AccountName, Value: repos.IndexAsc},
			{Key: fields.ClusterName, Value: repos.IndexAsc},
		},
		Unique: true,
	},
	{
		Field: []repos.IndexKey{
			{Key: fields.AccountName, Value: repos.IndexAsc},
			{Key: fc.EnvironmentSpecTargetNamespace, Value: repos.IndexAsc},
		},
		Unique: true,
	},
}
View Source
var ExternalAppIndexes = []repos.IndexField{
	{
		Field: []repos.IndexKey{
			{Key: fields.Id, Value: repos.IndexAsc},
		},
		Unique: true,
	},
	{
		Field: []repos.IndexKey{
			{Key: fields.MetadataName, Value: repos.IndexAsc},
			{Key: fields.MetadataNamespace, Value: repos.IndexAsc},
			{Key: fields.AccountName, Value: repos.IndexAsc},
			{Key: fields.EnvironmentName, Value: repos.IndexAsc},
		},
		Unique: true,
	},
}
View Source
var ImagePullSecretIndexes = []repos.IndexField{
	{
		Field: []repos.IndexKey{
			{Key: fields.Id, Value: repos.IndexAsc},
		},
		Unique: true,
	},
	{
		Field: []repos.IndexKey{
			{Key: fields.MetadataName, Value: repos.IndexAsc},
			{Key: fields.MetadataNamespace, Value: repos.IndexAsc},
			{Key: fields.AccountName, Value: repos.IndexAsc},
		},
		Unique: true,
	},
}
View Source
var ImportedManagedResourceIndexes = []repos.IndexField{
	{
		Field: []repos.IndexKey{
			{Key: fc.Id, Value: repos.IndexAsc},
		},
		Unique: true,
	},
	{
		Field: []repos.IndexKey{
			{Key: fc.AccountName, Value: repos.IndexAsc},
			{Key: fc.EnvironmentName, Value: repos.IndexAsc},
			{Key: fc.ImportedManagedResourceName, Value: repos.IndexAsc},
			{Key: fc.ImportedManagedResourceSecretRefName, Value: repos.IndexAsc},
			{Key: fc.ImportedManagedResourceSecretRefNamespace, Value: repos.IndexAsc},
		},
		Unique: true,
	},
	{
		Field: []repos.IndexKey{
			{Key: fc.ImportedManagedResourceManagedResourceRefId, Value: repos.IndexAsc},
		},
	},
}
View Source
var MresIndexes = []repos.IndexField{
	{
		Field: []repos.IndexKey{
			{Key: fields.Id, Value: repos.IndexAsc},
		},
		Unique: true,
	},
	{
		Field: []repos.IndexKey{
			{Key: fields.MetadataName, Value: repos.IndexAsc},
			{Key: fields.MetadataNamespace, Value: repos.IndexAsc},
			{Key: fields.AccountName, Value: repos.IndexAsc},
			{Key: fields.EnvironmentName, Value: repos.IndexAsc},
		},
		Unique: true,
	},
}
View Source
var RegistryImageIndexes = []repos.IndexField{
	{
		Field: []repos.IndexKey{
			{Key: fields.Id, Value: repos.IndexAsc},
		},
		Unique: true,
	},
	{
		Field: []repos.IndexKey{
			{Key: fields.AccountName, Value: repos.IndexAsc},
			{Key: fc.RegistryImageImageName, Value: repos.IndexAsc},
			{Key: fc.RegistryImageImageTag, Value: repos.IndexAsc},
		},
		Unique: true,
	},
	{
		Field: []repos.IndexKey{
			{Key: fields.AccountName, Value: repos.IndexAsc},
			{Key: fc.Metadata, Value: repos.IndexAsc, IsText: true},
			{Key: fc.RegistryImageImageName, Value: repos.IndexAsc, IsText: true},
		},
	},
}
View Source
var ResourceMappingIndices = []repos.IndexField{
	{
		Field: []repos.IndexKey{
			{Key: fields.Id, Value: repos.IndexAsc},
		},
		Unique: true,
	},
	{
		Field: []repos.IndexKey{
			{Key: fields.AccountName, Value: repos.IndexAsc},
			{Key: fields.EnvironmentName, Value: repos.IndexAsc},
			{Key: fc.ResourceMappingResourceType, Value: repos.IndexAsc},
			{Key: fc.ResourceMappingResourceName, Value: repos.IndexAsc},
		},
		Unique: true,
	},
	{
		Field: []repos.IndexKey{
			{Key: fields.ClusterName, Value: repos.IndexAsc},
			{Key: fc.ResourceMappingResourceType, Value: repos.IndexAsc},
			{Key: fc.ResourceMappingResourceName, Value: repos.IndexAsc},
			{Key: fc.ResourceMappingResourceNamespace, Value: repos.IndexAsc},
		},
		Unique: true,
	},
}
View Source
var RouterIndexes = []repos.IndexField{
	{
		Field: []repos.IndexKey{
			{Key: fields.Id, Value: repos.IndexAsc},
		},
		Unique: true,
	},
	{
		Field: []repos.IndexKey{
			{Key: fields.MetadataName, Value: repos.IndexAsc},
			{Key: fields.MetadataNamespace, Value: repos.IndexAsc},
			{Key: fields.AccountName, Value: repos.IndexAsc},
			{Key: fields.EnvironmentName, Value: repos.IndexAsc},
		},
		Unique: true,
	},
}
View Source
var SecretIndexes = []repos.IndexField{
	{
		Field: []repos.IndexKey{
			{Key: fields.Id, Value: repos.IndexAsc},
		},
		Unique: true,
	},
	{
		Field: []repos.IndexKey{
			{Key: fields.MetadataName, Value: repos.IndexAsc},
			{Key: fields.MetadataNamespace, Value: repos.IndexAsc},
			{Key: fields.AccountName, Value: repos.IndexAsc},
			{Key: fields.EnvironmentName, Value: repos.IndexAsc},
		},
		Unique: true,
	},
}
View Source
var ServiceBindingIndexes = []repos.IndexField{
	{
		Field: []repos.IndexKey{
			{Key: fc.Id, Value: repos.IndexAsc},
		},
		Unique: true,
	},
	{
		Field: []repos.IndexKey{
			{Key: fc.AccountName, Value: repos.IndexAsc},

			{Key: fc.ServiceBindingSpecHostname, Value: repos.IndexAsc},
		},
		Unique: true,
	},
}

Functions

func EnvironmentDBFilter

func EnvironmentDBFilter(accountName string, envName string) repos.Filter

func FilterListImagePullSecret

func FilterListImagePullSecret(accountName string) repos.Filter

func FilterUniqueImagePullSecret

func FilterUniqueImagePullSecret(accountName string, name string) repos.Filter

Types

type App

type App struct {
	repos.BaseEntity `json:",inline" graphql:"noinput"`

	crdsv1.App `json:",inline"`

	CIBuildId *repos.ID `json:"ciBuildId,omitempty" graphql:"scalar-type=ID"`

	AccountName     string `json:"accountName" graphql:"noinput"`
	EnvironmentName string `json:"environmentName" graphql:"noinput"`

	common.ResourceMetadata `json:",inline"`
	SyncStatus              t.SyncStatus `json:"syncStatus" graphql:"noinput"`
}

func (*App) GetDisplayName

func (a *App) GetDisplayName() string

func (*App) GetGeneration

func (a *App) GetGeneration() int64

func (*App) GetResourceType

func (a *App) GetResourceType() ResourceType

func (*App) GetStatus

func (a *App) GetStatus() operator.Status

type ClusterManagedService

type ClusterManagedService struct {
	repos.BaseEntity             `json:",inline" graphql:"noinput"`
	crdsv1.ClusterManagedService `json:",inline"`

	AccountName string `json:"accountName" graphql:"noinput"`
	ClusterName string `json:"clusterName"`

	IsArchived *bool `json:"isArchived,omitempty" graphql:"noinput"`

	SyncedOutputSecretRef *corev1.Secret `json:"syncedOutputSecretRef" graphql:"ignore"`

	common.ResourceMetadata `json:",inline"`
	SyncStatus              t.SyncStatus `json:"syncStatus" graphql:"noinput"`
}

func (*ClusterManagedService) GetDisplayName

func (c *ClusterManagedService) GetDisplayName() string

func (*ClusterManagedService) GetStatus

func (c *ClusterManagedService) GetStatus() operator.Status

type Config

type Config struct {
	repos.BaseEntity `json:",inline" graphql:"noinput"`
	corev1.ConfigMap `json:",inline"`

	AccountName     string `json:"accountName" graphql:"noinput"`
	EnvironmentName string `json:"environmentName" graphql:"noinput"`

	common.ResourceMetadata `json:",inline"`
	SyncStatus              t.SyncStatus `json:"syncStatus" graphql:"noinput"`
}

func (*Config) GetDisplayName

func (c *Config) GetDisplayName() string

func (*Config) GetResourceType

func (c *Config) GetResourceType() ResourceType

func (*Config) GetStatus

func (c *Config) GetStatus() operator.Status

type Environment

type Environment struct {
	repos.BaseEntity `json:",inline" graphql:"noinput"`

	crdsv1.Environment `json:",inline"`

	AccountName string `json:"accountName" graphql:"noinput"`
	ClusterName string `json:"clusterName"`

	IsArchived *bool `json:"isArchived,omitempty" graphql:"noinput"`

	common.ResourceMetadata `json:",inline"`

	SyncStatus t.SyncStatus `json:"syncStatus" graphql:"noinput"`
}

func (*Environment) GetDisplayName

func (e *Environment) GetDisplayName() string

func (*Environment) GetResourceType

func (e *Environment) GetResourceType() ResourceType

func (*Environment) GetStatus

func (e *Environment) GetStatus() operator.Status

type ExternalApp

type ExternalApp struct {
	repos.BaseEntity `json:",inline" graphql:"noinput"`

	crdsv1.ExternalApp `json:",inline"`

	AccountName     string `json:"accountName" graphql:"noinput"`
	EnvironmentName string `json:"environmentName" graphql:"noinput"`

	common.ResourceMetadata `json:",inline"`
	SyncStatus              t.SyncStatus `json:"syncStatus" graphql:"noinput"`
}

func (*ExternalApp) GetDisplayName

func (e *ExternalApp) GetDisplayName() string

func (*ExternalApp) GetResourceType

func (e *ExternalApp) GetResourceType() ResourceType

func (*ExternalApp) GetStatus

func (e *ExternalApp) GetStatus() operator.Status

type ImagePullSecret

type ImagePullSecret struct {
	repos.BaseEntity  `json:",inline" graphql:"noinput"`
	metav1.ObjectMeta `json:"metadata"`

	common.ResourceMetadata `json:",inline"`

	Format           PullSecretFormat `json:"format"`
	DockerConfigJson *string          `json:"dockerConfigJson,omitempty"`

	RegistryUsername *string `json:"registryUsername,omitempty"`
	RegistryPassword *string `json:"registryPassword,omitempty"`
	RegistryURL      *string `json:"registryURL,omitempty"`

	GeneratedK8sSecret corev1.Secret `json:"generatedK8sSecret,omitempty" graphql:"ignore" struct-json-path:",ignore-nesting"`

	AccountName string `json:"accountName" graphql:"noinput"`

	Environments []string `json:"environments,omitempty"`

	SyncStatus t.SyncStatus `json:"syncStatus" graphql:"noinput"`
}

func (*ImagePullSecret) GetDisplayName

func (ips *ImagePullSecret) GetDisplayName() string

func (*ImagePullSecret) GetResourceType

func (ips *ImagePullSecret) GetResourceType() ResourceType

func (*ImagePullSecret) GetStatus

func (ips *ImagePullSecret) GetStatus() operator.Status

func (*ImagePullSecret) Validate

func (ips *ImagePullSecret) Validate() error

type ImportedManagedResource

type ImportedManagedResource struct {
	repos.BaseEntity `json:",inline" graphql:"noinput"`

	Name string `json:"name"`

	ManagedResourceRef `json:"managedResourceRef"`

	common.ResourceMetadata `json:",inline"`

	SecretRef ct.SecretRef `json:"secretRef"`

	AccountName     string `json:"accountName" graphql:"noinput"`
	EnvironmentName string `json:"environmentName"`

	SyncStatus t.SyncStatus `json:"syncStatus"`
}

func (*ImportedManagedResource) GetResourceType

func (m *ImportedManagedResource) GetResourceType() ResourceType

type KLoudliteEdgeCluster

type KLoudliteEdgeCluster struct {
	repos.BaseEntity `json:",inline"`
	Region           string `json:"region"`
	Name             string `json:"name"`

	NumAccounts    int `json:"num_accounts"`
	MaxNumAccounts int `json:"max_num_accounts"`

	Comments string `json:"comments"`
}

type ManagedResource

type ManagedResource struct {
	repos.BaseEntity       `json:",inline" graphql:"noinput"`
	crdsv1.ManagedResource `json:",inline"`

	AccountName        string `json:"accountName" graphql:"noinput"`
	EnvironmentName    string `json:"environmentName" graphql:"noinput"`
	ManagedServiceName string `json:"managedServiceName" graphql:"noinput"`
	ClusterName        string `json:"clusterName" graphql:"noinput"`

	SyncedOutputSecretRef *corev1.Secret `json:"syncedOutputSecretRef" graphql:"noinput"`

	common.ResourceMetadata `json:",inline"`
	SyncStatus              t.SyncStatus `json:"syncStatus" graphql:"noinput"`

	IsImported bool   `json:"isImported" graphql:"noinput"`
	MresRef    string `json:"mresRef" graphql:"noinput"`
}

func (*ManagedResource) GetDisplayName

func (m *ManagedResource) GetDisplayName() string

func (*ManagedResource) GetResourceType

func (m *ManagedResource) GetResourceType() ResourceType

func (*ManagedResource) GetStatus

func (m *ManagedResource) GetStatus() operator.Status

type ManagedResourceRef

type ManagedResourceRef struct {
	ID        repos.ID `json:"id"`
	Name      string   `json:"name"`
	Namespace string   `json:"namespace"`
}

type PullSecretFormat

type PullSecretFormat string
const (
	DockerConfigJsonFormat PullSecretFormat = "dockerConfigJson"
	ParamsFormat           PullSecretFormat = "params"
)

type RegistryImage

type RegistryImage struct {
	repos.BaseEntity `json:",inline" graphql:"noinput"`
	AccountName      string         `json:"accountName"`
	ImageName        string         `json:"imageName"`
	ImageTag         string         `json:"imageTag"`
	Meta             map[string]any `json:"meta"`
	MetaData         string         `json:"metadata" graphql:"ignore"`
}

type RegistryImageURL

type RegistryImageURL struct {
	URL        []string `json:"url"`
	URLExample []string `json:"urlExample"`

	KlWebhookAuthToken string `json:"klWebhookAuthToken"`

	ScriptURL        []string `json:"scriptUrl"`
	ScriptURLExample []string `json:"scriptUrlExample"`
}

type ResourceHeirarchy

type ResourceHeirarchy string
const (
	ResourceHeirarchyEnvironment ResourceHeirarchy = "environment"
)

type ResourceMapping

type ResourceMapping struct {
	repos.BaseEntity `bson:",inline"`

	ResourceHeirarchy ResourceHeirarchy `json:"resourceHeirarchy"`

	ResourceType      ResourceType `json:"resourceType"`
	ResourceName      string       `json:"resourceName"`
	ResourceNamespace string       `json:"resourceNamespace"`

	AccountName string `json:"accountName"`
	ClusterName string `json:"clusterName"`

	EnvironmentName string `json:"environmentName"`
}

ResourceMapping represents a relationship between a resource (i.e. Environment, App, Router etc.) with it's {account, cluster and environment}

type ResourceType

type ResourceType string
const (
	ResourceTypeEnvironment             ResourceType = "environment"
	ResourceTypeApp                     ResourceType = "app"
	ResourceTypeExternalApp             ResourceType = "external_app"
	ResourceTypeConfig                  ResourceType = "config"
	ResourceTypeSecret                  ResourceType = "secret"
	ResourceTypeImagePullSecret         ResourceType = "image_pull_secret"
	ResourceTypeRouter                  ResourceType = "router"
	ResourceTypeManagedResource         ResourceType = "managed_resource"
	ResourceTypeImportedManagedResource ResourceType = "imported_managed_resource"
	ResourceTypeClusterManagedService   ResourceType = "cluster_managed_service"
	ResourceTypeServiceBinding          ResourceType = "service_binding"
)

type Router

type Router struct {
	repos.BaseEntity `json:",inline" graphql:"noinput"`
	crdsv1.Router    `json:",inline"`

	AccountName     string `json:"accountName" graphql:"noinput"`
	EnvironmentName string `json:"environmentName" graphql:"noinput"`

	common.ResourceMetadata `json:",inline"`
	SyncStatus              t.SyncStatus `json:"syncStatus" graphql:"noinput"`
}

func (*Router) GetDisplayName

func (r *Router) GetDisplayName() string

func (*Router) GetResourceType

func (r *Router) GetResourceType() ResourceType

func (*Router) GetStatus

func (r *Router) GetStatus() operator.Status

type Secret

type Secret struct {
	repos.BaseEntity `json:",inline" graphql:"noinput"`
	corev1.Secret    `json:",inline"`

	AccountName     string `json:"accountName" graphql:"noinput"`
	EnvironmentName string `json:"environmentName" graphql:"noinput"`

	// For is the resource type and name of the resource that this secret is being created for in format <resource-type>/<namespace>/<name>
	// It is supposed to be nil for traditional secrets, and to be used by ImagePullSecrets / Imported Managed Resources
	For *SecretCreatedFor `json:"for,omitempty" graphql:"noinput"`

	common.ResourceMetadata `json:",inline"`
	SyncStatus              t.SyncStatus `json:"syncStatus" graphql:"noinput"`

	IsReadOnly bool `json:"isReadyOnly" graphql:"noinput"`
}

func (*Secret) GetDisplayName

func (s *Secret) GetDisplayName() string

func (*Secret) GetResourceType

func (s *Secret) GetResourceType() ResourceType

func (*Secret) GetStatus

func (s *Secret) GetStatus() operator.Status

type SecretCreatedFor

type SecretCreatedFor struct {
	RefId        repos.ID     `json:"refId"`
	ResourceType ResourceType `json:"resourceType"`
	Name         string       `json:"name"`
	Namespace    string       `json:"namespace"`
}

type ServiceBinding

type ServiceBinding struct {
	repos.BaseEntity            `json:",inline"`
	networkingv1.ServiceBinding `json:",inline"`

	AccountName string `json:"accountName"`
	ClusterName string `json:"clusterName"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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