Module spin_sdk.wit.imports.redis_types

Expand source code
from typing import TypeVar, Generic, Union, Optional, Union, Protocol, Tuple, List, Any, Self
from enum import Flag, Enum, auto
from dataclasses import dataclass
from abc import abstractmethod
import weakref

from ..types import Result, Ok, Err, Some


class Error(Enum):
    """
    General purpose error.
    """
    SUCCESS = 0
    ERROR = 1


@dataclass
class RedisParameterInt64:
    value: int


@dataclass
class RedisParameterBinary:
    value: bytes


RedisParameter = Union[RedisParameterInt64, RedisParameterBinary]
"""
A parameter type for the general-purpose `execute` function.
"""



@dataclass
class RedisResultNil:
    pass


@dataclass
class RedisResultStatus:
    value: str


@dataclass
class RedisResultInt64:
    value: int


@dataclass
class RedisResultBinary:
    value: bytes


RedisResult = Union[RedisResultNil, RedisResultStatus, RedisResultInt64, RedisResultBinary]
"""
A return type for the general-purpose `execute` function.
"""

Global variables

var RedisParameter

A parameter type for the general-purpose execute function.

var RedisResult

A return type for the general-purpose execute function.

Classes

class Error (*args, **kwds)

General purpose error.

Expand source code
class Error(Enum):
    """
    General purpose error.
    """
    SUCCESS = 0
    ERROR = 1

Ancestors

  • enum.Enum

Class variables

var ERROR
var SUCCESS
class RedisParameterBinary (value: bytes)

RedisParameterBinary(value: bytes)

Expand source code
@dataclass
class RedisParameterBinary:
    value: bytes

Class variables

var value : bytes
class RedisParameterInt64 (value: int)

RedisParameterInt64(value: int)

Expand source code
@dataclass
class RedisParameterInt64:
    value: int

Class variables

var value : int
class RedisResultBinary (value: bytes)

RedisResultBinary(value: bytes)

Expand source code
@dataclass
class RedisResultBinary:
    value: bytes

Class variables

var value : bytes
class RedisResultInt64 (value: int)

RedisResultInt64(value: int)

Expand source code
@dataclass
class RedisResultInt64:
    value: int

Class variables

var value : int
class RedisResultNil

RedisResultNil()

Expand source code
@dataclass
class RedisResultNil:
    pass
class RedisResultStatus (value: str)

RedisResultStatus(value: str)

Expand source code
@dataclass
class RedisResultStatus:
    value: str

Class variables

var value : str