errors

package
v0.0.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RPCStatusBadRequest          = "type.googleapis.com/google.rpc.BadRequest"
	RPCStatusDebugInfo           = "type.googleapis.com/google.rpc.DebugInfo"
	RPCStatusErrorInfo           = "type.googleapis.com/google.rpc.ErrorInfo"
	RPCStatusHelp                = "type.googleapis.com/google.rpc.Help"
	RPCStatusPreconditionFailure = "type.googleapis.com/google.rpc.PreconditionFailure"
	RPCStatusQuotaFailure        = "type.googleapis.com/google.rpc.QuotaFailure"
	RPCStatusRetryInfo           = "type.googleapis.com/google.rpc.RetryInfo"
)

Variables

View Source
var PkgVersionErr = regexp.MustCompile(`^plugin\.Open\("(.*)"\).*plugin was built with a different version of package (.*)$`)

Functions

func CheckError

func CheckError(err error)

CheckError is the top-level error handler

func CheckPluginError added in v0.0.15

func CheckPluginError(err error) error

CheckPluginError checks an error generated while loading plugins. If the error is an issue with the plugin, the error is logged, the plugin is not loaded, nil is returned, and execution continues. If it is an unhandled error, it is returned and execution is halted.

func CheckRevertGcloudConfigError

func CheckRevertGcloudConfigError(err error)

CheckRevertGcloudConfigError prompts the user to manually reset their gcloud config if eiam failed to do so.

Types

type EiamError added in v0.0.15

type EiamError struct {
	Err error
	Log *logrus.Entry
	Msg string
}

func (EiamError) Error added in v0.0.15

func (e EiamError) Error() string

type SDKClientCreateError

type SDKClientCreateError struct {
	Err            error
	ResourceType   string
	ServiceAccount string
}

SDKClientCreateError is used for errors caused when attempting to create a GCP SDK client/service.

func (*SDKClientCreateError) Error

func (e *SDKClientCreateError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL