Documentation ¶
Index ¶
- func DefaultConfigDir() (string, error)
- func DefaultLocalConfigPath() (string, error)
- func ValidateLocalConfig(config LocalConfig) error
- func WriteLocalConfig(config LocalConfig, configPath string) error
- type Context
- type ContextRef
- type LocalConfig
- func (l *LocalConfig) GetServer(name string) (*Server, error)
- func (l *LocalConfig) GetUser(name string) (*User, error)
- func (l *LocalConfig) ResolveContext(name string) (*Context, error)
- func (l *LocalConfig) UpsertContext(context ContextRef)
- func (l *LocalConfig) UpsertServer(server Server)
- func (l *LocalConfig) UpsertUser(user User)
- type Server
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultConfigDir ¶ added in v0.3.2
DefaultConfigDir returns the local configuration path for settings such as cached authentication tokens.
func DefaultLocalConfigPath ¶
DefaultLocalConfigPath returns the local configuration path for settings such as cached authentication tokens.
func ValidateLocalConfig ¶
func ValidateLocalConfig(config LocalConfig) error
func WriteLocalConfig ¶
func WriteLocalConfig(config LocalConfig, configPath string) error
WriteLocalConfig writes a new local configuration file.
Types ¶
type ContextRef ¶
type ContextRef struct { Name string `json:"name"` Server string `json:"server"` User string `json:"user"` }
ContextRef is a reference to a Server and User for an API client
type LocalConfig ¶
type LocalConfig struct { CurrentContext string `json:"current-context"` Contexts []ContextRef `json:"contexts"` Servers []Server `json:"servers"` Users []User `json:"users"` }
LocalConfig is a local ArgoCD config file
func ReadLocalConfig ¶
func ReadLocalConfig(path string) (*LocalConfig, error)
ReadLocalConfig loads up the local configuration file. Returns nil if config does not exist
func (*LocalConfig) ResolveContext ¶
func (l *LocalConfig) ResolveContext(name string) (*Context, error)
ResolveContext resolves the specified context. If unspecified, resolves the current context
func (*LocalConfig) UpsertContext ¶
func (l *LocalConfig) UpsertContext(context ContextRef)
func (*LocalConfig) UpsertServer ¶
func (l *LocalConfig) UpsertServer(server Server)
func (*LocalConfig) UpsertUser ¶
func (l *LocalConfig) UpsertUser(user User)
type Server ¶
type Server struct { // Server is the ArgoCD server address Server string `json:"server"` // Insecure indicates to connect to the server over TLS insecurely Insecure bool `json:"insecure,omitempty"` // CACertificateAuthorityData is the base64 string of a PEM encoded certificate // TODO: not yet implemented CACertificateAuthorityData string `json:"certificate-authority-data,omitempty"` // PlainText indicates to connect with TLS disabled PlainText bool `json:"plain-text,omitempty"` }
Server contains ArgoCD server information
Click to show internal directories.
Click to hide internal directories.