Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client[C schemas.BaseConfiguration] interface { GetConfig() C SetAndBindFlag(name string, shorthand string, value any, description string) error }
Client interface
type ClientGetter ¶
type ClientGetter struct{}
ClientGetter is an struct for getting a BB config client.
func (*ClientGetter) GetClient ¶
func (clientGetter *ClientGetter) GetClient(command *cobra.Command, loggingClient *bbLog.Client, viperInstance *viper.Viper) (*ConfigClient, error)
GetClient returns a new config client.
type ConfigClient ¶
type ConfigClient struct {
// contains filtered or unexported fields
}
ConfigClient is composed of functions to interact with configuration.
func NewClient ¶
func NewClient( getConfig GetConfigFunc, setAndBindFlag SetAndBindFlagFunc, loggingClient *bbLog.Client, command *cobra.Command, viperInstance *viper.Viper, ) (*ConfigClient, error)
NewClient returns a new config client with the provided configuration
func (*ConfigClient) GetConfig ¶
func (client *ConfigClient) GetConfig() (*schemas.GlobalConfiguration, error)
GetConfig returns the global configuration.
type GetConfigFunc ¶
type GetConfigFunc func(*ConfigClient) (*schemas.GlobalConfiguration, error)
GetConfigFunc type
Click to show internal directories.
Click to hide internal directories.