config

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	NatsServers               []cfConfig.MessageBusServer
	RoutingApiUrl             string
	CloudFoundryAppDomainName string
	UaaApiUrl                 string
	RoutingApiUsername        string
	RoutingApiClientSecret    string
	SkipTlsVerification       bool
	KubeConfigPath            string
}

Config is the final application configuration for route-sync

func (*Config) UAAConfig

func (cfg *Config) UAAConfig() *uaaconfig.Config

type ConfigSchema

type ConfigSchema struct {
	NatsServers               []MessageBusServerSchema `yaml:"nats_servers"`
	RoutingApiUrl             string                   `yaml:"routing_api_url"`
	CloudFoundryAppDomainName string                   `yaml:"app_domain_name"`
	UaaApiUrl                 string                   `yaml:"uaa_api_url"`
	RoutingApiUsername        string                   `yaml:"routing_api_username"`
	RoutingApiClientSecret    string                   `yaml:"routing_api_client_secret"`
	SkipTlsVerification       bool                     `yaml:"skip_tls_verification"`
	KubeConfigPath            string                   `yaml:"kube_config_path"`
}

ConfigSchema defines the file schema for the YAML configuration of route-sync

func NewConfigSchemaFromFile

func NewConfigSchemaFromFile(path string) (*ConfigSchema, error)

NewConfigSchemaFromFile Loads a YAML file that contains the route-sync config

func (*ConfigSchema) ToConfig

func (cs *ConfigSchema) ToConfig() (*Config, error)

ToConfig Validates and builds a Config object if the ConfigSchema is valid

type MessageBusServerSchema

type MessageBusServerSchema struct {
	Host     string `yaml:"host"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
}

MessageBusServerSchema defines the schema for NATS Servers in the route-sync config

func (*MessageBusServerSchema) ToConfig

Jump to

Keyboard shortcuts

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