Documentation ¶
Index ¶
- type Error
- type Type
- func AlreadyExists(code, message string) *Type
- func InternalServerError(code, message string) *Type
- func InvalidArgument(code, message string) *Type
- func InvalidRequestBody() *Type
- func NotFound(code, message string) *Type
- func NotImplemented() *Type
- func PreconditionFailed(code, message string) *Type
- func RequestTimeout(message string) *Type
- func ServiceUnavailable(message string) *Type
- func Unauthorized(message string) *Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Type ¶
type Type struct { FingerPrint string `json:"fingerprint"` Errors []Error `json:"errors"` HTTPStatusCode int `json:"status"` }
Type encapsulates a general error type that can be used in all layers.
func AlreadyExists ¶
AlreadyExists is a helper method that indicates the resource already exists.
func InternalServerError ¶
InternalServerError is a helper method that indicates an internal server error occurred.
func InvalidArgument ¶
InvalidArgument is a helper method that indicates the provided argument is not valid.
func InvalidRequestBody ¶
func InvalidRequestBody() *Type
InvalidRequestBody is a helper method that indicates the request body is not valid.
func NotImplemented ¶
func NotImplemented() *Type
NotImplemented is a helper method that indicates the service is not implemented yet.
func PreconditionFailed ¶
PreconditionFailed is a helper method that indicates some precondition failure.
func RequestTimeout ¶ added in v1.0.1
RequestTimeout is a helper method that indicates request timeout occurred.
func ServiceUnavailable ¶ added in v1.0.1
ServiceUnavailable is a helper method that indicates the server is not available for now.
func Unauthorized ¶
Unauthorized is a helper method that indicates the request is not authenticated.