Documentation ¶
Index ¶
- Constants
- Variables
- func GetAppNameFromConfigOrFromParameter(cmd *cobra.Command, appNameField string) (string, error)
- func GetCache[T any](key string) (content T, ok bool)
- func GetEnvironmentFromConfig(cmd *cobra.Command, branchName string) (string, error)
- func GetRadixApplicationFromFile() (*v1.RadixApplication, error)
- func GetStringFromFlagValueOrFlagFile(cmd *cobra.Command, valueFlag, fileNameFlag string) (string, error)
- func IsValidContext(context string) bool
- func Save(radixConfig *RadixConfig) error
- func SetCache[T any](key string, content T, ttl time.Duration)
- type CacheItem
- type CustomConfig
- type RadixConfig
Constants ¶
View Source
const ( ContextProduction = "production" ContextPlatform = "platform" ContextPlayground = "playground" ContextDevelopment = "development" ContextPlatform2 = "platform2" DefaultCacheDuration = 7 * 24 * time.Hour )
Variables ¶
View Source
var ( RadixConfigDir = path.Join(getUserHomeDir(), radixConfigDir) RadixConfigFileFullName = path.Join(RadixConfigDir, radixConfigFileName) ValidContexts = []string{ContextProduction, ContextPlatform, ContextPlatform2, ContextPlayground, ContextDevelopment} )
Functions ¶
func GetAppNameFromConfigOrFromParameter ¶ added in v1.21.0
func GetEnvironmentFromConfig ¶ added in v1.21.0
func GetRadixApplicationFromFile ¶ added in v1.21.0
func GetRadixApplicationFromFile() (*v1.RadixApplication, error)
func GetStringFromFlagValueOrFlagFile ¶ added in v1.21.0
func IsValidContext ¶
Types ¶
type CustomConfig ¶
type CustomConfig struct { // Context is the environment context: platform (default), playground, development, platform2 Context string `json:"Context"` }
CustomConfig is the custom environment config
type RadixConfig ¶
type RadixConfig struct { // CustomConfig is the custom environment config CustomConfig *CustomConfig `json:"customConfig"` Cache map[string]map[string]CacheItem `json:"cache"` // MSAL is the internal cache structure used by the MSAL module. The content is base64 encoded MSAL string `json:"msal,omitempty"` }
func GetDefaultRadixConfig ¶ added in v1.0.7
func GetDefaultRadixConfig() *RadixConfig
func GetRadixConfig ¶ added in v1.8.0
func GetRadixConfig() (*RadixConfig, error)
Click to show internal directories.
Click to hide internal directories.