const ( GlobalConfigEnvName = "GLOBALODOCONFIG" // DefaultTimeout for cluster server connection check (in seconds) DefaultTimeout = 1 * time.Second // DefaultPushTimeout is the default timeout for pods (in seconds) DefaultPushTimeout = 240 * time.Second // UpdateNotificationSetting is the name of the setting controlling update notification UpdateNotificationSetting = "UpdateNotification" // UpdateNotificationSettingDescription is human-readable description for the update notification setting UpdateNotificationSettingDescription = "Flag to control if an update notification is shown or not (Default: true)" // TimeoutSetting is the name of the setting controlling timeout for connection check TimeoutSetting = "Timeout" // PushTimeoutSetting is the name of the setting controlling PushTimeout PushTimeoutSetting = "PushTimeout" // RegistryCacheTimeSetting is human-readable description for the registrycachetime setting RegistryCacheTimeSetting = "RegistryCacheTime" // ImageRegistrySetting is the name of the setting controlling ImageRegistry ImageRegistrySetting = "ImageRegistry" // DefaultDevfileRegistryName is the name of default devfile registry DefaultDevfileRegistryName = "DefaultDevfileRegistry" // DefaultDevfileRegistryURL is the URL of default devfile registry DefaultDevfileRegistryURL = "https://registry.devfile.io" // OldDefaultDevfileRegistryURL is the URL of old default devfile registry for registry migration purpose OldDefaultDevfileRegistryURL = "https://github.com/odo-devfiles/registry" // DefaultRegistryCacheTime is time (in minutes) for how long odo will cache information from Devfile registry DefaultRegistryCacheTime = 15 * time.Minute // EphemeralSetting specifies if ephemeral volumes needs to be used as source volume. EphemeralSetting = "Ephemeral" // DefaultEphemeralSetting is a default value for Ephemeral preference DefaultEphemeralSetting = false // ConsentTelemetrySettings specifies if the user consents to telemetry ConsentTelemetrySetting = "ConsentTelemetry" // DefaultConsentTelemetry is a default value for ConsentTelemetry preference DefaultConsentTelemetrySetting = false )
const ImageRegistrySettingDescription = "Image Registry to which relative image names in Devfile Image Components will be pushed to (Example: quay.io/my-user/)"
ConsentTelemetrySettingDescription adds a description for TelemetryConsentSetting
var ConsentTelemetrySettingDescription = fmt.Sprintf("If true, odo will collect telemetry for the user's odo usage (Default: %t)\n\t\t For more information: https://developers.redhat.com/article/tool-data-collection", DefaultConsentTelemetrySetting)
EphemeralSettingDescription adds a description for EphemeralSourceVolume
var EphemeralSettingDescription = fmt.Sprintf("If true, odo will create an emptyDir volume to store source code (Default: %t)", DefaultEphemeralSetting)
PushTimeoutSettingDescription adds a description for PushTimeout
var PushTimeoutSettingDescription = fmt.Sprintf("PushTimeout (in Duration) for waiting for a Pod to come up (Default: %s)", DefaultPushTimeout)
RegistryCacheTimeSettingDescription adds a description for RegistryCacheTime
var RegistryCacheTimeSettingDescription = fmt.Sprintf("For how long (in Duration) odo will cache information from the Devfile registry (Default: %s)", DefaultRegistryCacheTime)
TimeoutSettingDescription is human-readable description for the timeout setting
var TimeoutSettingDescription = fmt.Sprintf("Timeout (in Duration) for cluster server connection check (Default: %s)", DefaultTimeout)
func FormatSupportedParameters() (result string)
FormatSupportedParameters outputs supported parameters and their description
func GetSupportedParameters() []string
GetSupportedParameters returns the name of the supported parameters
type Client interface { IsSet(parameter string) bool SetConfiguration(parameter string, value string) error DeleteConfiguration(parameter string) error GetUpdateNotification() bool GetTimeout() time.Duration GetPushTimeout() time.Duration GetEphemeralSourceVolume() bool GetConsentTelemetry() bool GetRegistryCacheTime() time.Duration GetImageRegistry() string RegistryHandler(operation string, registryName string, registryURL string, forceFlag bool, isSecure bool) error UpdateNotification() *bool Timeout() *time.Duration PushTimeout() *time.Duration RegistryCacheTime() *time.Duration EphemeralSourceVolume() *bool ConsentTelemetry() *bool RegistryList() []api.Registry RegistryNameExists(name string) bool NewPreferenceList() api.PreferenceList }
func NewClient(ctx context.Context) (Client, error)
type MinimumDurationValueError struct{}
func NewMinimumDurationValueError() MinimumDurationValueError
func (v MinimumDurationValueError) Error() string
MockClient is a mock of Client interface.
type MockClient struct {
// contains filtered or unexported fields
}
func NewMockClient(ctrl *gomock.Controller) *MockClient
NewMockClient creates a new mock instance.
func (m *MockClient) ConsentTelemetry() *bool
ConsentTelemetry mocks base method.
func (m *MockClient) DeleteConfiguration(parameter string) error
DeleteConfiguration mocks base method.
func (m *MockClient) EXPECT() *MockClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockClient) EphemeralSourceVolume() *bool
EphemeralSourceVolume mocks base method.
func (m *MockClient) GetConsentTelemetry() bool
GetConsentTelemetry mocks base method.
func (m *MockClient) GetEphemeralSourceVolume() bool
GetEphemeralSourceVolume mocks base method.
func (m *MockClient) GetImageRegistry() string
GetImageRegistry mocks base method.
func (m *MockClient) GetPushTimeout() time.Duration
GetPushTimeout mocks base method.
func (m *MockClient) GetRegistryCacheTime() time.Duration
GetRegistryCacheTime mocks base method.
func (m *MockClient) GetTimeout() time.Duration
GetTimeout mocks base method.
func (m *MockClient) GetUpdateNotification() bool
GetUpdateNotification mocks base method.
func (m *MockClient) IsSet(parameter string) bool
IsSet mocks base method.
func (m *MockClient) NewPreferenceList() api.PreferenceList
NewPreferenceList mocks base method.
func (m *MockClient) PushTimeout() *time.Duration
PushTimeout mocks base method.
func (m *MockClient) RegistryCacheTime() *time.Duration
RegistryCacheTime mocks base method.
func (m *MockClient) RegistryHandler(operation, registryName, registryURL string, forceFlag, isSecure bool) error
RegistryHandler mocks base method.
func (m *MockClient) RegistryList() []api.Registry
RegistryList mocks base method.
func (m *MockClient) RegistryNameExists(name string) bool
RegistryNameExists mocks base method.
func (m *MockClient) SetConfiguration(parameter, value string) error
SetConfiguration mocks base method.
func (m *MockClient) Timeout() *time.Duration
Timeout mocks base method.
func (m *MockClient) UpdateNotification() *bool
UpdateNotification mocks base method.
MockClientMockRecorder is the mock recorder for MockClient.
type MockClientMockRecorder struct {
// contains filtered or unexported fields
}
func (mr *MockClientMockRecorder) ConsentTelemetry() *gomock.Call
ConsentTelemetry indicates an expected call of ConsentTelemetry.
func (mr *MockClientMockRecorder) DeleteConfiguration(parameter interface{}) *gomock.Call
DeleteConfiguration indicates an expected call of DeleteConfiguration.
func (mr *MockClientMockRecorder) EphemeralSourceVolume() *gomock.Call
EphemeralSourceVolume indicates an expected call of EphemeralSourceVolume.
func (mr *MockClientMockRecorder) GetConsentTelemetry() *gomock.Call
GetConsentTelemetry indicates an expected call of GetConsentTelemetry.
func (mr *MockClientMockRecorder) GetEphemeralSourceVolume() *gomock.Call
GetEphemeralSourceVolume indicates an expected call of GetEphemeralSourceVolume.
func (mr *MockClientMockRecorder) GetImageRegistry() *gomock.Call
GetImageRegistry indicates an expected call of GetImageRegistry.
func (mr *MockClientMockRecorder) GetPushTimeout() *gomock.Call
GetPushTimeout indicates an expected call of GetPushTimeout.
func (mr *MockClientMockRecorder) GetRegistryCacheTime() *gomock.Call
GetRegistryCacheTime indicates an expected call of GetRegistryCacheTime.
func (mr *MockClientMockRecorder) GetTimeout() *gomock.Call
GetTimeout indicates an expected call of GetTimeout.
func (mr *MockClientMockRecorder) GetUpdateNotification() *gomock.Call
GetUpdateNotification indicates an expected call of GetUpdateNotification.
func (mr *MockClientMockRecorder) IsSet(parameter interface{}) *gomock.Call
IsSet indicates an expected call of IsSet.
func (mr *MockClientMockRecorder) NewPreferenceList() *gomock.Call
NewPreferenceList indicates an expected call of NewPreferenceList.
func (mr *MockClientMockRecorder) PushTimeout() *gomock.Call
PushTimeout indicates an expected call of PushTimeout.
func (mr *MockClientMockRecorder) RegistryCacheTime() *gomock.Call
RegistryCacheTime indicates an expected call of RegistryCacheTime.
func (mr *MockClientMockRecorder) RegistryHandler(operation, registryName, registryURL, forceFlag, isSecure interface{}) *gomock.Call
RegistryHandler indicates an expected call of RegistryHandler.
func (mr *MockClientMockRecorder) RegistryList() *gomock.Call
RegistryList indicates an expected call of RegistryList.
func (mr *MockClientMockRecorder) RegistryNameExists(name interface{}) *gomock.Call
RegistryNameExists indicates an expected call of RegistryNameExists.
func (mr *MockClientMockRecorder) SetConfiguration(parameter, value interface{}) *gomock.Call
SetConfiguration indicates an expected call of SetConfiguration.
func (mr *MockClientMockRecorder) Timeout() *gomock.Call
Timeout indicates an expected call of Timeout.
func (mr *MockClientMockRecorder) UpdateNotification() *gomock.Call
UpdateNotification indicates an expected call of UpdateNotification.
Preference stores all the preferences related to odo
type Preference struct { metav1.TypeMeta `yaml:",inline"` // Odo settings holds the odo specific global settings OdoSettings odoSettings `yaml:"OdoSettings,omitempty"` }
Registry includes the registry metadata
type Registry struct { Name string `yaml:"Name,omitempty" json:"name"` URL string `yaml:"URL,omitempty" json:"url"` Secure bool `json:"secure"` }