Documentation
¶
Index ¶
- Constants
- func FormatLocallySupportedParameters() (result string)
- func GetLocallySupportedParameters() []string
- type ComponentSettings
- type EnvInfo
- type EnvInfoURL
- type EnvSpecificInfo
- func (esi *EnvSpecificInfo) DeleteConfiguration(parameter string) error
- func (esi *EnvSpecificInfo) DeleteEnvDirIfEmpty() error
- func (esi *EnvSpecificInfo) DeleteEnvInfoFile() error
- func (esi *EnvSpecificInfo) DeleteURL(parameter string) error
- func (esi *EnvSpecificInfo) EnvInfoFileExists() bool
- func (esi *EnvSpecificInfo) GetComponentSettings() ComponentSettings
- func (esi *EnvSpecificInfo) IsSet(parameter string) bool
- func (esi *EnvSpecificInfo) SetComponentSettings(cs ComponentSettings) error
- func (esi *EnvSpecificInfo) SetConfiguration(parameter string, value interface{}) (err error)
Constants ¶
const ( // Create parameter Create = "CREATE" // CreateDescription is the description of Create parameter CreateDescription = "Create parameter is the action to write devfile metadata to env.yaml" // URL URL = "URL" // URLDescription is the description of URL URLDescription = "URL to access the component" )
Variables ¶
This section is empty.
Functions ¶
func FormatLocallySupportedParameters ¶
func FormatLocallySupportedParameters() (result string)
FormatLocallySupportedParameters outputs supported parameters and their description
func GetLocallySupportedParameters ¶
func GetLocallySupportedParameters() []string
GetLocallySupportedParameters returns the name of the supported global parameters
Types ¶
type ComponentSettings ¶
type ComponentSettings struct {
Name string `yaml:"Name,omitempty"`
Namespace string `yaml:"Namespace,omitempty"`
URL *[]EnvInfoURL `yaml:"Url,omitempty"`
}
ComponentSettings holds all component related information
type EnvInfo ¶
type EnvInfo struct {
// contains filtered or unexported fields
}
EnvInfo holds all the env specific infomation relavent to a specific Component.
func NewEnvInfo ¶
func NewEnvInfo() EnvInfo
NewEnvInfo creates an empty EnvSpecificInfo struct with typeMeta populated
func (*EnvInfo) GetNamespace ¶ added in v1.1.2
GetNamespace returns component namespace
func (*EnvInfo) GetURL ¶
func (ei *EnvInfo) GetURL() []EnvInfoURL
GetURL returns the EnvInfoURL, returns default if nil
type EnvInfoURL ¶
type EnvInfoURL struct {
// Name of the URL
Name string `yaml:"Name,omitempty"`
// Port number for the url of the component, required in case of components which expose more than one service port
Port int `yaml:"Port,omitempty"`
// Indicates if the URL should be a secure https one
Secure bool `yaml:"Secure,omitempty"`
// Clutser host
Host string `yaml:"host,omitempty"`
// TLS secret name to create ingress to provide a secure URL
TLSSecret string `yaml:"TLSSecret,omitempty"`
// Exposed port number for docker container, required for local scenarios
ExposedPort int `yaml:"ExposedPort,omitempty"`
}
EnvInfoURL holds URL related information
type EnvSpecificInfo ¶
type EnvSpecificInfo struct {
Filename string `yaml:"FileName,omitempty"`
EnvInfo `yaml:",omitempty"`
// contains filtered or unexported fields
}
EnvSpecificInfo wraps the envinfo and provides helpers to serialize it.
func NewEnvSpecificInfo ¶
func NewEnvSpecificInfo(envDir string) (*EnvSpecificInfo, error)
NewEnvSpecificInfo gets the EnvSpecificInfo from envinfo file and creates the envinfo file in case it's not present then it
func (*EnvSpecificInfo) DeleteConfiguration ¶
func (esi *EnvSpecificInfo) DeleteConfiguration(parameter string) error
DeleteConfiguration is used to delete environment specific info from local odo envinfo
func (*EnvSpecificInfo) DeleteEnvDirIfEmpty ¶
func (esi *EnvSpecificInfo) DeleteEnvDirIfEmpty() error
DeleteEnvDirIfEmpty Deletes the env directory if its empty
func (*EnvSpecificInfo) DeleteEnvInfoFile ¶
func (esi *EnvSpecificInfo) DeleteEnvInfoFile() error
DeleteEnvInfoFile deletes the envinfo.yaml file if it exists
func (*EnvSpecificInfo) DeleteURL ¶
func (esi *EnvSpecificInfo) DeleteURL(parameter string) error
DeleteURL is used to delete environment specific info for url from envinfo
func (*EnvSpecificInfo) EnvInfoFileExists ¶
func (esi *EnvSpecificInfo) EnvInfoFileExists() bool
EnvInfoFileExists if the envinfo file exists or not
func (*EnvSpecificInfo) GetComponentSettings ¶
func (esi *EnvSpecificInfo) GetComponentSettings() ComponentSettings
GetComponentSettings returns the componentSettings from envinfo
func (*EnvSpecificInfo) IsSet ¶
func (esi *EnvSpecificInfo) IsSet(parameter string) bool
IsSet uses reflection to get the parameter from the envinfo struct, currently it only searches the componentSettings
func (*EnvSpecificInfo) SetComponentSettings ¶
func (esi *EnvSpecificInfo) SetComponentSettings(cs ComponentSettings) error
SetComponentSettings sets the componentSettings from to the envinfo and writes to the file
func (*EnvSpecificInfo) SetConfiguration ¶
func (esi *EnvSpecificInfo) SetConfiguration(parameter string, value interface{}) (err error)
SetConfiguration sets the environment specific info like cluster host etc.