...

Package preference

Overview ▾

Package preference is a generated GoMock package.

Index ▾

Constants
Variables
func FormatSupportedParameters() (result string)
func GetSupportedParameters() []string
type Client
    func NewClient(ctx context.Context) (Client, error)
type MinimumDurationValueError
    func NewMinimumDurationValueError() MinimumDurationValueError
    func (v MinimumDurationValueError) Error() string
type MockClient
    func NewMockClient(ctrl *gomock.Controller) *MockClient
    func (m *MockClient) ConsentTelemetry() *bool
    func (m *MockClient) DeleteConfiguration(parameter string) error
    func (m *MockClient) EXPECT() *MockClientMockRecorder
    func (m *MockClient) EphemeralSourceVolume() *bool
    func (m *MockClient) GetConsentTelemetry() bool
    func (m *MockClient) GetEphemeralSourceVolume() bool
    func (m *MockClient) GetImageRegistry() string
    func (m *MockClient) GetPushTimeout() time.Duration
    func (m *MockClient) GetRegistryCacheTime() time.Duration
    func (m *MockClient) GetTimeout() time.Duration
    func (m *MockClient) GetUpdateNotification() bool
    func (m *MockClient) IsSet(parameter string) bool
    func (m *MockClient) NewPreferenceList() api.PreferenceList
    func (m *MockClient) PushTimeout() *time.Duration
    func (m *MockClient) RegistryCacheTime() *time.Duration
    func (m *MockClient) RegistryHandler(operation, registryName, registryURL string, forceFlag, isSecure bool) error
    func (m *MockClient) RegistryList() []api.Registry
    func (m *MockClient) RegistryNameExists(name string) bool
    func (m *MockClient) SetConfiguration(parameter, value string) error
    func (m *MockClient) Timeout() *time.Duration
    func (m *MockClient) UpdateNotification() *bool
type MockClientMockRecorder
    func (mr *MockClientMockRecorder) ConsentTelemetry() *gomock.Call
    func (mr *MockClientMockRecorder) DeleteConfiguration(parameter interface{}) *gomock.Call
    func (mr *MockClientMockRecorder) EphemeralSourceVolume() *gomock.Call
    func (mr *MockClientMockRecorder) GetConsentTelemetry() *gomock.Call
    func (mr *MockClientMockRecorder) GetEphemeralSourceVolume() *gomock.Call
    func (mr *MockClientMockRecorder) GetImageRegistry() *gomock.Call
    func (mr *MockClientMockRecorder) GetPushTimeout() *gomock.Call
    func (mr *MockClientMockRecorder) GetRegistryCacheTime() *gomock.Call
    func (mr *MockClientMockRecorder) GetTimeout() *gomock.Call
    func (mr *MockClientMockRecorder) GetUpdateNotification() *gomock.Call
    func (mr *MockClientMockRecorder) IsSet(parameter interface{}) *gomock.Call
    func (mr *MockClientMockRecorder) NewPreferenceList() *gomock.Call
    func (mr *MockClientMockRecorder) PushTimeout() *gomock.Call
    func (mr *MockClientMockRecorder) RegistryCacheTime() *gomock.Call
    func (mr *MockClientMockRecorder) RegistryHandler(operation, registryName, registryURL, forceFlag, isSecure interface{}) *gomock.Call
    func (mr *MockClientMockRecorder) RegistryList() *gomock.Call
    func (mr *MockClientMockRecorder) RegistryNameExists(name interface{}) *gomock.Call
    func (mr *MockClientMockRecorder) SetConfiguration(parameter, value interface{}) *gomock.Call
    func (mr *MockClientMockRecorder) Timeout() *gomock.Call
    func (mr *MockClientMockRecorder) UpdateNotification() *gomock.Call
type Preference
type Registry

Package files

errors.go implem.go machine_output.go mock.go preference.go variables.go

Constants

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/)"

Variables

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

func FormatSupportedParameters() (result string)

FormatSupportedParameters outputs supported parameters and their description

