config

package
v0.15.4 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(ctx *pulumi.Context, key string) string

Get loads an optional configuration value by its key, or returns "" if it doesn't exist.

func GetBool

func GetBool(ctx *pulumi.Context, key string) bool

GetBool loads an optional configuration value by its key, as a bool, or returns false if it doesn't exist.

func GetFloat32

func GetFloat32(ctx *pulumi.Context, key string) float32

GetFloat32 loads an optional configuration value by its key, as a float32, or returns 0.0 if it doesn't exist.

func GetFloat64

func GetFloat64(ctx *pulumi.Context, key string) float64

GetFloat64 loads an optional configuration value by its key, as a float64, or returns 0.0 if it doesn't exist.

func GetInt

func GetInt(ctx *pulumi.Context, key string) int

GetInt loads an optional configuration value by its key, as a int, or returns 0 if it doesn't exist.

func GetInt16

func GetInt16(ctx *pulumi.Context, key string) int16

GetInt16 loads an optional configuration value by its key, as a int16, or returns 0 if it doesn't exist.

func GetInt32

func GetInt32(ctx *pulumi.Context, key string) int32

GetInt32 loads an optional configuration value by its key, as a int32, or returns 0 if it doesn't exist.

func GetInt64

func GetInt64(ctx *pulumi.Context, key string) int64

GetInt64 loads an optional configuration value by its key, as a int64, or returns 0 if it doesn't exist.

func GetInt8

func GetInt8(ctx *pulumi.Context, key string) int8

GetInt8 loads an optional configuration value by its key, as a int8, or returns 0 if it doesn't exist.

func GetUint

func GetUint(ctx *pulumi.Context, key string) uint

GetUint loads an optional configuration value by its key, as a uint, or returns 0 if it doesn't exist.

func GetUint16

func GetUint16(ctx *pulumi.Context, key string) uint16

GetUint16 loads an optional configuration value by its key, as a uint16, or returns 0 if it doesn't exist.

func GetUint32

func GetUint32(ctx *pulumi.Context, key string) uint32

GetUint32 loads an optional configuration value by its key, as a uint32, or returns 0 if it doesn't exist.

func GetUint64

func GetUint64(ctx *pulumi.Context, key string) uint64

GetUint64 loads an optional configuration value by its key, as a uint64, or returns 0 if it doesn't exist.

func GetUint8

func GetUint8(ctx *pulumi.Context, key string) uint8

GetUint8 loads an optional configuration value by its key, as a uint8, or returns 0 if it doesn't exist.

func Require

func Require(ctx *pulumi.Context, key string) string

Require loads a configuration value by its key, or panics if it doesn't exist.

func RequireBool

func RequireBool(ctx *pulumi.Context, key string) bool

RequireBool loads an optional configuration value by its key, as a bool, or panics if it doesn't exist.

func RequireFloat32

func RequireFloat32(ctx *pulumi.Context, key string) float32

RequireFloat32 loads an optional configuration value by its key, as a float32, or panics if it doesn't exist.

func RequireFloat64

func RequireFloat64(ctx *pulumi.Context, key string) float64

RequireFloat64 loads an optional configuration value by its key, as a float64, or panics if it doesn't exist.

func RequireInt

func RequireInt(ctx *pulumi.Context, key string) int

RequireInt loads an optional configuration value by its key, as a int, or panics if it doesn't exist.

func RequireInt16

func RequireInt16(ctx *pulumi.Context, key string) int16

RequireInt16 loads an optional configuration value by its key, as a int16, or panics if it doesn't exist.

func RequireInt32

func RequireInt32(ctx *pulumi.Context, key string) int32

RequireInt32 loads an optional configuration value by its key, as a int32, or panics if it doesn't exist.

func RequireInt64

func RequireInt64(ctx *pulumi.Context, key string) int64

RequireInt64 loads an optional configuration value by its key, as a int64, or panics if it doesn't exist.

func RequireInt8

func RequireInt8(ctx *pulumi.Context, key string) int8

RequireInt8 loads an optional configuration value by its key, as a int8, or panics if it doesn't exist.

func RequireUint

func RequireUint(ctx *pulumi.Context, key string) uint

RequireUint loads an optional configuration value by its key, as a uint, or panics if it doesn't exist.

func RequireUint16

func RequireUint16(ctx *pulumi.Context, key string) uint16

RequireUint16 loads an optional configuration value by its key, as a uint16, or panics if it doesn't exist.

func RequireUint32

func RequireUint32(ctx *pulumi.Context, key string) uint32

RequireUint32 loads an optional configuration value by its key, as a uint32, or panics if it doesn't exist.

func RequireUint64

func RequireUint64(ctx *pulumi.Context, key string) uint64

RequireUint64 loads an optional configuration value by its key, as a uint64, or panics if it doesn't exist.

func RequireUint8

func RequireUint8(ctx *pulumi.Context, key string) uint8

RequireUint8 loads an optional configuration value by its key, as a uint8, or panics if it doesn't exist.

func Try

func Try(ctx *pulumi.Context, key string) (string, error)

Try loads a configuration value by its key, returning a non-nil error if it doesn't exist.

func TryBool

func TryBool(ctx *pulumi.Context, key string) (bool, error)

TryBool loads an optional configuration value by its key, as a bool, or returns an error if it doesn't exist.

func TryFloat32

func TryFloat32(ctx *pulumi.Context, key string) (float32, error)

TryFloat32 loads an optional configuration value by its key, as a float32, or returns an error if it doesn't exist.

func TryFloat64

func TryFloat64(ctx *pulumi.Context, key string) (float64, error)

TryFloat64 loads an optional configuration value by its key, as a float64, or returns an error if it doesn't exist.

func TryInt

func TryInt(ctx *pulumi.Context, key string) (int, error)

TryInt loads an optional configuration value by its key, as a int, or returns an error if it doesn't exist.

func TryInt16

func TryInt16(ctx *pulumi.Context, key string) (int16, error)

TryInt16 loads an optional configuration value by its key, as a int16, or returns an error if it doesn't exist.

func TryInt32

func TryInt32(ctx *pulumi.Context, key string) (int32, error)

TryInt32 loads an optional configuration value by its key, as a int32, or returns an error if it doesn't exist.

func TryInt64

func TryInt64(ctx *pulumi.Context, key string) (int64, error)

TryInt64 loads an optional configuration value by its key, as a int64, or returns an error if it doesn't exist.

func TryInt8

func TryInt8(ctx *pulumi.Context, key string) (int8, error)

TryInt8 loads an optional configuration value by its key, as a int8, or returns an error if it doesn't exist.

func TryUint

func TryUint(ctx *pulumi.Context, key string) (uint, error)

TryUint loads an optional configuration value by its key, as a uint, or returns an error if it doesn't exist.

func TryUint16

func TryUint16(ctx *pulumi.Context, key string) (uint16, error)

TryUint16 loads an optional configuration value by its key, as a uint16, or returns an error if it doesn't exist.

func TryUint32

func TryUint32(ctx *pulumi.Context, key string) (uint32, error)

TryUint32 loads an optional configuration value by its key, as a uint32, or returns an error if it doesn't exist.

func TryUint64

func TryUint64(ctx *pulumi.Context, key string) (uint64, error)

TryUint64 loads an optional configuration value by its key, as a uint64, or returns an error if it doesn't exist.

func TryUint8

func TryUint8(ctx *pulumi.Context, key string) (uint8, error)

TryUint8 loads an optional configuration value by its key, as a uint8, or returns an error if it doesn't exist.

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

Config is a struct that permits access to config as a "bag" with a package name. This avoids needing to access config with the fully qualified name all of the time (e.g., a bag whose namespace is "p" automatically translates attempted reads of keys "k" into "p:k"). This is optional but can save on some boilerplate when accessing config.

func New

func New(ctx *pulumi.Context, namespace string) *Config

New creates a new config bag with the given context and namespace.

func (*Config) Get

func (c *Config) Get(key string) string

Get loads an optional configuration value by its key, or returns "" if it doesn't exist.

func (*Config) GetBool

func (c *Config) GetBool(key string) bool

GetBool loads an optional bool configuration value by its key, or returns false if it doesn't exist.

func (*Config) GetFloat32

func (c *Config) GetFloat32(key string) float32

GetFloat32 loads an optional float32 configuration value by its key, or returns 0.0 if it doesn't exist.

func (*Config) GetFloat64

func (c *Config) GetFloat64(key string) float64

GetFloat64 loads an optional float64 configuration value by its key, or returns 0.0 if it doesn't exist.

func (*Config) GetInt

func (c *Config) GetInt(key string) int

GetInt loads an optional int configuration value by its key, or returns 0 if it doesn't exist.

func (*Config) GetInt16

func (c *Config) GetInt16(key string) int16

GetInt16 loads an optional int16 configuration value by its key, or returns 0 if it doesn't exist.

func (*Config) GetInt32

func (c *Config) GetInt32(key string) int32

GetInt32 loads an optional int32 configuration value by its key, or returns 0 if it doesn't exist.

func (*Config) GetInt64

func (c *Config) GetInt64(key string) int64

GetInt64 loads an optional int64 configuration value by its key, or returns 0 if it doesn't exist.

func (*Config) GetInt8

func (c *Config) GetInt8(key string) int8

GetInt8 loads an optional int8 configuration value by its key, or returns 0 if it doesn't exist.

func (*Config) GetUint

func (c *Config) GetUint(key string) uint

GetUint loads an optional uint configuration value by its key, or returns 0 if it doesn't exist.

func (*Config) GetUint16

func (c *Config) GetUint16(key string) uint16

GetUint16 loads an optional uint16 configuration value by its key, or returns 0 if it doesn't exist.

func (*Config) GetUint32

func (c *Config) GetUint32(key string) uint32

GetUint32 loads an optional uint32 configuration value by its key, or returns 0 if it doesn't exist.

func (*Config) GetUint64

func (c *Config) GetUint64(key string) uint64

GetUint64 loads an optional uint64 configuration value by its key, or returns 0 if it doesn't exist.

