configbp

package
v0.9.17 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Overview

Package configbp parses configurations per the baseplate spec.

Index

Constants

This section is empty.

Variables

View Source
var BaseplateConfigPath = os.Getenv("BASEPLATE_CONFIG_PATH")

BaseplateConfigPath points to the default config file per baseplate.spec.

Functions

func ParseStrictFile

func ParseStrictFile(path string, ptr interface{}) error

ParseStrictFile parses configuration from the file at the given path.

Environment variables (e.g. $FOO and ${FOO}) are substituted from the environment before parsing. The configuration is parsed into each of the targets, which will typically be pointers to structs.

func ParseStrictYAML

func ParseStrictYAML(reader io.Reader, ptr interface{}) error

ParseStrictYAML parses YAML read from the given Reader.

Environment variables (e.g. $FOO and ${FOO}) are substituted from the environment before parsing. The configuration is parsed into each of the targets, which will typically be pointers to structs.

Types

type Int64String added in v0.9.8

type Int64String int64

Int64String is an int64 type that can be yaml deserialized from strings.

It's useful when the yaml config goes through helm, which could cause precision loss on large int64 numbers: https://github.com/helm/helm/issues/11045

func (*Int64String) UnmarshalYAML added in v0.9.8

func (i *Int64String) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements yaml.Unmarshaler.

Jump to

Keyboard shortcuts

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