Documentation ¶
Overview ¶
Copyright (c) 2018 Red Hat, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Variables
- func InitJSONConfig(configDir string, configName string) (config *viper.Viper, isNewConfig bool)
- func LoadDefaultSettings(viperConfig *viper.Viper, defaults *DefaultSettings)
- func UpdateCachedDefaults(viperConfig *viper.Viper, defaults *DefaultSettings) error
- func UpdateCachedInstances(viperConfig *viper.Viper, instanceList []ProvisionedInstance) error
- func UpdateCachedRegistries(viperConfig *viper.Viper, regList []Registry) error
- type DefaultSettings
- type ProvisionedInstance
- type Registry
Constants ¶
This section is empty.
Variables ¶
var Defaults *viper.Viper
Defaults stores command defaults
var ProvisionedInstances *viper.Viper
ProvisionedInstances stores APB instances
var Registries *viper.Viper
Registries stores APB registry and spec data
Functions ¶
func InitJSONConfig ¶
InitJSONConfig will load (or create if needed) a JSON config at ~/home/.apb/configName.json or configDir/configName.json
func LoadDefaultSettings ¶
func LoadDefaultSettings(viperConfig *viper.Viper, defaults *DefaultSettings)
LoadDefaultSettings loads default settings from disk into a config.LoadedDefaults for later use
func UpdateCachedDefaults ¶
func UpdateCachedDefaults(viperConfig *viper.Viper, defaults *DefaultSettings) error
UpdateCachedDefaults saves the contents of defaults to a configuration file
func UpdateCachedInstances ¶
func UpdateCachedInstances(viperConfig *viper.Viper, instanceList []ProvisionedInstance) error
UpdateCachedInstances saves the contents of instanceList to a configuration file
Types ¶
type DefaultSettings ¶
type DefaultSettings struct { BrokerNamespace string BrokerResourceURL string BrokerRouteName string ClusterServiceBrokerName string BrokerRouteSuffix string }
DefaultSettings stores default settings for APB tool operation
var LoadedDefaults DefaultSettings
func InitialDefaultSettings ¶
func InitialDefaultSettings() *DefaultSettings
InitialDefaultSettings provides a DefaultSettings struct with sane values for interaction with the Automation Broker
type ProvisionedInstance ¶
ProvisionedInstance stores a list of provisioned uuids associated with a bundle