Documentation ¶
Index ¶
- func BadRequestStatus(format string, args ...any) error
- func CheckSimilarPermission(assert *assert.Assertions, expected, actual *pb.Permission, ...)
- func InvalidArgumentError(msg string, f map[string]string) error
- func ParseAWSError(op string, err error) (st *status.Status, permission *pb.Permission)
- func TestAwsError(code, msg string) error
- func TestAwsHttpResponseError(code int, msg string) error
- func UnknownStatus(format string, args ...any) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BadRequestStatus ¶ added in v0.4.0
BadRequestStatus returns a status error with an invalid argument code
func CheckSimilarPermission ¶ added in v0.4.0
func CheckSimilarPermission(assert *assert.Assertions, expected, actual *pb.Permission, substituteNilWithDefaultOk bool)
func InvalidArgumentError ¶
InvalidArgumentError returns an grpc invalid argument status error.
func ParseAWSError ¶ added in v0.4.0
ParseAWSError converts an aws service error into a RPC status. This method will handle parsing the following aws error codes: throttling, connections, and credentials. This method will fallback to parsing the http status code when it cannot match an aws error code. This method does not handle specific service type errors such as S3 or EC2.
func TestAwsError ¶ added in v0.4.0
TestAwsError returns an generic api error
func TestAwsHttpResponseError ¶ added in v0.4.0
TestAwsHttpResponseError returns an aws http response error
func UnknownStatus ¶ added in v0.4.0
UnknownStatus returns a status error with an internal error code
Types ¶
This section is empty.