platform

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Maintenance    MaintenanceConfig
	FormFieldLocks []FormFieldLock
}

Config holds the resolved platform configuration.

type ConfigProvider

type ConfigProvider struct {
	// contains filtered or unexported fields
}

ConfigProvider loads and caches the PlatformConfig from Kubernetes.

func NewConfigProvider

func NewConfigProvider(dynamicClient dynamic.Interface) *ConfigProvider

NewConfigProvider creates a new PlatformConfig provider.

func (*ConfigProvider) CreatePlatformConfig

func (p *ConfigProvider) CreatePlatformConfig(ctx context.Context, obj *unstructured.Unstructured) (*unstructured.Unstructured, error)

CreatePlatformConfig creates the PlatformConfig CR.

func (*ConfigProvider) GetConfig

func (p *ConfigProvider) GetConfig(ctx context.Context) (*Config, error)

GetConfig returns the current platform configuration, fetching from Kubernetes if needed.

func (*ConfigProvider) GetPlatformConfig

func (p *ConfigProvider) GetPlatformConfig(ctx context.Context) (*unstructured.Unstructured, error)

GetPlatformConfig returns the raw PlatformConfig CR.

func (*ConfigProvider) InvalidateCache

func (p *ConfigProvider) InvalidateCache()

InvalidateCache forces the config to be reloaded on next access.

func (*ConfigProvider) UpdatePlatformConfig

func (p *ConfigProvider) UpdatePlatformConfig(ctx context.Context, obj *unstructured.Unstructured) (*unstructured.Unstructured, error)

UpdatePlatformConfig updates the PlatformConfig CR.

type FormFieldLock

type FormFieldLock struct {
	Field   string `json:"field"`
	Value   string `json:"value,omitempty"`
	Message string `json:"message,omitempty"`
}

FormFieldLock defines a locked form field and its enforced value.

type MaintenanceConfig

type MaintenanceConfig struct {
	Enabled bool   `json:"enabled"`
	Message string `json:"message,omitempty"`
}

MaintenanceConfig holds maintenance mode settings.

Jump to

Keyboard shortcuts

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