Documentation
¶
Index ¶
- Constants
- type Error
- func (r *Error) Error() string
- func (r *Error) GetGoogleAPIError() (*googleapi.Error, error)
- func (r *Error) GetGoogleRPCBadRequest() (*errdetails.BadRequest, error)
- func (r *Error) GetGoogleRPCDebugInfo() (*errdetails.DebugInfo, error)
- func (r *Error) GetGoogleRPCErrorInfo() (*errdetails.ErrorInfo, error)
- func (r *Error) GetGoogleRPCHelp() (*errdetails.Help, error)
- func (r *Error) GetGoogleRPCPreconditionFailure() (*errdetails.PreconditionFailure, error)
- func (r *Error) GetGoogleRPCQuotaFailure() (*errdetails.QuotaFailure, error)
- func (r *Error) GetGoogleRPCRetryInfo() (*errdetails.RetryInfo, error)
- func (r *Error) GetReInterpretedErrors() (string, error)
- func (r *Error) GetStatus() (*status.Status, error)
- func (r *Error) IsGoogleAPIError() bool
- func (r *Error) IsStatusError() bool
- type ReInterpretedError
Constants ¶
View Source
const (
// env-var variable that automatically enables returning the embedded details
GOOGLE_ENABLE_ERROR_DETAIL = "GOOGLE_ENABLE_ERROR_DETAIL"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct { Err error PrettyPrint bool ReInterpret bool // contains filtered or unexported fields }
Error contains an error response from the server.
func (*Error) GetGoogleAPIError ¶
GetGoogleAPIError returns base googleauis.Error
func (*Error) GetGoogleRPCBadRequest ¶
func (r *Error) GetGoogleRPCBadRequest() (*errdetails.BadRequest, error)
GetGoogleRPCBadRequest returns google.rpc.BadRequest
func (*Error) GetGoogleRPCDebugInfo ¶
func (r *Error) GetGoogleRPCDebugInfo() (*errdetails.DebugInfo, error)
GetGoogleRPCDebugInfo returns google.rpc.DebugInfo
func (*Error) GetGoogleRPCErrorInfo ¶
func (r *Error) GetGoogleRPCErrorInfo() (*errdetails.ErrorInfo, error)
GetGoogleRPCErrorInfo returns google.rpc.ErrorInfo
func (*Error) GetGoogleRPCHelp ¶
func (r *Error) GetGoogleRPCHelp() (*errdetails.Help, error)
GetGoogleRPCHelp returns google.rpc.Help
func (*Error) GetGoogleRPCPreconditionFailure ¶
func (r *Error) GetGoogleRPCPreconditionFailure() (*errdetails.PreconditionFailure, error)
GetGoogleRPCPreconditionFailure returns google.rpc.PreconditionFailure
func (*Error) GetGoogleRPCQuotaFailure ¶
func (r *Error) GetGoogleRPCQuotaFailure() (*errdetails.QuotaFailure, error)
GetGoogleRPCQuotaFailure returns google.rpc.QuotaFailure
func (*Error) GetGoogleRPCRetryInfo ¶
func (r *Error) GetGoogleRPCRetryInfo() (*errdetails.RetryInfo, error)
GetGoogleRPCRetryInfo returns google.rpc.RetryInfo
func (*Error) GetReInterpretedErrors ¶
GetReInterpretedErrors returns []ReInterpretedError
func (*Error) IsGoogleAPIError ¶
func (*Error) IsStatusError ¶
type ReInterpretedError ¶
type ReInterpretedError struct { Client string `json:"client"` Context string `json:"context,omitempty"` Domain string `json:"domain,omitempty"` Reason string `json:"reason,omitempty"` Key string `json:"key,omitempty"` Value string `json:"value,omitempty"` Description string `json:"description,omitempty"` }
ReInterpretedError represents an error added in locally
Click to show internal directories.
Click to hide internal directories.