package
1.20240719.1
Repository: https://github.com/blend/go-sdk.git
Documentation: pkg.go.dev

# Functions

Bool returns a BoolValue for a given value.
DurationPtr returns a DurationSource for a given duration pointer.
Env returns a new environment value provider.
Float64Ptr returns an Float64Source for a given float64 pointer.
GetConfigPaths gets the config file paths from a context..
Int32Ptr returns an Int32Source for a given int32 pointer.
Int64Ptr returns an Int64Source for a given Int64 poInt64er.
IntPtr returns an IntSource for a given int pointer.
IsConfigPathUnset returns if an error is an ErrConfigPathUnset.
IsIgnored returns if we should ignore the config read error.
IsInvalidConfigExtension returns if an error is an ErrInvalidConfigExtension.
IsNotExist returns if an error is an os.ErrNotExist.
LazyBool returns an BoolSource for a given bool pointer.
LazyDuration returns an DurationSource for a given duration pointer.
LazyFloat64 returns an Float64Source for a given float64 pointer.
LazyInt returns an IntSource for a given int pointer.
LazyInt32 returns an Int32Source for a given int32 pointer.
LazyInt64 returns an Int64Source for a given int64 pointer.
LazyString returns a StringSource for a given string pointer.
MaybeDebugf writes a debug message if the logger is set.
MaybeErrorf writes an error message if the logger is set.
MaybeInfof writes an info message if the logger is set.
MaybeWarningf writes a debug message if the logger is set.
MustRead reads a config from optional path(s) and panics on error.
OptAddContent adds contents to the options as a reader.
OptAddContentString adds contents to the options as a string.
OptAddFilePaths is deprecated; use `OptAddPaths`.
OptAddPaths adds paths to search for the config file.
OptAddPreferredPaths adds paths to search first for the config file.
OptContents sets config contents on the options.
OptContext sets the context on the options.
OptEnv sets the config options environment variables.
OptLog sets the configutil logger.
OptPaths sets paths to search for the config file.
OptUnsetPaths removes default paths from the paths set.
Parse returns an int parser.
Read reads a config from optional path(s), returning the paths read from (in the order visited), and an error if there were any issues.
Resolve returns the first non-nil error in a list.
ResolveIf wraps a resolver in a branch.
ResolveIfFunc wraps a resolver in a branch returned from a function.
SetBool coalesces a given list of sources into a variable.
SetBoolPtr coalesces a given list of sources into a variable.
SetDuration coalesces a given list of sources into a variable.
SetDurationPtr coalesces a given list of sources into a variable.
SetFloat64 coalesces a given list of sources into a variable.
SetFloat64Ptr coalesces a given list of sources into a variable.
SetInt coalesces a given list of sources into a variable.
SetInt32 coalesces a given list of sources into a variable.
SetInt32Ptr coalesces a given list of sources into a variable.
SetInt64 coalesces a given list of sources into a variable.
SetInt64Ptr coalesces a given list of sources into a variable.
SetIntPtr coalesces a given list of sources into a variable.
SetString coalesces a given list of sources into a variable.
SetStringPtr coalesces a given list of sources into a variable.
SetStrings coalesces a given list of sources into a variable.
StringPtr returns a StringSource for a given string pointer.
WithConfigPaths adds config file paths to the context.

# Constants

EnvVarConfigPath is the env var for configs.
ErrConfigPathUnset is a common error.
ErrInvalidConfigExtension is a common error.
ExtensionJSON is a file extension.
ExtensionYAML is a file extension.
ExtensionYML is a file extension.

# Variables

DefaultPaths are default path locations.

# Structs

ConfigContents are literal contents to read from.
ConfigOptions are options built for reading configs.
DurationPtrSource is a DurationSource that wraps a duration pointer.
EnvVars is a value provider where the string represents the environment variable name.
Float64PtrSource is a Float64Source that wraps a float64 pointer.
Int32PtrSource is a Int32Source that wraps an int32 pointer.
Int64PtrSource is a Int64Source that wraps an Int64 poInt64er.
IntPtrSource is a IntSource that wraps an int pointer.
LazyBoolSource implements value provider.
LazyDurationSource implements value provider.
LazyFloat64Source implements value provider.
LazyInt32Source implements value provider.
LazyInt64Source implements value provider.
LazyIntSource implements value provider.
LazyStringSource implements the LazyString resolver.
Parser parses an int.
StringPtrSource implements the StringPtr resolver.

# Interfaces

Any is a loose type alias to interface{}.
BoolSource is a type that can return a value.
DurationSource is a type that can return a time.Duration value.
Float64Source is a type that can return a value.
Int32Source is a type that can return a value.
Int64Source is a type that can return a value.
IntSource is a type that can return a value.
Logger is a type that can satisfy the configutil logger interface.
Resolver is a type that can be resolved.
StringSource is a type that can return a value.
StringsSource is a type that can return a value.

# Type aliases

BoolFunc is a bool value source.
BoolValue implements value provider.
Duration implements value provider.
DurationFunc is a value source from a function.
File reads the string contents of a file as a literal config value.
Float64 implements value provider.
Float64Func is a float value source from a commandline flag.
Int implements value provider.
Int32 implements value provider.
Int64 implements value provider.
Int64Func is an int64 value source from a commandline flag.
IntFunc is an int value source from a commandline flag.
Labels is a loose type alias to map[string]string.
Option is a modification of config options.
ResolveAction is a step in resolution.
String implements value provider.
StringFunc is a value source from a function.
Strings implements a value provider.
StringsFunc is a value source from a function.
Vars is a loose type alias to map[string]string.