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 IsConfigNotFoundErr ¶
func NewConfigNotFoundErr ¶
func SaveCLIConfig ¶
SaveCLIConfig saves Kargo CLI configuration to a file in the Kargo home directory.
Types ¶
type CLIConfig ¶
type CLIConfig struct {
// AuthMethod is the method used to authenticate with the Kargo API server.
AuthMethod string `json:"authMethod,omitempty"`
// 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"`
// InsecureSkipTLSVerify indicates whether the user indicated during login
// that certificate warnings should be ignored. When true, this option will be
// applied to all subsequent Kargo commands until the user logs out or
// re-authenticates. When true, refresh tokens will not be used, thereby
// forcing users to periodically re-assess this choice.
InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify,omitempty"`
// Project is the default Project for the command.
Project string `json:"project,omitempty"`
}
CLIConfig represents CLI configuration.
func LoadCLIConfig ¶
LoadCLIConfig loads Kargo CLI configuration from a file in the Kargo home directory.
func MaskedConfig ¶
func NewDefaultCLIConfig ¶
func NewDefaultCLIConfig() CLIConfig
NewDefaultCLIConfig returns a new default CLI configuration.
type ErrConfigNotFound ¶
type ErrConfigNotFound struct {
Path string
}
func (*ErrConfigNotFound) Error ¶
func (e *ErrConfigNotFound) Error() string
Click to show internal directories.
Click to hide internal directories.