Documentation
¶
Index ¶
- Variables
- type Directory
- func (d Directory) CredentialsCacheJsonFor(profileName, credentialName fmt.Stringer) string
- func (d Directory) CredentialsJsonFor(profileName fmt.Stringer) string
- func (d Directory) Exists() bool
- func (d Directory) Join(elems ...any) string
- func (d Directory) ProfilesJson() string
- func (d Directory) VersionCheckJson() string
Constants ¶
This section is empty.
Variables ¶
View Source
var DirectorySetting = setting.Setting[Directory]{ Env: "MESHSTACK_CONFIG_DIR", Short: func(envKey string) string { return fmt.Sprintf("The directory holding profiles.json and one credentials file per profile. Also read from %s.", envKey) }, Long: func(envKey string) string { return fmt.Sprintf("The directory holding the meshStack CLI's configuration, also read from `%s`.\n\n"+ "`profiles.json` describes every profile, and `credentials/<profile>.json` holds that profile's "+ "credentials and its cached tokens.", envKey) }, Default: setting.DefaultSource(func() (dir string, err error) { if dir = os.Getenv("XDG_CONFIG_HOME"); dir == "" { if dir, err = os.UserConfigDir(); err != nil { return "", fmt.Errorf("cannot locate a configuration directory: %w", err) } } return filepath.Join(dir, "meshstack"), nil }), Parse: setting.ParseText[Directory], }
Functions ¶
This section is empty.
Types ¶
type Directory ¶
type Directory string
func (Directory) CredentialsCacheJsonFor ¶
func (Directory) CredentialsJsonFor ¶
func (Directory) ProfilesJson ¶
func (Directory) VersionCheckJson ¶
Click to show internal directories.
Click to hide internal directories.