Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Profile ¶
type Profile struct { // ID is either a username, email, or token. ID string `json:"id,omitempty"` // Type is the type of the profile. Type Type `json:"type"` // Session is a session token used to authenticate to Upbound. Session string `json:"session,omitempty"` // Account is the default account to use when this profile is selected. Account string `json:"account,omitempty"` // Kubeconfig is the kubeconfig file path that GetSpaceKubeConfig() will // read. If empty, it refers to client-go's default kubeconfig location. Kubeconfig string `json:"kubeconfig,omitempty"` // KubeContext is the context within Kubeconfig that GetSpaceKubeConfig() // will read. If empty, it refers to the default context. KubeContext string `json:"kube_context,omitempty"` // BaseConfig represent persisted settings for this profile. // For example: // * flags // * environment variables BaseConfig map[string]string `json:"base,omitempty"` }
A Profile is a set of credentials
func (Profile) GetSpaceKubeConfig ¶
GetSpaceKubeConfig returns a *rest.Config loaded from p.Kubeconfig and p.KubeContext. It returns an error if p.IsSpace() is false.
type Redacted ¶
type Redacted struct {
Profile
}
Redacted embeds a Upbound Profile for the sole purpose of redacting sensitive information.
func (Redacted) MarshalJSON ¶
MarshalJSON overrides the session field with `REDACTED` so as not to leak sensitive information. We're using an explicit copy here instead of updating the underlying Profile struct so as to not modifying the internal state of the struct by accident.
Click to show internal directories.
Click to hide internal directories.