config

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

package config stores configuration around user onboarding to granted used to display friendly CLI hints and save progress in multi-step workflows, such as deploying Granted services to a user's cloud environment.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GrantedConfigFolder

func GrantedConfigFolder() (string, error)

func SetupConfigFolder

func SetupConfigFolder() error

checks and or creates the config folder on startup

func SetupZSHAutoCompleteFolderAssume added in v0.2.1

func SetupZSHAutoCompleteFolderAssume() (string, error)

checks and or creates the config folder on startup

func SetupZSHAutoCompleteFolderGranted added in v0.2.1

func SetupZSHAutoCompleteFolderGranted() (string, error)

checks and or creates the config folder on startup

Types

type Config

type Config struct {
	DefaultBrowser string
	// used to override the builtin filepaths for custom installation locations
	CustomBrowserPath      string
	CustomSSOBrowserPath   string
	Keyring                *KeyringConfig `toml:",omitempty"`
	Ordering               string
	ExportCredentialSuffix string
	// AccessRequestURL is a Granted Approvals URL that users can visit
	// to request access, in the event that we receive a ForbiddenException
	// denying access to assume a particular role.
	AccessRequestURL string `toml:",omitempty"`

	CommonFateDefaultSSOStartURL string `toml:",omitempty"`
	CommonFateDefaultSSORegion   string `toml:",omitempty"`

	// Set this to true to disable usage tips like `To assume this profile again later without needing to select it, run this command:`
	DisableUsageTips bool `toml:",omitempty"`
	// Set this to true to disable credential caching feature when using credential process
	DisableCredentialProcessCache bool `toml:",omitempty"`
	// deprecated in favor of ProfileRegistry
	ProfileRegistryURLS []string `toml:",omitempty"`
	ProfileRegistry     struct {
		// add any global configuration to profile registry here.
		PrefixAllProfiles       bool
		PrefixDuplicateProfiles bool
		SessionName             string            `toml:",omitempty"`
		RequiredKeys            map[string]string `toml:",omitempty"`
		Variables               map[string]string `toml:",omitempty"`
		Registries              []Registry        `toml:",omitempty"`
	} `toml:",omitempty"`
}

func Load

func Load() (*Config, error)

func NewDefaultConfig added in v0.2.3

func NewDefaultConfig() Config

NewDefaultConfig returns a config with OS specific defaults populated

func (*Config) Save

func (c *Config) Save() error

type KeyringConfig added in v0.1.11

type KeyringConfig struct {
	Backend                 *string `toml:",omitempty"`
	KeychainName            *string `toml:",omitempty"`
	FileDir                 *string `toml:",omitempty"`
	LibSecretCollectionName *string `toml:",omitempty"`
}

type Registry added in v0.6.0

type Registry struct {
	Name                    string  `toml:"name"`
	URL                     string  `toml:"url"`
	Path                    *string `toml:"path,omitempty"`
	Filename                *string `toml:"filename,omitempty"`
	Ref                     *string `toml:"ref,omitempty"`
	Priority                *int    `toml:"priority, omitempty"`
	PrefixDuplicateProfiles bool    `toml:"prefixDuplicateProfiles,omitempty"`
	PrefixAllProfiles       bool    `toml:"prefixAllProfiles,omitempty"`
}

Jump to

Keyboard shortcuts

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