valueobject

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KubeConfig

type KubeConfig struct {
	// KubeConfigContent stores the kubeconfig file of a K8s cluster
	KubeConfigContent string `json:"kubeconfig_content"`
	// IsInCluster indicates this config can be used for in cluster actions, meaning the KubeConfig content can be empty
	IsInCluster bool `json:"is_in_cluster"`
	// NamespacesList stores namespaces the user in KubeConfigContent can access
	NamespacesList []string `json:"namespaces_list"`
}

KubeConfig contains necessary information needed to work with a kubernetes cluster

func (*KubeConfig) APIHost

func (c *KubeConfig) APIHost() (string, error)

APIHost returns the address for the API server connection

func (*KubeConfig) SHA2565

func (c *KubeConfig) SHA2565() string

SHA2565 hashes the kubeconfig content and returns the hash string

func (*KubeConfig) Scan

func (c *KubeConfig) Scan(v interface{}) error

func (*KubeConfig) Validate

func (c *KubeConfig) Validate() error

Validate checks if the config can be used to connect to a K8s cluster and if the user has enough privilege

func (KubeConfig) Value

func (c KubeConfig) Value() (driver.Value, error)

type KubeRegistryConfig

type KubeRegistryConfig struct {
	UseRegistry          bool                     `json:"use_registry" form:"use_registry" yaml:"useRegistry"`
	Registry             string                   `json:"registry" form:"registry" yaml:"registry"`
	UseRegistrySecret    bool                     `json:"use_registry_secret" form:"use_registry_secret" yaml:"useRegistrySecret"`
	RegistrySecretConfig KubeRegistrySecretConfig `json:"registry_secret_config" yaml:"registrySecretConfig"`
}

KubeRegistryConfig contains registry configurations that can be used in K8s clusters

func (*KubeRegistryConfig) Scan

func (c *KubeRegistryConfig) Scan(v interface{}) error

func (KubeRegistryConfig) Value

func (c KubeRegistryConfig) Value() (driver.Value, error)

type KubeRegistrySecretConfig

type KubeRegistrySecretConfig struct {
	ServerURL string `json:"server_url" yaml:"serverURL"`
	Username  string `json:"username" yaml:"username"`
	Password  string `json:"password" yaml:"password"`
}

KubeRegistrySecretConfig is the secret configuration that can be used to generate K8s imagePullSecret

func (KubeRegistrySecretConfig) BuildKubeSecret

func (c KubeRegistrySecretConfig) BuildKubeSecret(name, namespace string) (*corev1.Secret, error)

BuildKubeSecret create a K8s secret containing the `.dockerconfigjson` for authenticating with remote registry

func (KubeRegistrySecretConfig) BuildSecretB64String

func (c KubeRegistrySecretConfig) BuildSecretB64String() (string, error)

BuildSecretB64String generates the authentication string

type Labels

type Labels map[string]string

Labels is essentially a key-value string map

func (*Labels) Scan

func (c *Labels) Scan(v interface{}) error

func (Labels) Value

func (c Labels) Value() (driver.Value, error)

type ShardDescriptorConfig

type ShardDescriptorConfig struct {
	SampleShape     []string          `json:"sample_shape"`
	TargetShape     []string          `json:"target_shape"`
	EnvoyConfigYaml string            `json:"envoy_config_yaml"`
	PythonFiles     map[string]string `json:"python_files"`
}

ShardDescriptorConfig contains configurations for OpenFL shards

func (*ShardDescriptorConfig) Scan

func (c *ShardDescriptorConfig) Scan(v interface{}) error

func (ShardDescriptorConfig) Value

func (c ShardDescriptorConfig) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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