Help us shape the future of Go! Take the 2026 Go Developer Survey

config

package
v0.2.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const AwsAccessKey = "awsAccessKey"

AwsAccessKey is a configuration key.

View Source
const AwsRegion = "awsRegion"

AwsRegion is a configuration key.

View Source
const AwsSecretKey = "awsSecretKey"

AwsSecretKey is a configuration key.

View Source
const DockerAvailabilityZone = "dockerAvailabilityZone"

DockerAvailabilityZone is a configuration key.

View Source
const DockerIOPS = "dockerIops"

DockerIops is a configuration key.

View Source
const DockerSize = "dockerSize"

DockerSize is a configuration key.

View Source
const DockerVolumeType = "dockerVolumeType"

DockerVolumeType is a configuration key.

View Source
const Host = "host"

Host is a configuration key.

View Source
const LogLevel = "logLevel"

LogLevel is a configuration key.

View Source
const MinVolSize = "minVolSize"

MinVolSize is a configuration key.

View Source
const OSDrivers = "osDrivers"

OsDrivers is a configuration key.

View Source
const OpenstackAuthURL = "openstackAuthUrl"

OpenstackAuthUrl is a configuration key.

View Source
const OpenstackAvailabilityZoneName = "openstackAvailabilityZoneName"

OpenstackAvailabilityZoneName is a configuration key.

View Source
const OpenstackDomainID = "openstackDomainId"

OpenstackDomainId is a configuration key.

View Source
const OpenstackDomainName = "openstackDomainName"

OpenstackDomainName is a configuration key.

View Source
const OpenstackPassword = "openstackPassword"

OpenstackPassword is a configuration key.

View Source
const OpenstackRegionName = "openstackRegionName"

OpenstackRegionName is a configuration key.

View Source
const OpenstackTenantID = "openstackTenantId"

OpenstackTenantId is a configuration key.

View Source
const OpenstackTenantName = "openstackTenantName"

OpenstackTenantName is a configuration key.

View Source
const OpenstackUserID = "openstackUserId"

OpenstackUserId is a configuration key.

View Source
const OpenstackUserName = "openstackUserName"

OpenstackUserName is a configuration key.

View Source
const RackspaceAuthURL = "rackspaceAuthUrl"

RackspaceAuthUrl is a configuration key.

View Source
const RackspaceDomainID = "rackspaceDomainId"

RackspaceDomainId is a configuration key.

View Source
const RackspaceDomainName = "rackspaceDomainName"

RackspaceDomainName is a configuration key.

View Source
const RackspacePassword = "rackspacePassword"

RackspacePassword is a configuration key.

View Source
const RackspaceTenantID = "rackspaceTenantId"

RackspaceTenantId is a configuration key.

View Source
const RackspaceTenantName = "rackspaceTenantName"

RackspaceTenantName is a configuration key.

View Source
const RackspaceUserID = "rackspaceUserId"

RackspaceUserId is a configuration key.

View Source
const RackspaceUserName = "rackspaceUserName"

RackspaceUserName is a configuration key.

View Source
const RemoteManagement = "remoteManagement"

RemoteManagement is a configuration key.

View Source
const ScaleIOEndpoint = "scaleIoEndpoint"

ScaleIoEndpoint is a configuration key.

View Source
const ScaleIOInsecure = "scaleIoInsecure"

ScaleIoInsecure is a configuration key.

View Source
const ScaleIOPassword = "scaleIoPassword"

ScaleIoPassword is a configuration key.

View Source
const ScaleIOProtectionDomainID = "scaleIoProtectionDomainId"

ScaleIoProtectionDomainId is a configuration key.

View Source
const ScaleIOProtectionDomainName = "scaleIoProtectionDomainName"

ScaleIoProtectionDomainName is a configuration key.

View Source
const ScaleIOStoragePoolID = "scaleIoStoragePoolId"

ScaleIoStoragePoolId is a configuration key.

View Source
const ScaleIOStoragePoolName = "scaleIoStoragePoolName"

ScaleIoStoragePoolName is a configuration key.

View Source
const ScaleIOSystemID = "scaleIoSystemId"

ScaleIoSystemId is a configuration key.

View Source
const ScaleIOSystemName = "scaleIoSystemName"

ScaleIoSystemName is a configuration key.

View Source
const ScaleIOUseCerts = "scaleIoUseCerts"

ScaleIoUseCerts is a configuration key.

View Source
const ScaleIOUserName = "scaleIoUserName"

ScaleIoUserName is a configuration key.

View Source
const StorageDrivers = "storageDrivers"

StorageDrivers is a configuration key.

View Source
const VolumeDrivers = "volumeDrivers"

VolumeDrivers is a configuration key.

View Source
const XtremIODeviceMapper = "xtremIoDeviceMapper"

XtremIoDeviceMapper is a configuration key.

View Source
const XtremIOEndpoint = "xtremIoEndpoint"

XtremIoEndpoint is a configuration key.

View Source
const XtremIOInsecure = "xtremIoInsecure"

XtremIoInsecure is a configuration key.

View Source
const XtremIOMultipath = "xtremIoMultipath"

XtremIoMultipath is a configuration key.

View Source
const XtremIOPassword = "xtremIoPassword"

XtremIoPassword is a configuration key.

View Source
const XtremIORemoteManagement = "xtremIoRemoteManagement"

XtremIoRemoteManagement is a configuration key.

View Source
const XtremIOUserName = "xtremIoUserName"

XtremIoUserName is a configuration key.

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)

FromJSON initializes a new Config instance from a JSON string

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

NewConfig initialies a new instance of a Config object with the specified options.

func (*Config) Copy

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

Copy creates a copy of this Config instance

func (*Config) EnvVars

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

EnvVars returns an array of the initialized configuration keys as key=value strings where the key is configuration key's environment variable key and the value is the current value for that key.

func (*Config) JSONMarshalStrategy

func (c *Config) JSONMarshalStrategy() JSONMarshalStrategy

JSONMarshalStrategy gets the JSON marshalling strategy

func (*Config) MarshalJSON

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

MarshalJSON implements 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

ReadConfig reads a configuration stream into the current config instance

func (*Config) ReadConfigFile

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

ReadConfigFile reads a configuration files into the current config instance

func (*Config) SetJSONMarshalStrategy

func (c *Config) SetJSONMarshalStrategy(s JSONMarshalStrategy)

SetJSONMarshalStrategy sets the JSON marshalling strategy

func (*Config) ToJSON

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

ToJSON exports this Config instance to a JSON string

func (*Config) ToSecureJSON

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

ToSecureJSON exports this Config instance to a JSON string omitting any of the secure fields

type JSONMarshalStrategy

type JSONMarshalStrategy int

JSONMarshalStrategy is a JSON marshalling strategy

const (
	// JSONMarshalSecure indicates that the secure fields should be omitted
	JSONMarshalSecure JSONMarshalStrategy = iota

	// JSONMarshalPlainText indicates that all fields should be included
	JSONMarshalPlainText
)

Jump to

Keyboard shortcuts

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