config

package
v6.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 19, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

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

type ProfileSettings added in v6.9.0

type ProfileSettings struct {
	Version     float64 // default: 1.0
	ProfileName string  // default: "user"
	Token       string  // default: "<token>"
	Environment string  // default: "prod"
}

ProfileSettings holds options for config generation

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL