rustegon 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- rustegon/__init__.py +129 -0
- rustegon/_decimal128.py +102 -0
- rustegon/_error_table.py +83 -0
- rustegon/_ops.py +591 -0
- rustegon/_pb/__init__.py +3 -0
- rustegon/_pb/admin_pb2.py +117 -0
- rustegon/_pb/admin_pb2.pyi +1077 -0
- rustegon/_pb/admin_pb2_grpc.py +767 -0
- rustegon/_pb/admin_pb2_grpc.pyi +249 -0
- rustegon/_pb/auth_pb2.py +55 -0
- rustegon/_pb/auth_pb2.pyi +274 -0
- rustegon/_pb/auth_pb2_grpc.py +219 -0
- rustegon/_pb/auth_pb2_grpc.pyi +117 -0
- rustegon/_pb/backup_pb2.py +94 -0
- rustegon/_pb/backup_pb2.pyi +858 -0
- rustegon/_pb/backup_pb2_grpc.py +476 -0
- rustegon/_pb/backup_pb2_grpc.pyi +192 -0
- rustegon/_pb/common_pb2.py +52 -0
- rustegon/_pb/common_pb2.pyi +243 -0
- rustegon/_pb/common_pb2_grpc.py +24 -0
- rustegon/_pb/common_pb2_grpc.pyi +22 -0
- rustegon/_pb/document_pb2.py +99 -0
- rustegon/_pb/document_pb2.pyi +1095 -0
- rustegon/_pb/document_pb2_grpc.py +421 -0
- rustegon/_pb/document_pb2_grpc.pyi +159 -0
- rustegon/_pb/error_pb2.py +40 -0
- rustegon/_pb/error_pb2.pyi +98 -0
- rustegon/_pb/error_pb2_grpc.py +24 -0
- rustegon/_pb/error_pb2_grpc.pyi +22 -0
- rustegon/_pb/query_ast_pb2.py +294 -0
- rustegon/_pb/query_ast_pb2.pyi +4548 -0
- rustegon/_pb/query_ast_pb2_grpc.py +24 -0
- rustegon/_pb/query_ast_pb2_grpc.pyi +22 -0
- rustegon/_pb/query_pb2.py +74 -0
- rustegon/_pb/query_pb2.pyi +544 -0
- rustegon/_pb/query_pb2_grpc.py +251 -0
- rustegon/_pb/query_pb2_grpc.pyi +117 -0
- rustegon/_pb/schema_pb2.py +132 -0
- rustegon/_pb/schema_pb2.pyi +1130 -0
- rustegon/_pb/schema_pb2_grpc.py +726 -0
- rustegon/_pb/schema_pb2_grpc.pyi +240 -0
- rustegon/_pb/session_pb2.py +44 -0
- rustegon/_pb/session_pb2.pyi +110 -0
- rustegon/_pb/session_pb2_grpc.py +146 -0
- rustegon/_pb/session_pb2_grpc.pyi +78 -0
- rustegon/_pb/transaction_pb2.py +60 -0
- rustegon/_pb/transaction_pb2.pyi +300 -0
- rustegon/_pb/transaction_pb2_grpc.py +283 -0
- rustegon/_pb/transaction_pb2_grpc.pyi +117 -0
- rustegon/_scram.py +130 -0
- rustegon/_version.py +5 -0
- rustegon/builders.py +630 -0
- rustegon/client.py +1095 -0
- rustegon/errors.py +208 -0
- rustegon/extjson.py +427 -0
- rustegon/mapping.py +448 -0
- rustegon/py.typed +0 -0
- rustegon/rdoc.py +443 -0
- rustegon/session.py +49 -0
- rustegon/settings.py +368 -0
- rustegon/sync.py +364 -0
- rustegon/types.py +223 -0
- rustegon-0.1.0.dist-info/METADATA +90 -0
- rustegon-0.1.0.dist-info/RECORD +65 -0
- rustegon-0.1.0.dist-info/WHEEL +4 -0
rustegon/__init__.py
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
# Copyright The Rustegon Authors
|
|
3
|
+
"""The official Python driver of the Rustegon document database (python-driver.md).
|
|
4
|
+
|
|
5
|
+
``AsyncRustegonClient`` is the asyncio API; ``RustegonClient`` the blocking facade over it
|
|
6
|
+
(PD-170). Both take ``ClientSettings`` or a ``rustegon://`` connection string.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from rustegon._version import __version__
|
|
10
|
+
from rustegon.builders import BulkOperation, Filter, IndexKey, Projection, Sort, Update, Updates
|
|
11
|
+
from rustegon.client import (
|
|
12
|
+
AsyncCollection,
|
|
13
|
+
AsyncCursor,
|
|
14
|
+
AsyncDatabase,
|
|
15
|
+
AsyncFind,
|
|
16
|
+
AsyncRustegonClient,
|
|
17
|
+
AsyncTransaction,
|
|
18
|
+
BulkWriteError,
|
|
19
|
+
BulkWriteResult,
|
|
20
|
+
DeleteResult,
|
|
21
|
+
IndexInfo,
|
|
22
|
+
IndexState,
|
|
23
|
+
InsertManyResult,
|
|
24
|
+
InsertOneResult,
|
|
25
|
+
IsolationLevel,
|
|
26
|
+
ServerInfo,
|
|
27
|
+
TransactionOptions,
|
|
28
|
+
UpdateResult,
|
|
29
|
+
Validator,
|
|
30
|
+
)
|
|
31
|
+
from rustegon.errors import (
|
|
32
|
+
AuthenticationException,
|
|
33
|
+
AuthorizationException,
|
|
34
|
+
CommitOutcomeUnknownException,
|
|
35
|
+
DocumentValidationException,
|
|
36
|
+
DuplicateKeyException,
|
|
37
|
+
PasswordChangeRequiredException,
|
|
38
|
+
QuerySyntaxException,
|
|
39
|
+
RateLimitedException,
|
|
40
|
+
RDocError,
|
|
41
|
+
RustegonClientException,
|
|
42
|
+
RustegonException,
|
|
43
|
+
RustegonServerException,
|
|
44
|
+
RustegonTimeoutException,
|
|
45
|
+
TransactionAbortedException,
|
|
46
|
+
TransactionConflictException,
|
|
47
|
+
UnavailableException,
|
|
48
|
+
)
|
|
49
|
+
from rustegon.session import ClientSession
|
|
50
|
+
from rustegon.settings import ClientSettings, Credential, ReadConsistency, WriteConcern
|
|
51
|
+
from rustegon.sync import Collection, Cursor, Database, Find, RustegonClient, Transaction
|
|
52
|
+
from rustegon.types import (
|
|
53
|
+
MAX_KEY,
|
|
54
|
+
MIN_KEY,
|
|
55
|
+
Binary,
|
|
56
|
+
Counter,
|
|
57
|
+
DatetimeMs,
|
|
58
|
+
MaxKey,
|
|
59
|
+
MinKey,
|
|
60
|
+
ObjectId,
|
|
61
|
+
Timestamp,
|
|
62
|
+
Vector,
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
__all__ = [
|
|
66
|
+
"MAX_KEY",
|
|
67
|
+
"MIN_KEY",
|
|
68
|
+
"AsyncCollection",
|
|
69
|
+
"AsyncCursor",
|
|
70
|
+
"AsyncDatabase",
|
|
71
|
+
"AsyncFind",
|
|
72
|
+
"AsyncRustegonClient",
|
|
73
|
+
"AsyncTransaction",
|
|
74
|
+
"AuthenticationException",
|
|
75
|
+
"AuthorizationException",
|
|
76
|
+
"Binary",
|
|
77
|
+
"BulkOperation",
|
|
78
|
+
"BulkWriteError",
|
|
79
|
+
"BulkWriteResult",
|
|
80
|
+
"ClientSession",
|
|
81
|
+
"ClientSettings",
|
|
82
|
+
"Collection",
|
|
83
|
+
"CommitOutcomeUnknownException",
|
|
84
|
+
"Counter",
|
|
85
|
+
"Credential",
|
|
86
|
+
"Cursor",
|
|
87
|
+
"Database",
|
|
88
|
+
"DatetimeMs",
|
|
89
|
+
"DeleteResult",
|
|
90
|
+
"DocumentValidationException",
|
|
91
|
+
"DuplicateKeyException",
|
|
92
|
+
"Filter",
|
|
93
|
+
"Find",
|
|
94
|
+
"IndexInfo",
|
|
95
|
+
"IndexKey",
|
|
96
|
+
"IndexState",
|
|
97
|
+
"InsertManyResult",
|
|
98
|
+
"InsertOneResult",
|
|
99
|
+
"IsolationLevel",
|
|
100
|
+
"MaxKey",
|
|
101
|
+
"MinKey",
|
|
102
|
+
"ObjectId",
|
|
103
|
+
"PasswordChangeRequiredException",
|
|
104
|
+
"Projection",
|
|
105
|
+
"QuerySyntaxException",
|
|
106
|
+
"RDocError",
|
|
107
|
+
"RateLimitedException",
|
|
108
|
+
"ReadConsistency",
|
|
109
|
+
"RustegonClient",
|
|
110
|
+
"RustegonClientException",
|
|
111
|
+
"RustegonException",
|
|
112
|
+
"RustegonServerException",
|
|
113
|
+
"RustegonTimeoutException",
|
|
114
|
+
"ServerInfo",
|
|
115
|
+
"Sort",
|
|
116
|
+
"Timestamp",
|
|
117
|
+
"Transaction",
|
|
118
|
+
"TransactionAbortedException",
|
|
119
|
+
"TransactionConflictException",
|
|
120
|
+
"TransactionOptions",
|
|
121
|
+
"UnavailableException",
|
|
122
|
+
"Update",
|
|
123
|
+
"UpdateResult",
|
|
124
|
+
"Updates",
|
|
125
|
+
"Validator",
|
|
126
|
+
"Vector",
|
|
127
|
+
"WriteConcern",
|
|
128
|
+
"__version__",
|
|
129
|
+
]
|
rustegon/_decimal128.py
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
# Copyright The Rustegon Authors
|
|
3
|
+
"""IEEE 754-2008 decimal128, binary integer decimal (BID) encoding (data-model.md §2, §4).
|
|
4
|
+
|
|
5
|
+
``decimal.Decimal`` keeps the cohort (``12.50`` stays ``12.50``) and its ``str`` is IEEE
|
|
6
|
+
"to-scientific-string", so it is the Python type of decimal128; this module converts it to and
|
|
7
|
+
from the 16 bytes (u128 little-endian) of RDoc.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from __future__ import annotations
|
|
11
|
+
|
|
12
|
+
import re
|
|
13
|
+
from decimal import Decimal
|
|
14
|
+
from typing import Final
|
|
15
|
+
|
|
16
|
+
MAX_COEFFICIENT: Final = 10**34 - 1
|
|
17
|
+
EXP_MIN: Final = -6176
|
|
18
|
+
EXP_MAX: Final = 6111
|
|
19
|
+
_BIAS: Final = 6176
|
|
20
|
+
_SMALL_COEFF_MASK: Final = (1 << 113) - 1
|
|
21
|
+
_NAN: Final = 0x7C << 120
|
|
22
|
+
_INF: Final = 0x78 << 120
|
|
23
|
+
_SIGN: Final = 1 << 127
|
|
24
|
+
|
|
25
|
+
# IEEE 754 decimal character sequence (no whitespace, no underscores: stricter than Decimal()).
|
|
26
|
+
_SYNTAX: Final = re.compile(
|
|
27
|
+
r"[+-]?(?:(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?|[Ii][Nn][Ff](?:[Ii][Nn][Ii][Tt][Yy])?|[Nn][Aa][Nn])",
|
|
28
|
+
re.ASCII,
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class Decimal128Error(ValueError):
|
|
33
|
+
"""A decimal that decimal128 cannot hold exactly."""
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def parse(text: str) -> Decimal:
|
|
37
|
+
"""The decimal of an IEEE decimal string; refuses what decimal128 cannot hold exactly."""
|
|
38
|
+
if not _SYNTAX.fullmatch(text):
|
|
39
|
+
raise Decimal128Error(f"not a decimal: {text!r}")
|
|
40
|
+
d = Decimal(text)
|
|
41
|
+
encode(d) # range and precision check
|
|
42
|
+
return d
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def encode(value: Decimal) -> bytes:
|
|
46
|
+
"""The canonical BID bytes of ``value`` (exact: never rounds)."""
|
|
47
|
+
if value.is_nan():
|
|
48
|
+
if value.is_snan():
|
|
49
|
+
raise Decimal128Error("signalling NaN is not a decimal128 value")
|
|
50
|
+
return _NAN.to_bytes(16, "little")
|
|
51
|
+
sign = _SIGN if value.is_signed() else 0
|
|
52
|
+
if value.is_infinite():
|
|
53
|
+
return (sign | _INF).to_bytes(16, "little")
|
|
54
|
+
t = value.as_tuple()
|
|
55
|
+
coefficient = int("".join(map(str, t.digits)) or "0")
|
|
56
|
+
if not isinstance(t.exponent, int): # pragma: no cover - finite values have an int exponent
|
|
57
|
+
raise Decimal128Error("unexpected special value")
|
|
58
|
+
exponent: int = t.exponent
|
|
59
|
+
# Exact only: drop trailing zeros while the coefficient is too long, then bring the
|
|
60
|
+
# exponent into range by adding or removing zeros (IEEE clamping; data-model.md §2 notes).
|
|
61
|
+
while coefficient > MAX_COEFFICIENT and coefficient % 10 == 0:
|
|
62
|
+
coefficient //= 10
|
|
63
|
+
exponent += 1
|
|
64
|
+
if coefficient > MAX_COEFFICIENT:
|
|
65
|
+
raise Decimal128Error("more than 34 significant digits")
|
|
66
|
+
if coefficient == 0:
|
|
67
|
+
exponent = min(max(exponent, EXP_MIN), EXP_MAX)
|
|
68
|
+
while exponent > EXP_MAX:
|
|
69
|
+
coefficient *= 10
|
|
70
|
+
exponent -= 1
|
|
71
|
+
if coefficient > MAX_COEFFICIENT:
|
|
72
|
+
raise Decimal128Error("exponent out of the decimal128 range")
|
|
73
|
+
while exponent < EXP_MIN:
|
|
74
|
+
if coefficient % 10 != 0:
|
|
75
|
+
raise Decimal128Error("exponent out of the decimal128 range")
|
|
76
|
+
coefficient //= 10
|
|
77
|
+
exponent += 1
|
|
78
|
+
bits = sign | ((exponent + _BIAS) << 113) | coefficient
|
|
79
|
+
return bits.to_bytes(16, "little")
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def decode(raw: bytes) -> Decimal:
|
|
83
|
+
"""The decimal of 16 BID bytes; non-canonical encodings are normalised (IEEE rules)."""
|
|
84
|
+
bits = int.from_bytes(raw, "little")
|
|
85
|
+
negative = bool(bits & _SIGN)
|
|
86
|
+
top5 = (bits >> 122) & 0x1F
|
|
87
|
+
if top5 == 0x1F:
|
|
88
|
+
return Decimal("NaN")
|
|
89
|
+
if top5 == 0x1E:
|
|
90
|
+
return Decimal("-Infinity" if negative else "Infinity")
|
|
91
|
+
if (bits >> 125) & 0x3 == 0x3:
|
|
92
|
+
# Large-coefficient form: the coefficient is >= 2^113 > 10^34 - 1, i.e. non-canonical: 0.
|
|
93
|
+
biased = (bits >> 111) & 0x3FFF
|
|
94
|
+
coefficient = 0
|
|
95
|
+
else:
|
|
96
|
+
biased = (bits >> 113) & 0x3FFF
|
|
97
|
+
coefficient = bits & _SMALL_COEFF_MASK
|
|
98
|
+
if coefficient > MAX_COEFFICIENT:
|
|
99
|
+
coefficient = 0
|
|
100
|
+
exponent = min(biased, EXP_MAX + _BIAS) - _BIAS
|
|
101
|
+
digits = tuple(int(c) for c in str(coefficient))
|
|
102
|
+
return Decimal((1 if negative else 0, digits, exponent))
|
rustegon/_error_table.py
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
# Copyright The Rustegon Authors
|
|
3
|
+
|
|
4
|
+
"""Error table generated from drivers/conformance/generated/errors.json - do not edit.
|
|
5
|
+
|
|
6
|
+
Regenerate with ``python scripts/generate.py`` (PD-075, PD-171).
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from typing import Final
|
|
10
|
+
|
|
11
|
+
# code -> (name, errors-map.yaml class id, gRPC status name, catalog retryable: yes|no|depends)
|
|
12
|
+
CODES: Final[dict[int, tuple[str, str, str, str]]] = {
|
|
13
|
+
1001: ("InvalidArgument", "Client", "INVALID_ARGUMENT", "no"),
|
|
14
|
+
1002: ("DocumentTooLarge", "Client", "INVALID_ARGUMENT", "no"),
|
|
15
|
+
1003: ("NestingTooDeep", "Client", "INVALID_ARGUMENT", "no"),
|
|
16
|
+
1004: ("InvalidFieldName", "Client", "INVALID_ARGUMENT", "no"),
|
|
17
|
+
1005: ("DuplicateKey", "DuplicateKey", "ALREADY_EXISTS", "no"),
|
|
18
|
+
1006: ("SchemaValidationFailed", "DocumentValidation", "INVALID_ARGUMENT", "no"),
|
|
19
|
+
1007: ("PartitionTooLarge", "Client", "FAILED_PRECONDITION", "no"),
|
|
20
|
+
1008: ("IndexKeyTooLarge", "Client", "INVALID_ARGUMENT", "no"),
|
|
21
|
+
1009: ("CounterOverflow", "Client", "OUT_OF_RANGE", "no"),
|
|
22
|
+
1010: ("QuerySyntaxError", "QuerySyntax", "INVALID_ARGUMENT", "no"),
|
|
23
|
+
1011: ("QueryTypeError", "QuerySyntax", "INVALID_ARGUMENT", "no"),
|
|
24
|
+
1012: ("UnknownFunction", "QuerySyntax", "INVALID_ARGUMENT", "no"),
|
|
25
|
+
1013: ("QueryTooComplex", "Client", "INVALID_ARGUMENT", "no"),
|
|
26
|
+
1020: ("IndexAlreadyExists", "Client", "ALREADY_EXISTS", "no"),
|
|
27
|
+
1021: ("IndexNotFound", "Client", "NOT_FOUND", "no"),
|
|
28
|
+
1022: ("IndexBuildFailed", "Client", "FAILED_PRECONDITION", "no"),
|
|
29
|
+
1023: ("IndexLimitExceeded", "Client", "RESOURCE_EXHAUSTED", "no"),
|
|
30
|
+
1024: ("IndexStaleTimeout", "Timeout", "DEADLINE_EXCEEDED", "yes"),
|
|
31
|
+
1025: ("MultikeyCompoundArrays", "Client", "INVALID_ARGUMENT", "no"),
|
|
32
|
+
1030: ("NotFound", "Client", "NOT_FOUND", "no"),
|
|
33
|
+
1031: ("AlreadyExists", "Client", "ALREADY_EXISTS", "no"),
|
|
34
|
+
1032: ("ResumeTokenExpired", "Client", "OUT_OF_RANGE", "no"),
|
|
35
|
+
1033: ("SchemaChangeInProgress", "Client", "ABORTED", "yes"),
|
|
36
|
+
1034: ("DescriptorVersionMismatch", "Server", "ABORTED", "yes"),
|
|
37
|
+
1040: ("InvalidVector", "Client", "INVALID_ARGUMENT", "no"),
|
|
38
|
+
1041: ("InvalidGeometry", "Client", "INVALID_ARGUMENT", "no"),
|
|
39
|
+
2001: ("TransactionConflict", "TransactionConflict", "ABORTED", "yes"),
|
|
40
|
+
2002: ("TransactionAborted", "TransactionAborted", "ABORTED", "conditional"),
|
|
41
|
+
2003: ("TransactionTimeout", "Timeout", "DEADLINE_EXCEEDED", "no"),
|
|
42
|
+
2004: ("TransactionTooLarge", "Client", "RESOURCE_EXHAUSTED", "no"),
|
|
43
|
+
2005: ("DeadlockDetected", "TransactionConflict", "ABORTED", "yes"),
|
|
44
|
+
2006: ("CommitOutcomeUnknown", "CommitOutcomeUnknown", "UNKNOWN", "conditional"),
|
|
45
|
+
2007: ("ReadTimestampTooOld", "TransactionConflict", "ABORTED", "yes"),
|
|
46
|
+
2008: ("WriteTooOld", "TransactionConflict", "ABORTED", "yes"),
|
|
47
|
+
2009: ("PreconditionFailed", "Client", "FAILED_PRECONDITION", "no"),
|
|
48
|
+
3001: ("NotLeaseholder", "Unavailable", "UNAVAILABLE", "yes"),
|
|
49
|
+
3002: ("Unavailable", "Unavailable", "UNAVAILABLE", "yes"),
|
|
50
|
+
3003: ("RangeKeyMismatch", "Unavailable", "UNAVAILABLE", "yes"),
|
|
51
|
+
3004: ("NodeDraining", "Unavailable", "UNAVAILABLE", "yes"),
|
|
52
|
+
3005: ("ClockOffsetExceeded", "Unavailable", "UNAVAILABLE", "yes"),
|
|
53
|
+
3006: ("WriteConcernTimeout", "Timeout", "DEADLINE_EXCEEDED", "no"),
|
|
54
|
+
3007: ("StaleReadUnavailable", "Unavailable", "UNAVAILABLE", "yes"),
|
|
55
|
+
4001: ("Unauthenticated", "Authentication", "UNAUTHENTICATED", "no"),
|
|
56
|
+
4002: ("PermissionDenied", "Authorization", "PERMISSION_DENIED", "no"),
|
|
57
|
+
4003: ("RateLimited", "RateLimited", "RESOURCE_EXHAUSTED", "yes"),
|
|
58
|
+
4004: ("TlsRequired", "Authentication", "FAILED_PRECONDITION", "no"),
|
|
59
|
+
4005: ("SessionExpired", "Authentication", "UNAUTHENTICATED", "yes"),
|
|
60
|
+
4006: ("KeyUnavailable", "Server", "FAILED_PRECONDITION", "no"),
|
|
61
|
+
4007: ("AccountLocked", "Authentication", "PERMISSION_DENIED", "no"),
|
|
62
|
+
5001: ("Internal", "Server", "INTERNAL", "no"),
|
|
63
|
+
5002: ("StorageCorruption", "Server", "DATA_LOSS", "no"),
|
|
64
|
+
5003: ("DiskFull", "Server", "RESOURCE_EXHAUSTED", "yes"),
|
|
65
|
+
5004: ("ResourceExhausted", "Server", "RESOURCE_EXHAUSTED", "yes"),
|
|
66
|
+
5005: ("Cancelled", "Server", "CANCELLED", "no"),
|
|
67
|
+
5006: ("DeadlineExceeded", "Timeout", "DEADLINE_EXCEEDED", "no"),
|
|
68
|
+
5007: ("VersionIncompatible", "Client", "FAILED_PRECONDITION", "no"),
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
# gRPC status name -> (class id, synthesized code, retryable) for failures without ErrorDetail
|
|
72
|
+
TRANSPORT: Final[dict[str, tuple[str, int, bool]]] = {
|
|
73
|
+
"UNKNOWN": ("Server", 5001, False),
|
|
74
|
+
"DEADLINE_EXCEEDED": ("Timeout", 5006, False),
|
|
75
|
+
"PERMISSION_DENIED": ("Authorization", 4002, False),
|
|
76
|
+
"RESOURCE_EXHAUSTED": ("Server", 5004, True),
|
|
77
|
+
"INTERNAL": ("Server", 5001, False),
|
|
78
|
+
"UNAVAILABLE": ("Unavailable", 3002, True),
|
|
79
|
+
"UNAUTHENTICATED": ("Authentication", 4001, False),
|
|
80
|
+
"default": ("Server", 5001, False),
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
UNKNOWN: Final = "Base"
|