Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigProvider ¶
type ConfigProvider struct { appconfig.ProviderMeta // contains filtered or unexported fields }
note for a command like ./app --active-profiles develop --dynamic.flag.example=1 -- kvarg-example=b --active-profiles develop is the decalred flag, because we declared active-profiles as a known command line flag.
i.e. --help will display a description about this flag's usage
--dynamic.flag.example=1 is the dynamic flag, we did not declare this flag at development time. kvarg-example=b is the command's argument. Since it's in kv format, we will extract them into kvArgs, and process them as properties
func NewCobraProvider ¶
func NewCobraProvider(precedence int, execCtx *bootstrap.CliExecContext, prefix string) *ConfigProvider
func (*ConfigProvider) Load ¶
func (configProvider *ConfigProvider) Load(_ context.Context) (loadError error)
func (*ConfigProvider) Name ¶
func (configProvider *ConfigProvider) Name() string
type StaticConfigProvider ¶
type StaticConfigProvider struct { appconfig.ProviderMeta // contains filtered or unexported fields }
func NewStaticConfigProvider ¶
func NewStaticConfigProvider(order int, execCtx *bootstrap.CliExecContext) *StaticConfigProvider
func (*StaticConfigProvider) Load ¶
func (p *StaticConfigProvider) Load(_ context.Context) (err error)
func (*StaticConfigProvider) Name ¶
func (p *StaticConfigProvider) Name() string
Click to show internal directories.
Click to hide internal directories.