Documentation ¶
Index ¶
- func ClearEnvironmentVariables(shell utilities.ShellType)
- func ClearProcessEnvironment()
- func FormatHost(host string) string
- func GetSessionEnvKeys() []string
- func GetVariablesFromSession(session *CumulocitySession, client *c8y.Client, setPassword bool) map[string]interface{}
- func IsSessionFilePath(path string) bool
- func PrintSessionInfo(w io.Writer, client *c8y.Client, cfg *config.Config, session CumulocitySession)
- func PrintSessionInfoAsJSON(w io.Writer, client *c8y.Client, cfg *config.Config, session CumulocitySession) error
- func ShowClientEnvironmentVariables(cfg *config.Config, c8yclient *c8y.Client, shell utilities.ShellType)
- func ShowSessionEnvironmentVariables(session *CumulocitySession, cfg *config.Config, c8yclient *c8y.Client, ...)
- func WriteOutput(w io.Writer, client *c8y.Client, cfg *config.Config, ...) error
- type CumulocitySession
- func (s CumulocitySession) GetDomain() string
- func (s CumulocitySession) GetHost() string
- func (s CumulocitySession) GetPassword() string
- func (s CumulocitySession) GetSessionPassphrase() string
- func (s *CumulocitySession) SetHost(host string)
- func (s *CumulocitySession) SetPassword(password string)
- func (s *CumulocitySession) SetToken(token string)
- type CumulocitySessions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearEnvironmentVariables ¶ added in v2.42.0
func ClearProcessEnvironment ¶ added in v2.42.0
func ClearProcessEnvironment()
func FormatHost ¶
func GetSessionEnvKeys ¶ added in v2.42.0
func GetSessionEnvKeys() []string
func GetVariablesFromSession ¶ added in v2.42.0
func GetVariablesFromSession(session *CumulocitySession, client *c8y.Client, setPassword bool) map[string]interface{}
GetVariablesFromSession gets all the environment variables associated with the current session
func IsSessionFilePath ¶ added in v2.42.1
func PrintSessionInfo ¶
func PrintSessionInfo(w io.Writer, client *c8y.Client, cfg *config.Config, session CumulocitySession)
PrintSessionInfo print out the session information to writer (i.e. console or file)
func PrintSessionInfoAsJSON ¶ added in v2.42.0
func ShowClientEnvironmentVariables ¶ added in v2.42.0
func ShowSessionEnvironmentVariables ¶ added in v2.42.0
Types ¶
type CumulocitySession ¶
type CumulocitySession struct { Schema string `json:"$schema,omitempty"` // ID string `json:"id"` Host string `json:"host"` Tenant string `json:"tenant"` Version string `json:"version"` Username string `json:"username"` Password string `json:"password"` TOTP string `json:"totp"` Token string `json:"token"` Description string `json:"description"` UseTenantPrefix bool `json:"useTenantPrefix"` Settings *config.CommandSettings `json:"settings,omitempty"` MicroserviceAliases map[string]string `json:"microserviceAliases,omitempty"` Index int `json:"-"` Path string `json:"-"` Extension string `json:"-"` Name string `json:"-"` // How to identify the session SessionUri string `json:"sessionUri"` Logger *logger.Logger `json:"-"` Config *config.Config `json:"-"` }
CumulocitySession contains all settings required to communicate with a Cumulocity service
func (CumulocitySession) GetDomain ¶ added in v2.42.0
func (s CumulocitySession) GetDomain() string
GetDomain gets the custom Cumulocity domain for cases where it differs from the Host
func (CumulocitySession) GetHost ¶
func (s CumulocitySession) GetHost() string
func (CumulocitySession) GetPassword ¶
func (s CumulocitySession) GetPassword() string
func (CumulocitySession) GetSessionPassphrase ¶
func (s CumulocitySession) GetSessionPassphrase() string
func (*CumulocitySession) SetHost ¶
func (s *CumulocitySession) SetHost(host string)
func (*CumulocitySession) SetPassword ¶
func (s *CumulocitySession) SetPassword(password string)
func (*CumulocitySession) SetToken ¶
func (s *CumulocitySession) SetToken(token string)
type CumulocitySessions ¶
type CumulocitySessions struct {
Sessions []CumulocitySession `json:"sessions"`
}
Click to show internal directories.
Click to hide internal directories.