func GetSupportedParameters

func GetSupportedParameters() []string

GetSupportedParameters returns the name of the supported parameters

type Client

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

func NewClient(ctx context.Context) (Client, error)

type MinimumDurationValueError

type MinimumDurationValueError struct{}

func NewMinimumDurationValueError

func NewMinimumDurationValueError() MinimumDurationValueError

func (MinimumDurationValueError) Error

func (v MinimumDurationValueError) Error() string

type MockClient

MockClient is a mock of Client interface.

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

func NewMockClient

func NewMockClient(ctrl *gomock.Controller) *MockClient

NewMockClient creates a new mock instance.

func (*MockClient) ConsentTelemetry

func (m *MockClient) ConsentTelemetry() *bool

ConsentTelemetry mocks base method.

func (*MockClient) DeleteConfiguration

func (m *MockClient) DeleteConfiguration(parameter string) error

DeleteConfiguration mocks base method.

func (*MockClient) EXPECT

func (m *MockClient) EXPECT() *MockClientMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockClient) EphemeralSourceVolume

func (m *MockClient) EphemeralSourceVolume() *bool

EphemeralSourceVolume mocks base method.

func (*MockClient) GetConsentTelemetry

func (m *MockClient) GetConsentTelemetry() bool

GetConsentTelemetry mocks base method.

func (*MockClient) GetEphemeralSourceVolume

func (m *MockClient) GetEphemeralSourceVolume() bool

GetEphemeralSourceVolume mocks base method.

func (*MockClient) GetImageRegistry

func (m *MockClient) GetImageRegistry() string

GetImageRegistry mocks base method.

func (*MockClient) GetPushTimeout

func (m *MockClient) GetPushTimeout() time.Duration

GetPushTimeout mocks base method.

func (*MockClient) GetRegistryCacheTime

func (m *MockClient) GetRegistryCacheTime() time.Duration

GetRegistryCacheTime mocks base method.

func (*MockClient) GetTimeout

func (m *MockClient) GetTimeout() time.Duration

GetTimeout mocks base method.

func (*MockClient) GetUpdateNotification

func (m *MockClient) GetUpdateNotification() bool

GetUpdateNotification mocks base method.

func (*MockClient) IsSet

func (m *MockClient) IsSet(parameter string) bool

IsSet mocks base method.

func (*MockClient) NewPreferenceList

func (m *MockClient) NewPreferenceList() api.PreferenceList

NewPreferenceList mocks base method.

func (*MockClient) PushTimeout

func (m *MockClient) PushTimeout() *time.Duration

PushTimeout mocks base method.

func (*MockClient) RegistryCacheTime

func (m *MockClient) RegistryCacheTime() *time.Duration

RegistryCacheTime mocks base method.

func (*MockClient) RegistryHandler

func (m *MockClient) RegistryHandler(operation, registryName, registryURL string, forceFlag, isSecure bool) error

RegistryHandler mocks base method.

func (*MockClient) RegistryList

func (m *MockClient) RegistryList() []api.Registry

RegistryList mocks base method.

func (*MockClient) RegistryNameExists

func (m *MockClient) RegistryNameExists(name string) bool

RegistryNameExists mocks base method.

func (*MockClient) SetConfiguration

func (m *MockClient) SetConfiguration(parameter, value string) error

SetConfiguration mocks base method.

func (*MockClient) Timeout

func (m *MockClient) Timeout() *time.Duration

Timeout mocks base method.

func (*MockClient) UpdateNotification

func (m *MockClient) UpdateNotification() *bool

UpdateNotification mocks base method.

type MockClientMockRecorder

MockClientMockRecorder is the mock recorder for MockClient.

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

func (*MockClientMockRecorder) ConsentTelemetry

func (mr *MockClientMockRecorder) ConsentTelemetry() *gomock.Call

ConsentTelemetry indicates an expected call of ConsentTelemetry.

func (*MockClientMockRecorder) DeleteConfiguration

func (mr *MockClientMockRecorder) DeleteConfiguration(parameter interface{}) *gomock.Call

