airshipctl/pkg/clusterctl/client/errors.go
Ruslan Aliev 71dc1d4703 Move clusterctl phase executor to a separate package
Having an executor within clusterctl.client package creates
potential import cycling. This patch moves it to a separate
package which can be used to conveniently store all the executors
at one place.

Change-Id: Ib0a6072a393e68885d9ef911aa2894a0de055668
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #374
2020-12-11 14:09:41 -06:00

39 lines
1.1 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)
}