Documentation ¶
Overview ¶
Package status provides utility functions for google_rpc status objects.
Index ¶
- Variables
- func IsOK(status rpc.Status) bool
- func New(c rpc.Code) rpc.Status
- func String(status rpc.Status) string
- func WithCancelled(message string) rpc.Status
- func WithDeadlineExceeded(message string) rpc.Status
- func WithError(err error) rpc.Status
- func WithInternal(message string) rpc.Status
- func WithInvalidArgument(message string) rpc.Status
- func WithMessage(c rpc.Code, message string) rpc.Status
- func WithPermissionDenied(message string) rpc.Status
- func WithResourceExhausted(message string) rpc.Status
Constants ¶
This section is empty.
Variables ¶
OK represents a status with a code of rpc.OK
Functions ¶
func WithCancelled ¶
WithCancelled returns an initialized status with the rpc.CANCELLED error code and the error's message.
func WithDeadlineExceeded ¶
WithDeadlineExceeded returns an initialized status with the rpc.DEADLINE_EXCEEDED code and the given message.
func WithError ¶
WithError returns an initialized status with the rpc.INTERNAL error code and the error's message.
func WithInternal ¶
WithInternal returns an initialized status with the rpc.INTERNAL error code and the error's message.
func WithInvalidArgument ¶
WithInvalidArgument returns an initialized status with the rpc.INVALID_ARGUMENT code and the given message.
func WithMessage ¶
WithMessage returns an initialized status with the given error code and message
func WithPermissionDenied ¶
WithPermissionDenied returns an initialized status with the rpc.PERMISSION_DENIED code and the given message.
func WithResourceExhausted ¶
WithResourceExhausted returns an initialized status with the rpc.PERMISSION_DENIED code and the given message.
Types ¶
This section is empty.