DeleteConfiguration indicates an expected call of DeleteConfiguration.

func (*MockClientMockRecorder) EphemeralSourceVolume

func (mr *MockClientMockRecorder) EphemeralSourceVolume() *gomock.Call

EphemeralSourceVolume indicates an expected call of EphemeralSourceVolume.

func (*MockClientMockRecorder) GetConsentTelemetry

func (mr *MockClientMockRecorder) GetConsentTelemetry() *gomock.Call

GetConsentTelemetry indicates an expected call of GetConsentTelemetry.

func (*MockClientMockRecorder) GetEphemeralSourceVolume

func (mr *MockClientMockRecorder) GetEphemeralSourceVolume() *gomock.Call

GetEphemeralSourceVolume indicates an expected call of GetEphemeralSourceVolume.

func (*MockClientMockRecorder) GetImageRegistry

func (mr *MockClientMockRecorder) GetImageRegistry() *gomock.Call

GetImageRegistry indicates an expected call of GetImageRegistry.

func (*MockClientMockRecorder) GetPushTimeout

func (mr *MockClientMockRecorder) GetPushTimeout() *gomock.Call

GetPushTimeout indicates an expected call of GetPushTimeout.

func (*MockClientMockRecorder) GetRegistryCacheTime

func (mr *MockClientMockRecorder) GetRegistryCacheTime() *gomock.Call

GetRegistryCacheTime indicates an expected call of GetRegistryCacheTime.

func (*MockClientMockRecorder) GetTimeout

func (mr *MockClientMockRecorder) GetTimeout() *gomock.Call

GetTimeout indicates an expected call of GetTimeout.

func (*MockClientMockRecorder) GetUpdateNotification

func (mr *MockClientMockRecorder) GetUpdateNotification() *gomock.Call

GetUpdateNotification indicates an expected call of GetUpdateNotification.

func (*MockClientMockRecorder) IsSet

func (mr *MockClientMockRecorder) IsSet(parameter interface{}) *gomock.Call

IsSet indicates an expected call of IsSet.

func (*MockClientMockRecorder) NewPreferenceList

func (mr *MockClientMockRecorder) NewPreferenceList() *gomock.Call

NewPreferenceList indicates an expected call of NewPreferenceList.

func (*MockClientMockRecorder) PushTimeout

func (mr *MockClientMockRecorder) PushTimeout() *gomock.Call

PushTimeout indicates an expected call of PushTimeout.

func (*MockClientMockRecorder) RegistryCacheTime

func (mr *MockClientMockRecorder) RegistryCacheTime() *gomock.Call

RegistryCacheTime indicates an expected call of RegistryCacheTime.

func (*MockClientMockRecorder) RegistryHandler

func (mr *MockClientMockRecorder) RegistryHandler(operation, registryName, registryURL, forceFlag, isSecure interface{}) *gomock.Call

RegistryHandler indicates an expected call of RegistryHandler.

func (*MockClientMockRecorder) RegistryList

func (mr *MockClientMockRecorder) RegistryList() *gomock.Call

RegistryList indicates an expected call of RegistryList.

func (*MockClientMockRecorder) RegistryNameExists

func (mr *MockClientMockRecorder) RegistryNameExists(name interface{}) *gomock.Call

RegistryNameExists indicates an expected call of RegistryNameExists.

func (*MockClientMockRecorder) SetConfiguration

func (mr *MockClientMockRecorder) SetConfiguration(parameter, value interface{}) *gomock.Call

SetConfiguration indicates an expected call of SetConfiguration.

func (*MockClientMockRecorder) Timeout

func (mr *MockClientMockRecorder) Timeout() *gomock.Call

Timeout indicates an expected call of Timeout.

func (*MockClientMockRecorder) UpdateNotification

func (mr *MockClientMockRecorder) UpdateNotification() *gomock.Call

UpdateNotification indicates an expected call of UpdateNotification.

type Preference

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"`
}

type Registry

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"`
}