Documentation
¶
Index ¶
- Constants
- type ApplicationInfo
- type Config
- type ConfigInfo
- func (c *ConfigInfo) AddApplication(application string, project string) error
- func (c *ConfigInfo) DeleteApplication(application string, project string) error
- func (c *ConfigInfo) DeleteProject(projectName string) error
- func (c *ConfigInfo) GetActiveApplication(project string) string
- func (c *ConfigInfo) GetActiveComponent(application string, project string) string
- func (c *ConfigInfo) GetNamePrefix() string
- func (c *ConfigInfo) GetTimeout() int
- func (c *ConfigInfo) GetUpdateNotification() bool
- func (c *ConfigInfo) SetActiveApplication(application string, project string) error
- func (c *ConfigInfo) SetActiveComponent(componentName string, applicationName string, projectName string) error
- func (c *ConfigInfo) SetConfiguration(parameter string, value string) error
- func (c *ConfigInfo) UnsetActiveApplication(project string) error
- func (c *ConfigInfo) UnsetActiveComponent(project string) error
- type OdoSettings
Constants ¶
const (
//DefaultTimeout for openshift server connection check
DefaultTimeout = 1
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplicationInfo ¶ added in v0.0.2
type ApplicationInfo struct { // name of the application Name string `json:"name"` // is this application active? Only one application can be active at the time Active bool `json:"active"` // name of the openshift project this application belongs to Project string `json:"project"` // last active component for this application ActiveComponent string `json:"activeComponent"` }
ApplicationInfo holds all important information about one application
type Config ¶
type Config struct { // odo specific configuration settings OdoSettings OdoSettings `json:"settings"` // Currently active application // multiple applications can be active but each one has to be in different project // there shouldn't be more active applications in one project ActiveApplications []ApplicationInfo `json:"activeApplications"` }
type ConfigInfo ¶
func New ¶
func New() (*ConfigInfo, error)
func (*ConfigInfo) AddApplication ¶ added in v0.0.3
func (c *ConfigInfo) AddApplication(application string, project string) error
AddApplication add new application to the config file Newly create application is NOT going to be se as Active.
func (*ConfigInfo) DeleteApplication ¶ added in v0.0.2
func (c *ConfigInfo) DeleteApplication(application string, project string) error
DeleteApplication deletes application from given project from config file
func (*ConfigInfo) DeleteProject ¶ added in v0.0.15
func (c *ConfigInfo) DeleteProject(projectName string) error
DeleteProject deletes applications belonging to the given project from the config file
func (*ConfigInfo) GetActiveApplication ¶ added in v0.0.2
func (c *ConfigInfo) GetActiveApplication(project string) string
GetActiveApplication get currently active application for given project if no application is active return empty string
func (*ConfigInfo) GetActiveComponent ¶
func (c *ConfigInfo) GetActiveComponent(application string, project string) string
GetActiveComponent if no component is set as current returns empty string
func (*ConfigInfo) GetNamePrefix ¶ added in v0.0.15
func (c *ConfigInfo) GetNamePrefix() string
GetNamePrefix returns the value of Prefix from config
func (*ConfigInfo) GetTimeout ¶ added in v0.0.15
func (c *ConfigInfo) GetTimeout() int
GetTimeout returns the value of Timeout from config
func (*ConfigInfo) GetUpdateNotification ¶ added in v0.0.11
func (c *ConfigInfo) GetUpdateNotification() bool
GetUpdateNotification returns the value of UpdateNotification from config
func (*ConfigInfo) SetActiveApplication ¶ added in v0.0.2
func (c *ConfigInfo) SetActiveApplication(application string, project string) error
SetActiveApplication set application as active for given project
func (*ConfigInfo) SetActiveComponent ¶
func (c *ConfigInfo) SetActiveComponent(componentName string, applicationName string, projectName string) error
SetActiveComponent sets active component for given project and application. application must exist
func (*ConfigInfo) SetConfiguration ¶ added in v0.0.11
func (c *ConfigInfo) SetConfiguration(parameter string, value string) error
SetConfiguration modifies Odo configurations in the config file as of now being used for nameprefix, timeout, updatenotification
func (*ConfigInfo) UnsetActiveApplication ¶ added in v0.0.14
func (c *ConfigInfo) UnsetActiveApplication(project string) error
Sets the active application as blank of the given project in the configuration file
func (*ConfigInfo) UnsetActiveComponent ¶ added in v0.0.4
func (c *ConfigInfo) UnsetActiveComponent(project string) error
Sets the active component as blank of the given project in the configuration file
type OdoSettings ¶ added in v0.0.11
type OdoSettings struct { // Controls if an update notification is shown or not UpdateNotification *bool `json:"updatenotification,omitempty"` // Holds the prefix part of generated random application name NamePrefix *string `json:"nameprefix,omitempty"` // Timeout for openshift server connection check Timeout *int `json:"timeout,omitempty"` }
OdoSettings holds all odo specific configurations