Documentation ¶
Overview ¶
Copyright 2020-2021 The UnDistro authors
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
http://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.
Index ¶
- Constants
- func Code(err error) (string, bool)
- func IsConflict(err error) bool
- func IsFailedDependency(err error) bool
- func IsIgnorableSecurityGroupError(err error) error
- func IsInvalidNotFoundError(err error) bool
- func IsNotFound(err error) bool
- func IsResourceExists(err error) bool
- func IsSDKError(err error) (ok bool)
- func Message(err error) string
- func NewConflict(msg string) error
- func NewFailedDependency(msg string) error
- func NewNotFound(msg string) error
- func ReasonForError(err error) int
- type EC2Error
Constants ¶
const ( AuthFailure = "AuthFailure" InUseIPAddress = "InvalidIPAddress.InUse" GroupNotFound = "InvalidGroup.NotFound" PermissionNotFound = "InvalidPermission.NotFound" VPCNotFound = "InvalidVpcID.NotFound" SubnetNotFound = "InvalidSubnetID.NotFound" InternetGatewayNotFound = "InvalidInternetGatewayID.NotFound" NATGatewayNotFound = "InvalidNatGatewayID.NotFound" GatewayNotFound = "InvalidGatewayID.NotFound" EIPNotFound = "InvalidElasticIpID.NotFound" RouteTableNotFound = "InvalidRouteTableID.NotFound" LoadBalancerNotFound = "LoadBalancerNotFound" ResourceNotFound = "InvalidResourceID.NotFound" InvalidSubnet = "InvalidSubnet" AssociationIDNotFound = "InvalidAssociationID.NotFound" InvalidInstanceID = "InvalidInstanceID.NotFound" ResourceExists = "ResourceExistsException" NoCredentialProviders = "NoCredentialProviders" )
Variables ¶
This section is empty.
Functions ¶
func IsConflict ¶
IsConflict returns true if the error was created by NewConflict.
func IsFailedDependency ¶
IsFailedDependency checks if the error is pf http.StatusFailedDependency
func IsIgnorableSecurityGroupError ¶
IsIgnorableSecurityGroupError checks for errors in SG that can be ignored and then return nil.
func IsInvalidNotFoundError ¶
IsInvalidNotFoundError tests for common aws not found errors
func IsNotFound ¶
IsNotFound returns true if the error was created by NewNotFound.
func IsResourceExists ¶
func IsSDKError ¶
IsSDKError returns true if the error is of type awserr.Error.
func NewConflict ¶
NewConflict returns an error which indicates that the request cannot be processed due to a conflict.
func NewFailedDependency ¶
NewFailedDependency returns an error which indicates that a dependency failure status
func NewNotFound ¶
NewNotFound returns an error which indicates that the resource of the kind and the name was not found.
func ReasonForError ¶
ReasonForError returns the HTTP status for a particular error.