func (*Config) GetUint8

func (c *Config) GetUint8(key string) uint8

GetUint8 loads an optional uint8 configuration value by its key, or returns 0 if it doesn't exist.

func (*Config) Require

func (c *Config) Require(key string) string

Require loads a configuration value by its key, or panics if it doesn't exist.

func (*Config) RequireBool

func (c *Config) RequireBool(key string) bool

RequireBool loads a bool configuration value by its key, or panics if it doesn't exist.

func (*Config) RequireFloat32

func (c *Config) RequireFloat32(key string) float32

RequireFloat32 loads a float32 configuration value by its key, or panics if it doesn't exist.

func (*Config) RequireFloat64

func (c *Config) RequireFloat64(key string) float64

RequireFloat64 loads a float64 configuration value by its key, or panics if it doesn't exist.

func (*Config) RequireInt

func (c *Config) RequireInt(key string) int

RequireInt loads a int configuration value by its key, or panics if it doesn't exist.

func (*Config) RequireInt16

func (c *Config) RequireInt16(key string) int16

RequireInt16 loads a int16 configuration value by its key, or panics if it doesn't exist.

func (*Config) RequireInt32

func (c *Config) RequireInt32(key string) int32

RequireInt32 loads a int32 configuration value by its key, or panics if it doesn't exist.

func (*Config) RequireInt64

func (c *Config) RequireInt64(key string) int64

RequireInt64 loads a int64 configuration value by its key, or panics if it doesn't exist.

func (*Config) RequireInt8

func (c *Config) RequireInt8(key string) int8

RequireInt8 loads a int8 configuration value by its key, or panics if it doesn't exist.

func (*Config) RequireUint

func (c *Config) RequireUint(key string) uint

RequireUint loads a uint configuration value by its key, or panics if it doesn't exist.

func (*Config) RequireUint16

func (c *Config) RequireUint16(key string) uint16

RequireUint16 loads a uint16 configuration value by its key, or panics if it doesn't exist.

func (*Config) RequireUint32

func (c *Config) RequireUint32(key string) uint32

RequireUint32 loads a uint32 configuration value by its key, or panics if it doesn't exist.

func (*Config) RequireUint64

func (c *Config) RequireUint64(key string) uint64

RequireUint64 loads a uint64 configuration value by its key, or panics if it doesn't exist.

func (*Config) RequireUint8

func (c *Config) RequireUint8(key string) uint8

RequireUint8 loads a uint8 configuration value by its key, or panics if it doesn't exist.

func (*Config) Try

func (c *Config) Try(key string) (string, error)

Try loads a configuration value by its key, returning a non-nil error if it doesn't exist.

func (*Config) TryBool

func (c *Config) TryBool(key string) (bool, error)

TryBool loads an optional bool configuration value by its key, or returns an error if it doesn't exist.

func (*Config) TryFloat32

func (c *Config) TryFloat32(key string) (float32, error)

TryFloat32 loads an optional float32 configuration value by its key, or returns an error if it doesn't exist.

func (*Config) TryFloat64

func (c *Config) TryFloat64(key string) (float64, error)

TryFloat64 loads an optional float64 configuration value by its key, or returns an error if it doesn't exist.

func (*Config) TryInt

func (c *Config) TryInt(key string) (int, error)

TryInt loads an optional int configuration value by its key, or returns an error if it doesn't exist.

func (*Config) TryInt16

func (c *Config) TryInt16(key string) (int16, error)

TryInt16 loads an optional int16 configuration value by its key, or returns an error if it doesn't exist.

func (*Config) TryInt32

func (c *Config) TryInt32(key string) (int32, error)

TryInt32 loads an optional int32 configuration value by its key, or returns an error if it doesn't exist.

func (*Config) TryInt64

func (c *Config) TryInt64(key string) (int64, error)

TryInt64 loads an optional int64 configuration value by its key, or returns an error if it doesn't exist.

func (*Config) TryInt8

func (c *Config) TryInt8(key string) (int8, error)

TryInt8 loads an optional int8 configuration value by its key, or returns an error if it doesn't exist.

func (*Config) TryUint

func (c *Config) TryUint(key string) (uint, error)

TryUint loads an optional uint configuration value by its key, or returns an error if it doesn't exist.

func (*Config) TryUint16

func (c *Config) TryUint16(key string) (uint16, error)

TryUint16 loads an optional uint16 configuration value by its key, or returns an error if it doesn't exist.

func (*Config) TryUint32

func (c *Config) TryUint32(key string) (uint32, error)

TryUint32 loads an optional uint32 configuration value by its key, or returns an error if it doesn't exist.

func (*Config) TryUint64

func (c *Config) TryUint64(key string) (uint64, error)

TryUint64 loads an optional uint64 configuration value by its key, or returns an error if it doesn't exist.

func (*Config) TryUint8

func (c *Config) TryUint8(key string) (uint8, error)

TryUint8 loads an optional uint8 configuration value by its key, or returns an error if it doesn't exist.

Jump to

Keyboard shortcuts

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