Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config reads/writes hosts.yml.
func (*Config) Get ¶
func (c *Config) Get(hostname string) (HostConfig, bool)
Get returns the HostConfig for hostname, if any.
func (*Config) Set ¶
func (c *Config) Set(hostname string, hc HostConfig)
Set stores hc for hostname.
type HostConfig ¶
type HostConfig struct {
User string `yaml:"user"`
// AuthUser is the identity used for HTTP Basic auth (email for Atlassian
// personal API tokens, username for App Passwords). When empty, User is
// used as fallback. Distinct from User because the Bitbucket API returns
// the account's username slug while Atlassian API tokens require the
// account email address as the Basic-auth username.
AuthUser string `yaml:"auth_user,omitempty"`
OAuthToken string `yaml:"oauth_token,omitempty"`
GitProtocol string `yaml:"git_protocol"`
Version string `yaml:"version,omitempty"`
SkipTLSVerify bool `yaml:"skip_tls_verify,omitempty"`
BackendType string `yaml:"backend_type,omitempty"`
}
HostConfig is one entry in hosts.yml.
func (HostConfig) MarshalYAML ¶ added in v1.33.0
func (h HostConfig) MarshalYAML() (any, error)
MarshalYAML strips the OAuthToken before serialisation so that tokens are never written to hosts.yml. Credentials should live in the OS keyring only.
Click to show internal directories.
Click to hide internal directories.