Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Service = dependency.Service{ Dependencies: fx.Provide( NewFactory().Configure, ), Constructor: func(config *viper.Viper) dependency.ConfigGetter { return config }, }
Service provides the config framework as a *viper.Viper and a framework.ConfigGetter
Functions ¶
Types ¶
type Factory ¶
type Factory struct { Replacer *strings.Replacer ConfigFunc func(config Viper, cmd *cobra.Command, replacer *strings.Replacer) error }
Factory is a type that can produce new instances of the *viper.Viper type
func NewFactory ¶
func NewFactory() Factory
NewFactory gives a new instance of the Factory type with a string.Replacer that will replace - or . with _ when in an environment variable, it also sets the ConfigFunc to be ConfigureViper function
Click to show internal directories.
Click to hide internal directories.