Documentation
¶
Index ¶
- Variables
- func GetActiveProfileName(k *koanf.Koanf) string
- func GetOptionValue(opt options.Option) (string, error)
- func KoanfValueFromOption(opt options.Option, pName string) (value string, ok bool, err error)
- func MaskValue(value any) string
- func Validate() (err error)
- type KoanfConfig
- func (k KoanfConfig) ChangeActiveProfile(pName string) (err error)
- func (k KoanfConfig) DefaultMissingKoanfKeys() (err error)
- func (k KoanfConfig) DeleteProfile(pName string) (err error)
- func (k KoanfConfig) GetKoanfConfigFile() string
- func (k KoanfConfig) GetProfileKoanf(pName string) (subKoanf *koanf.Koanf, err error)
- func (k *KoanfConfig) KoanfInstance() *koanf.Koanf
- func (k KoanfConfig) ProfileNames() (profileNames []string)
- func (k KoanfConfig) SaveProfile(pName string, subKoanf *koanf.Koanf) (err error)
- func (k *KoanfConfig) SetKoanfConfigFile(cnfFilePath string)
- func (k KoanfConfig) ValidateExistingProfileName(pName string) (err error)
- func (k KoanfConfig) ValidateNewProfileName(pName string) (err error)
- func (k KoanfConfig) ValidateProfileNameFormat(pName string) (err error)
- func (k KoanfConfig) WriteFile() (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Validation errors ErrValidatePingCLIConfiguration = errors.New("failed to validate Ping CLI configuration") ErrInvalidConfigurationKey = errors.New("invalid configuration key(s) found in profile") ErrUnrecognizedVariableType = errors.New("unrecognized variable type for key") ErrValidateBoolean = errors.New("invalid boolean value") ErrValidateUUID = errors.New("invalid uuid value") ErrValidateOutputFormat = errors.New("invalid output format value") ErrValidatePingOneRegionCode = errors.New("invalid pingone region code value") ErrValidateString = errors.New("invalid string value") ErrValidateStringSlice = errors.New("invalid string slice value") ErrValidateStorageType = errors.New("invalid storage type value") ErrValidateAuthProvider = errors.New("invalid auth provider value") ErrValidateExportServiceGroup = errors.New("invalid export service group value") ErrValidateExportServices = errors.New("invalid export services value") ErrValidateExportFormat = errors.New("invalid export format value") ErrValidateHTTPMethod = errors.New("invalid http method value") ErrValidateRequestService = errors.New("invalid request service value") ErrValidateInt = errors.New("invalid int value") ErrValidatePingFederateAuthType = errors.New("invalid pingfederate auth type value") ErrValidatePingOneAuthType = errors.New("invalid pingone auth type value") ErrValidateLicenseProduct = errors.New("invalid license product value") ErrValidateLicenseVersion = errors.New("invalid license version value") // Koanf errors ErrNoOptionValue = errors.New("no option value found") ErrKoanfNotInitialized = errors.New("koanf instance is not initialized") ErrProfileNameEmpty = errors.New("invalid profile name: profile name cannot be empty") ErrProfileNameFormat = errors.New("invalid profile name: profile name must contain only alphanumeric characters, underscores, and dashes") ErrProfileNameSameAsActiveProfileKey = errors.New("invalid profile name: profile name cannot be the same as the active profile key") ErrSetActiveProfile = errors.New("error setting active profile") ErrWriteKoanfFile = errors.New("failed to write configuration file to disk") ErrProfileNameNotExist = errors.New("invalid profile name: profile name does not exist") ErrProfileNameAlreadyExists = errors.New("invalid profile name: profile name already exists") ErrKoanfProfileExtractAndLoad = errors.New("failed to extract and load profile configuration") ErrSetKoanfKeyValue = errors.New("failed to set koanf key value") ErrMarshalKoanf = errors.New("failed to marshal koanf configuration") ErrKoanfMerge = errors.New("failed to merge koanf configuration") ErrDeleteActiveProfile = errors.New("the active profile cannot be deleted") ErrSetKoanfKeyDefaultValue = errors.New("failed to set koanf key default value") )
Functions ¶
func GetActiveProfileName ¶ added in v0.6.0
func KoanfValueFromOption ¶ added in v0.6.0
Types ¶
type KoanfConfig ¶ added in v0.6.0
type KoanfConfig struct {
// contains filtered or unexported fields
}
func GetKoanfConfig ¶ added in v0.6.0
func GetKoanfConfig() (*KoanfConfig, error)
func NewKoanfConfig ¶ added in v0.6.0
func NewKoanfConfig(cnfFilePath string) *KoanfConfig
func (KoanfConfig) ChangeActiveProfile ¶ added in v0.6.0
func (k KoanfConfig) ChangeActiveProfile(pName string) (err error)
func (KoanfConfig) DefaultMissingKoanfKeys ¶ added in v0.6.0
func (k KoanfConfig) DefaultMissingKoanfKeys() (err error)
func (KoanfConfig) DeleteProfile ¶ added in v0.6.0
func (k KoanfConfig) DeleteProfile(pName string) (err error)
func (KoanfConfig) GetKoanfConfigFile ¶ added in v0.6.0
func (k KoanfConfig) GetKoanfConfigFile() string
func (KoanfConfig) GetProfileKoanf ¶ added in v0.6.0
func (k KoanfConfig) GetProfileKoanf(pName string) (subKoanf *koanf.Koanf, err error)
func (*KoanfConfig) KoanfInstance ¶ added in v0.6.0
func (k *KoanfConfig) KoanfInstance() *koanf.Koanf
func (KoanfConfig) ProfileNames ¶ added in v0.6.0
func (k KoanfConfig) ProfileNames() (profileNames []string)
Get all profile names from config.yaml configuration file Returns a sorted slice of profile names
func (KoanfConfig) SaveProfile ¶ added in v0.6.0
func (k KoanfConfig) SaveProfile(pName string, subKoanf *koanf.Koanf) (err error)
func (*KoanfConfig) SetKoanfConfigFile ¶ added in v0.6.0
func (k *KoanfConfig) SetKoanfConfigFile(cnfFilePath string)
func (KoanfConfig) ValidateExistingProfileName ¶ added in v0.6.0
func (k KoanfConfig) ValidateExistingProfileName(pName string) (err error)
The profile name must exist
func (KoanfConfig) ValidateNewProfileName ¶ added in v0.6.0
func (k KoanfConfig) ValidateNewProfileName(pName string) (err error)
The profile name format must be valid The new profile name must be unique
func (KoanfConfig) ValidateProfileNameFormat ¶ added in v0.6.0
func (k KoanfConfig) ValidateProfileNameFormat(pName string) (err error)
The profile name must contain only alphanumeric characters, underscores, and dashes The profile name cannot be empty
func (KoanfConfig) WriteFile ¶ added in v0.6.0
func (k KoanfConfig) WriteFile() (err error)
Click to show internal directories.
Click to hide internal directories.