Documentation ¶
Index ¶
- 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) GetActiveApplication(project string) string
- func (c *ConfigInfo) GetActiveComponent(application string, project string) string
- func (c *ConfigInfo) SetActiveApplication(application string, project string) error
- func (c *ConfigInfo) SetActiveComponent(component string, application string, project string) error
Constants ¶
This section is empty.
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 { // 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) 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) 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(component string, application string, project string) error
SetActiveComponent sets active component for given project and application. application must exist
Click to show internal directories.
Click to hide internal directories.