Documentation ¶
Overview ¶
Package rkerror defines RK style API errors.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorAMZN ¶ added in v2.2.0
type ErrorAMZN struct { Resp struct { Errors []*ErrorElementAMZN `json:"errors" yaml:"errors"` } `json:"response" yaml:"response"` }
type ErrorBuilder ¶ added in v2.2.0
type ErrorBuilder interface { New(code int, msg string, details ...interface{}) ErrorInterface NewCustom() ErrorInterface }
func NewErrorBuilderAMZN ¶ added in v2.2.0
func NewErrorBuilderAMZN() ErrorBuilder
func NewErrorBuilderGoogle ¶ added in v2.2.0
func NewErrorBuilderGoogle() ErrorBuilder
type ErrorBuilderAMZN ¶ added in v2.2.0
type ErrorBuilderAMZN struct{}
func (*ErrorBuilderAMZN) New ¶ added in v2.2.0
func (e *ErrorBuilderAMZN) New(code int, msg string, details ...interface{}) ErrorInterface
func (*ErrorBuilderAMZN) NewCustom ¶ added in v2.2.0
func (e *ErrorBuilderAMZN) NewCustom() ErrorInterface
type ErrorBuilderGoogle ¶ added in v2.2.0
type ErrorBuilderGoogle struct{}
func (*ErrorBuilderGoogle) New ¶ added in v2.2.0
func (e *ErrorBuilderGoogle) New(code int, msg string, details ...interface{}) ErrorInterface
func (*ErrorBuilderGoogle) NewCustom ¶ added in v2.2.0
func (e *ErrorBuilderGoogle) NewCustom() ErrorInterface
type ErrorElementAMZN ¶ added in v2.2.0
type ErrorElementAMZN struct { Err struct { Code int `json:"code" yaml:"code" example:"500"` Status string `json:"status" yaml:"status" example:"Internal Server Error"` Message string `json:"message" yaml:"message" example:"Internal error occurs"` Details []interface{} `json:"details" yaml:"details"` } `json:"error" json:"error"` }
type ErrorGoogle ¶ added in v2.2.0
type ErrorGoogle struct { Err struct { Code int `json:"code" yaml:"code" example:"500"` Status string `json:"status" yaml:"status" example:"Internal Server Error"` Message string `json:"message" yaml:"message" example:"Internal error occurs"` Details []interface{} `json:"details" yaml:"details"` } `json:"error" yaml:"error"` }
ErrorGoogle is standard google style error Referred google style: https://cloud.google.com/apis/design/errors
func (*ErrorGoogle) Code ¶ added in v2.2.0
func (err *ErrorGoogle) Code() int
func (*ErrorGoogle) Details ¶ added in v2.2.0
func (err *ErrorGoogle) Details() []interface{}
func (*ErrorGoogle) Error ¶ added in v2.2.0
func (err *ErrorGoogle) Error() string
Error returns string of error
func (*ErrorGoogle) Message ¶ added in v2.2.0
func (err *ErrorGoogle) Message() string
type ErrorInterface ¶ added in v2.2.0
Click to show internal directories.
Click to hide internal directories.