Documentation
¶
Index ¶
- func GetCurrentContextName(reader io.Reader) (string, error)
- func IsKeychainEnabled() bool
- func SetCurrentContext(reader io.Reader, writer io.Writer, contextName string) error
- func StoreContext(reader io.Reader, writer io.Writer, cdsctx CDSContext) error
- type CDSConfigFile
- type CDSContext
- type ContextTokens
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCurrentContextName ¶
GetCurrentContextName return the current contextName
func IsKeychainEnabled ¶
func IsKeychainEnabled() bool
IsKeychainEnabled returns true is keychain is enable
func SetCurrentContext ¶
SetCurrentContext set the current context and returns it
func StoreContext ¶
StoreContext writes the .cdsrc file
Types ¶
type CDSConfigFile ¶
type CDSConfigFile struct { Current string Contexts map[string]CDSContext }
CDSConfigFile represents a CDS Config File
func GetConfigFile ¶
func GetConfigFile(reader io.Reader) (*CDSConfigFile, error)
GetConfigFile returns the config file
type CDSContext ¶
type CDSContext struct { Context string `json:"context" cli:"context"` Host string `json:"host" cli:"host"` InsecureSkipVerifyTLS bool `json:"-" cli:"-"` Verbose bool `json:"-" cli:"-"` Session string `json:"-" cli:"-"` // Session Token Token string `json:"-" cli:"-"` // BuitinConsumerAuthenticationToken }
CDSContext represents a CDS Context store in .cds/cdsrc file or in keychain
func GetContext ¶
func GetContext(reader io.Reader, contextName string) (*CDSContext, error)
GetContext return the a CDSContext from a contextName
func GetCurrentContext ¶
func GetCurrentContext(reader io.Reader) (*CDSContext, error)
GetCurrentContext return the current context
type ContextTokens ¶
type ContextTokens struct { Session string `json:"session" cli:"-"` // Session Token Token string `json:"token" cli:"-"` // BuitinConsumerAuthenticationToken }
ContextTokens contains a Session Token and a Sign in token this struct is use to store secret in keychain
Click to show internal directories.
Click to hide internal directories.