borgstore-based key/value store.
| 35 | |
| 36 | |
| 37 | class Repository: |
| 38 | """borgstore-based key/value store.""" |
| 39 | |
| 40 | class AlreadyExists(Error): |
| 41 | """A repository already exists at {}.""" |
| 42 | |
| 43 | exit_mcode = 10 |
| 44 | |
| 45 | class CheckNeeded(ErrorWithTraceback): |
| 46 | """Inconsistency detected. Please run "borg check {}".""" |
| 47 | |
| 48 | exit_mcode = 12 |
| 49 | |
| 50 | class DoesNotExist(Error): |
| 51 | """Repository {} does not exist.""" |
| 52 | |
| 53 | exit_mcode = 13 |
| 54 | |
| 55 | class InsufficientFreeSpaceError(Error): |
| 56 | """Insufficient free space to complete the transaction (required: {}, available: {}).""" |
| 57 | |
| 58 | exit_mcode = 14 |
| 59 | |
| 60 | class InvalidRepository(Error): |
| 61 | """{} is not a valid repository. Check the repository config.""" |
| 62 | |
| 63 | exit_mcode = 15 |
| 64 | |
| 65 | class InvalidRepositoryConfig(Error): |
| 66 | """{} does not have a valid config. Check the repository config [{}].""" |
| 67 | |
| 68 | exit_mcode = 16 |
| 69 | |
| 70 | class ObjectNotFound(ErrorWithTraceback): |
| 71 | """Object with key {} not found in repository {}.""" |
| 72 | |
| 73 | exit_mcode = 17 |
| 74 | |
| 75 | def __init__(self, id, repo): |
| 76 | if isinstance(id, bytes): |
| 77 | id = bin_to_hex(id) |
| 78 | super().__init__(id, repo) |
| 79 | |
| 80 | class ParentPathDoesNotExist(Error): |
| 81 | """The parent path of the repository directory [{}] does not exist.""" |
| 82 | |
| 83 | exit_mcode = 18 |
| 84 | |
| 85 | class PathAlreadyExists(Error): |
| 86 | """There is already something at {}.""" |
| 87 | |
| 88 | exit_mcode = 19 |
| 89 | |
| 90 | # StorageQuotaExceeded was exit_mcode = 20 |
| 91 | |
| 92 | class PathPermissionDenied(Error): |
| 93 | """Permission denied to {}.""" |
| 94 |
no outgoing calls