c8ysession

package
v2.30.2 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatHost

func FormatHost(host string) string

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)

Types

type CumulocitySession

type CumulocitySession struct {
	Schema string `json:"$schema,omitempty"`

	// ID          string `json:"id"`
	Host            string `json:"host"`
	Tenant          string `json:"tenant"`
	Username        string `json:"username"`
	Password        string `json:"password"`
	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:"-"`

	Logger *logger.Logger `json:"-"`
	Config *config.Config `json:"-"`
}

CumulocitySession contains all settings required to communicate with a Cumulocity service

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"`
}

Jump to

Keyboard shortcuts

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