Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthError ¶
type AuthError struct { ServerError Token string }
AuthError result from bad auth.
func (AuthError) GRPCResponseCode ¶
GRPCResponseCode returns a gRPC response code.
func (AuthError) HTTPResponseCode ¶
HTTPResponseCode returns an HTTP response code.
type BadArgumentError ¶
type BadArgumentError struct { ServerError Err error }
BadArgumentError result from bad inputs.
func (BadArgumentError) Error ¶
func (e BadArgumentError) Error() string
Error returns the string error.
func (BadArgumentError) GRPCResponseCode ¶
func (e BadArgumentError) GRPCResponseCode() codes.Code
GRPCResponseCode returns a gRPC response code.
func (BadArgumentError) HTTPResponseCode ¶
func (e BadArgumentError) HTTPResponseCode() int
HTTPResponseCode returns an HTTP response code.
type RedisError ¶
type RedisError struct { ServerError Err error }
RedisError result from Redis issues.
func (RedisError) GRPCResponseCode ¶
func (e RedisError) GRPCResponseCode() codes.Code
GRPCResponseCode returns a gRPC response code.
func (RedisError) HTTPResponseCode ¶
func (e RedisError) HTTPResponseCode() int
HTTPResponseCode returns an HTTP response code.
type ServerError ¶
ServerError defines a server error interface.
func ErrorToServerError ¶
func ErrorToServerError(err error) ServerError
ErrorToServerError will attempt to convert a standard error to a ServerError. If unable to do so, it will return an UnknownError.
func NewAuthError ¶
func NewAuthError(token string) ServerError
NewAuthError creates a new ServerError for auth related errors.
func NewBadArgumentError ¶
func NewBadArgumentError(err error) ServerError
NewBadArgumentError creates a new ServerError for bad inputs.
func NewRedisError ¶
func NewRedisError(err error) ServerError
NewRedisError creates a new ServerError for Redis related errors.
func NewUnknownError ¶
func NewUnknownError(err error) ServerError
NewUnknownError creates a new ServerError for unknown errors.
type UnknownError ¶
type UnknownError struct { ServerError Err error }
UnknownError result from bad inputs.
func (UnknownError) GRPCResponseCode ¶
func (e UnknownError) GRPCResponseCode() codes.Code
GRPCResponseCode returns a gRPC response code.
func (UnknownError) HTTPResponseCode ¶
func (e UnknownError) HTTPResponseCode() int
HTTPResponseCode returns an HTTP response code.