config

package
v0.1.0-rc.20 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteCLIConfig

func DeleteCLIConfig() error

DeleteCLIConfig deletes the Kargo CLI configuration file from the Kargo home directory.

func SaveCLIConfig

func SaveCLIConfig(config CLIConfig) error

SaveCLIConfig saves Kargo CLI configuration to a file in the Kargo home directory.

Types

type CLIConfig

type CLIConfig struct {
	// APIAddress is the address of the Kargo API server.
	APIAddress string `json:"apiAddress,omitempty"`
	// BearerToken is used to authenticate with the Kargo API server. This could
	// be any of the following:
	//   1. An identity token issued by an OIDC identity provider
	//   2. An identity token issued by the Kargo API server itself
	//   3. An opaque token for the Kubernetes API server that the Kargo API
	//      server will communicate with
	// This token will be sent in the Authorization header of all requests to the
	// Kargo API server. The Kargo API server will ascertain which of the three
	// cases above applies and will act accordingly.
	BearerToken string `json:"bearerToken,omitempty"`
	// RefreshToken, if set, is used to refresh the Token, which must, in such a
	// case, have been issued by an OIDC identity provider.
	RefreshToken string `json:"refreshToken,omitempty"`
}

CLIConfig represents CLI configuration.

func LoadCLIConfig

func LoadCLIConfig() (CLIConfig, error)

LoadCLIConfig loads Kargo CLI configuration from a file in the Kargo home directory.

Jump to

Keyboard shortcuts

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