Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Default string `yaml:"default,omitempty"`
Profiles ProfilesConfig `yaml:"profiles"`
}
func (*Config) GetDefaultProfile ¶
func (*Config) HasProfile ¶
type ConfigInterface ¶
type ConfigInterface interface {
ParentID() string
TenantID() string
Endpoint() string
GetCredentials(context.Context) (auth.BearerTokener, error)
GetAuthType() AuthType
SetOptions(options ...Option)
GetConfig() *Config
GetConfigPath() (string, error)
Load(context.Context) error
LoadIfNeeded(context.Context) error
CurrentProfileName() string
}
type GetProfileError ¶
type GetProfileError struct {
// contains filtered or unexported fields
}
func NewGetProfileError ¶
func NewGetProfileError(err error, profiles ProfilesConfig) *GetProfileError
func (*GetProfileError) AvailableProfiles ¶
func (e *GetProfileError) AvailableProfiles() []string
func (*GetProfileError) Error ¶
func (e *GetProfileError) Error() string
func (*GetProfileError) Unwrap ¶
func (e *GetProfileError) Unwrap() error
type MissingConfigError ¶
type MissingConfigError struct {
// contains filtered or unexported fields
}
func NewMissingConfigError ¶
func NewMissingConfigError(err error) *MissingConfigError
func (*MissingConfigError) Error ¶
func (e *MissingConfigError) Error() string
func (*MissingConfigError) Unwrap ¶
func (e *MissingConfigError) Unwrap() error
type Profile ¶
type Profile struct {
Name string `yaml:"-"`
Endpoint string `yaml:"endpoint,omitempty"`
TokenFile string `yaml:"token-file,omitempty"`
TokenEndpoint string `yaml:"token-endpoint,omitempty"`
AuthType AuthType `yaml:"auth-type,omitempty"`
FederationEndpoint string `yaml:"federation-endpoint,omitempty"`
FederationID string `yaml:"federation-id,omitempty"`
// TODO: move the following 4 values to a nested struct (config command doesn't support that)
ServiceAccountID string `yaml:"service-account-id,omitempty"`
PublicKeyID string `yaml:"public-key-id,omitempty"`
//nolint:gosec // This is up to a user to decide whether to put a private key in config or not.
PrivateKey string `yaml:"private-key,omitempty"`
// PrivateKeyFilePath points to a file containing a PEM encoded PKCS1 or PKCS8 private key.
PrivateKeyFilePath string `yaml:"private-key-file-path,omitempty"`
// ServiceAccountCredentialsFilePath points to a JSON credentials file that already
// contains service account ID, public key ID and private key (see auth.ServiceAccountCredentialsFileParser format).
ServiceAccountCredentialsFilePath string `yaml:"service-account-credentials-file-path,omitempty"`
// Federated credentials log-in path
FederatedSubjectCredentialsFilePath string `yaml:"federated-subject-credentials-file-path,omitempty"`
ParentID string `yaml:"parent-id,omitempty"`
TenantID string `yaml:"tenant-id,omitempty"`
}
type ProfilesConfig ¶
type StubOption ¶
type StubOption struct{}
Click to show internal directories.
Click to hide internal directories.