Documentation
¶
Index ¶
- type Config
- type ConfigProvider
- func (p *ConfigProvider) CreatePlatformConfig(ctx context.Context, obj *unstructured.Unstructured) (*unstructured.Unstructured, error)
- func (p *ConfigProvider) GetConfig(ctx context.Context) (*Config, error)
- func (p *ConfigProvider) GetPlatformConfig(ctx context.Context) (*unstructured.Unstructured, error)
- func (p *ConfigProvider) InvalidateCache()
- func (p *ConfigProvider) UpdatePlatformConfig(ctx context.Context, obj *unstructured.Unstructured) (*unstructured.Unstructured, error)
- type FormFieldLock
- type MaintenanceConfig
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.
Click to show internal directories.
Click to hide internal directories.