config

package
v0.0.0-...-8223eb1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package config provides convenience facilities for Golang-based pods to read their configuration files provided either by the environment or a custom path.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

func LoadConfigFile

func LoadConfigFile(filepath string) (*Config, error)

func LoadFromEnvironment

func LoadFromEnvironment() (*Config, error)

func LoadFromUnpacked

func LoadFromUnpacked(unpacked map[interface{}]interface{}) *Config

func (*Config) Keys

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

func (*Config) Read

func (c *Config) Read(key string) interface{}

func (*Config) ReadBool

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

func (*Config) ReadMap

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

func (*Config) ReadString

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

func (*Config) ReadStringSlice

func (c *Config) ReadStringSlice(key string) ([]string, error)

Jump to

Keyboard shortcuts

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