config

package
v1.7.4 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContextProduction  = "production"
	ContextPlatform    = "platform"
	ContextPlayground  = "playground"
	ContextDevelopment = "development"
	ContextPlatform2   = "platform2"
)

Variables

View Source
var (
	RecommendedConfigDir = path.Join(homedir.HomeDir(), recommendedHomeDir)
	RecommendedHomeFile  = path.Join(RecommendedConfigDir, recommendedFileName)
	ValidContexts        = []string{ContextProduction, ContextPlatform, ContextPlatform2, ContextPlayground, ContextDevelopment}
)

Functions

func IsValidContext

func IsValidContext(context string) bool

func Save added in v1.0.7

func Save(radixConfig RadixConfig) error

Save Saves RadixConfig

Types

type CustomConfig

type CustomConfig struct {
	Context string `json:"Context"`
}

type RadixConfig

type RadixConfig struct {
	CustomConfig  *CustomConfig  `json:"customConfig"`
	SessionConfig *SessionConfig `json:"sessionConfig"`
}

func GetDefaultRadixConfig added in v1.0.7

func GetDefaultRadixConfig() *RadixConfig

GetDefaultRadixConfig Gets RadixConfig with default properties

type RadixConfigAccess

type RadixConfigAccess struct {
}

func (RadixConfigAccess) GetDefaultConfig added in v1.0.7

func (c RadixConfigAccess) GetDefaultConfig() *clientcmdapi.AuthProviderConfig

GetDefaultConfig Gets AuthProviderConfig with default properties

func (RadixConfigAccess) GetExplicitFile

func (c RadixConfigAccess) GetExplicitFile() string

func (RadixConfigAccess) GetStartingConfig

func (c RadixConfigAccess) GetStartingConfig() *clientcmdapi.AuthProviderConfig

type SessionConfig

type SessionConfig struct {
	ClientID     string      `json:"clientID"`
	TenantID     string      `json:"tenantID"`
	APIServerID  string      `json:"apiServerID"`
	RefreshToken string      `json:"refreshToken"`
	AccessToken  string      `json:"accessToken"`
	ExpiresIn    json.Number `json:"expiresIn"`
	ExpiresOn    json.Number `json:"expiresOn"`
	Environment  string      `json:"environment"`
	ConfigMode   string      `json:"configMode"`
}

Jump to

Keyboard shortcuts

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