Documentation
¶
Overview ¶
cfggen.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConfigFilePath ¶
func GetConfigFilePath() string
GetConfigFilePath sanitizes the --config flag input and returns the path to the config file. If none set, it returns the default config path.
func MigrateFromJSON ¶ added in v6.9.0
func MigrateFromJSON(jsonPath string) (*fileconfiguration.FileConfig, error)
MigrateFromJSON looks for an old JSON file at jsonPath, and if it defines any of userdata.token, userdata.name, userdata.password, returns a minimal FileConfig with exactly those credentials (v1.0, single profile/environment). If none found, or on error, returns (nil, err).
func NewFromIndex ¶ added in v6.9.0
func NewFromIndex(settings ProfileSettings, opts Filters) (*fileconfiguration.FileConfig, error)
NewFromIndex builds a FileConfig based on the index and OpenAPI specs.
Types ¶
type Filters ¶ added in v6.9.0
type Filters struct {
Version *string // e.g. "v1"
Visibility *string // e.g. "public"
Gate *string // e.g. "General-Availability"
Whitelist map[string]bool // API names to explicitly include
Blacklist map[string]bool // API names to explicitly exclude
CustomNames map[string]string // map spec-name -> desired name
}
Filters controls which APIs to include
Click to show internal directories.
Click to hide internal directories.