config

package
v0.0.0-...-77a4cd4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

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

Constants

This section is empty.

Variables

View Source
var Defaults *viper.Viper

Defaults stores command defaults

View Source
var ProvisionedInstances *viper.Viper

ProvisionedInstances stores APB instances

View Source
var Registries *viper.Viper

Registries stores APB registry and spec data

Functions

func InitJSONConfig

func InitJSONConfig(configDir string, configName string) (config *viper.Viper, isNewConfig bool)

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

func UpdateCachedRegistries

func UpdateCachedRegistries(viperConfig *viper.Viper, regList []Registry) error

UpdateCachedRegistries saves the contents of regList 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

type ProvisionedInstance struct {
	BundleName  string
	InstanceIDs map[string][]string
}

ProvisionedInstance stores a list of provisioned uuids associated with a bundle

type Registry

type Registry struct {
	Config registries.Config
	Specs  []*bundle.Spec
}

Registry stores a single registry config and references all associated bundle specs

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL