airshipctl/pkg/clusterctl/client/errors.go
Dmitry Ukov 2540169bbc Introduce executor for clusterctl init phase
Change-Id: I220926514e985c6292aa46d319407711328f7987
2020-08-19 15:28:01 +04:00

49 lines
1.4 KiB
Go

/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package client
import (
"fmt"
)
// ErrProviderNotDefined is returned when wrong AuthType is provided
type ErrProviderNotDefined struct {
ProviderName string
}
func (e ErrProviderNotDefined) Error() string {
return fmt.Sprintf("provider %s is not defined in Clusterctl document", e.ProviderName)
}
// ErrProviderRepoNotFound is returned when wrong AuthType is provided
type ErrProviderRepoNotFound struct {
ProviderName string
ProviderType string
}
func (e ErrProviderRepoNotFound) Error() string {
return fmt.Sprintf("failed to find repository for provider %s of type %s", e.ProviderName, e.ProviderType)
}
// ErrUnknownExecutorAction is returned for unknown action parameter
// in clusterctl configuration document
type ErrUnknownExecutorAction struct {
Action string
}
func (e ErrUnknownExecutorAction) Error() string {
return fmt.Sprintf("unknown action type '%s'", e.Action)
}