config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2015 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const AwsAccessKey = "awsAccessKey"
View Source
const AwsRegion = "awsRegion"
View Source
const AwsSecretKey = "awsSecretKey"
View Source
const DockerAvailabilityZone = "dockerAvailabilityZone"
View Source
const DockerIops = "dockerIops"
View Source
const DockerSize = "dockerSize"
View Source
const DockerVolumeType = "dockerVolumeType"
View Source
const Host = "host"
View Source
const LogLevel = "logLevel"
View Source
const MinVolSize = "minVolSize"
View Source
const OsDrivers = "osDrivers"
View Source
const RackspaceAuthUrl = "rackspaceAuthUrl"
View Source
const RackspaceDomainId = "rackspaceDomainId"
View Source
const RackspaceDomainName = "rackspaceDomainName"
View Source
const RackspacePassword = "rackspacePassword"
View Source
const RackspaceTenantId = "rackspaceTenantId"
View Source
const RackspaceTenantName = "rackspaceTenantName"
View Source
const RackspaceUserId = "rackspaceUserId"
View Source
const RackspaceUserName = "rackspaceUserName"
View Source
const RemoteManagement = "remoteManagement"
View Source
const ScaleIoEndpoint = "scaleIoEndpoint"
View Source
const ScaleIoInsecure = "scaleIoInsecure"
View Source
const ScaleIoPassword = "scaleIoPassword"
View Source
const ScaleIoProtectionDomainId = "scaleIoProtectionDomainId"
View Source
const ScaleIoProtectionDomainName = "scaleIoProtectionDomainName"
View Source
const ScaleIoStoragePoolId = "scaleIoStoragePoolId"
View Source
const ScaleIoStoragePoolName = "scaleIoStoragePoolName"
View Source
const ScaleIoSystemId = "scaleIoSystemId"
View Source
const ScaleIoSystemName = "scaleIoSystemName"
View Source
const ScaleIoUseCerts = "scaleIoUseCerts"
View Source
const ScaleIoUserName = "scaleIoUserName"
View Source
const StorageDrivers = "storageDrivers"
View Source
const VolumeDrivers = "volumeDrivers"
View Source
const XtremIoDeviceMapper = "xtremIoDeviceMapper"
View Source
const XtremIoEndpoint = "xtremIoEndpoint"
View Source
const XtremIoInsecure = "xtremIoInsecure"
View Source
const XtremIoMultipath = "xtremIoMultipath"
View Source
const XtremIoPassword = "xtremIoPassword"
View Source
const XtremIoRemoteManagement = "xtremIoRemoteManagement"
View Source
const XtremIoUserName = "xtremIoUserName"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	GlobalFlags     *flag.FlagSet `json:"-"`
	AdditionalFlags *flag.FlagSet `json:"-"`
	Viper           *viper.Viper  `json:"-"`
	Host            string        `json:"-"`
	// contains filtered or unexported fields
}

Config contains the configuration information

func FromJson

func FromJson(from string) (*Config, error)

func New

func New() *Config

New initializes a new instance of a Config struct

func NewConfig

func NewConfig(
	loadGlobalConfig, loadUserConfig bool,
	configName, configType string) *Config

func (*Config) Copy

func (c *Config) Copy() (*Config, error)

func (*Config) EnvVars

func (c *Config) EnvVars() []string

func (*Config) JsonMarshalStrategy

func (c *Config) JsonMarshalStrategy() JsonMarshalStrategy

func (*Config) MarshalJSON

func (c *Config) MarshalJSON() ([]byte, error)

The implementation of the encoding/json.Marshaller interface. It allows this type to provide its own marshalling routine.

func (*Config) ReadConfig

func (c *Config) ReadConfig(in io.Reader) error

func (*Config) ReadConfigFile

func (c *Config) ReadConfigFile(filePath string) error

func (*Config) SetJsonMarshalStrategy

func (c *Config) SetJsonMarshalStrategy(s JsonMarshalStrategy)

func (*Config) Sync

func (c *Config) Sync()

func (*Config) ToJson

func (c *Config) ToJson() (string, error)

func (*Config) ToSecureJson

func (c *Config) ToSecureJson() (string, error)

type ConfigKey

type ConfigKey struct {
	Shorthand    string
	EnvVar       string
	DefaultValue interface{}
	Description  string
}

type ConfigKeyMap

type ConfigKeyMap map[string]*ConfigKey

type JsonMarshalStrategy

type JsonMarshalStrategy int
const (
	JsonMarshalSecure JsonMarshalStrategy = iota
	JsonMarshalPlainText
)

type SetVapFun

type SetVapFun func(name string, aof *interface{}) *flag.Flag

Jump to

Keyboard shortcuts

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