cbconfig

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2020 License: MIT Imports: 2 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 {
	// contains filtered or unexported fields
}

func New

func New() *Config

func (*Config) Get

func (c *Config) Get(path string) interface{}

func (*Config) GetBool

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

func (*Config) GetFloat32

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

func (*Config) GetFloat64

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

func (*Config) GetInt

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

func (*Config) GetIntSlice

func (c *Config) GetIntSlice(path string) []int

func (*Config) GetRequired

func (c *Config) GetRequired(path string) (interface{}, error)

func (*Config) GetRequiredBool

func (c *Config) GetRequiredBool(path string) (bool, error)

func (*Config) GetRequiredFloat32

func (c *Config) GetRequiredFloat32(path string) (float32, error)

func (*Config) GetRequiredFloat64

func (c *Config) GetRequiredFloat64(path string) (float64, error)

func (*Config) GetRequiredInt

func (c *Config) GetRequiredInt(path string) (int, error)

func (*Config) GetRequiredIntSlice

func (c *Config) GetRequiredIntSlice(path string) ([]int, error)

func (*Config) GetRequiredString

func (c *Config) GetRequiredString(path string) (string, error)

func (*Config) GetRequiredStringSlice

func (c *Config) GetRequiredStringSlice(path string) ([]string, error)

func (*Config) GetString

func (c *Config) GetString(path string) string

func (*Config) GetStringSlice

func (c *Config) GetStringSlice(path string) []string

func (*Config) OverrideFromReader

func (c *Config) OverrideFromReader(provider Provider, reader io.Reader) error

func (*Config) SetFromReader

func (c *Config) SetFromReader(provider Provider, reader io.Reader) error

type Provider

type Provider interface {
	Unmarshall(reader io.Reader) (map[string]interface{}, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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