yobi 0.1.0

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.
data/sig/yobi.rbs ADDED
@@ -0,0 +1,660 @@
1
+ module Yobi
2
+ VERSION: String
3
+
4
+ class Error < StandardError
5
+ end
6
+
7
+ class ExitError < SimpleDelegator
8
+ LINE_PATTERN: Regexp
9
+
10
+ def self.from_output: (ResticOutput output) -> ExitError?
11
+
12
+ def code: () -> String?
13
+
14
+ def message: () -> String?
15
+ end
16
+
17
+ class UnsupportedResticVersion < Error
18
+ attr_reader installed_version: String
19
+ attr_reader minimum_version: String
20
+
21
+ def initialize: (installed_version: String, minimum_version: String) -> void
22
+ end
23
+
24
+ class ResticNotFound < Error
25
+ attr_reader restic_path: String
26
+ attr_reader argv: Array[String]
27
+
28
+ def initialize: (restic_path: String, argv: Array[String]) -> void
29
+ end
30
+
31
+ type execution = { exit_code: Integer, output: ResticOutput, argv: Array[String] }
32
+
33
+ class ResticExecutionError < Error
34
+ attr_reader execution: execution
35
+ attr_reader exit_error: ExitError?
36
+
37
+ def initialize: (execution execution) -> void
38
+ end
39
+
40
+ class RepositoryNotFound < ResticExecutionError
41
+ end
42
+
43
+ class RepositoryLocked < ResticExecutionError
44
+ end
45
+
46
+ class AuthenticationFailed < ResticExecutionError
47
+ end
48
+
49
+ class ResticCommandFailed < ResticExecutionError
50
+ end
51
+
52
+ class MountTimeout < Error
53
+ attr_reader argv: Array[String]
54
+ attr_reader timeout: Numeric
55
+
56
+ def initialize: (argv: Array[String], timeout: Numeric) -> void
57
+ end
58
+
59
+ class ArgvBuilder
60
+ FLAGS: Hash[Symbol, String]
61
+ SHORT_FLAGS: Hash[Symbol, String]
62
+
63
+ def initialize: () -> void
64
+
65
+ def to_a: () -> Array[String]
66
+
67
+ def append: (*untyped values) -> self
68
+
69
+ def flag: (Symbol name, ?untyped value) -> self
70
+
71
+ def repeat_flag: (Symbol name, untyped values) -> self
72
+
73
+ def short_flag: (Symbol name) -> self
74
+
75
+ def end_of_options: () -> self
76
+ end
77
+
78
+ class IOHandle
79
+ attr_reader io: IO
80
+ attr_reader pid: Integer
81
+
82
+ def initialize: (IO io, pid: Integer, output_file: File, argv: Array[String]) -> void
83
+
84
+ def closed?: () -> bool
85
+
86
+ def close: () -> void
87
+
88
+ def each: () { (String chunk) -> void } -> void
89
+ end
90
+
91
+ class Mount
92
+ attr_reader mountpoint: String
93
+
94
+ def initialize: (wait_thr: Process::Waiter, mountpoint: String, output: IO, output_file: File, argv: Array[String]) -> void
95
+
96
+ def pid: () -> Integer
97
+
98
+ def stopped?: () -> bool
99
+
100
+ def stop: () -> void
101
+ end
102
+
103
+ class ResticOutput
104
+ DEFAULT_TAIL_CHUNK_SIZE: Integer
105
+
106
+ def initialize: (File file, ?tail_chunk_size: Integer) -> void
107
+
108
+ def index: () -> Hash[String, Array[Integer]]
109
+
110
+ def read_line_at: (Integer offset) -> String
111
+
112
+ def last_line: () -> String?
113
+
114
+ def each_line: () { (String line) -> void } -> void
115
+ | () -> Enumerator[String, void]
116
+
117
+ def to_s: () -> String
118
+ end
119
+
120
+ class Snapshot < SimpleDelegator
121
+ def id: () -> String
122
+
123
+ def short_id: () -> String
124
+
125
+ def time: () -> Time
126
+
127
+ def host: () -> String
128
+
129
+ def tags: () -> Array[String]
130
+
131
+ def paths: () -> Array[String]
132
+
133
+ def parent_id: () -> String?
134
+ end
135
+
136
+ type password = String | [:command, String] | [:file, String] | :insecure_no_password | (^() -> String) | nil
137
+ type backend_credentials = Hash[String, String] | (^() -> Hash[String, String])
138
+ type restic_or_path = Restic | String | nil
139
+
140
+ class Restic
141
+ MINIMUM_VERSION: Gem::Version
142
+ ALLOWED_ENV_VARS: Set[String]
143
+
144
+ attr_reader restic_path: String
145
+ attr_accessor cache_dir: String?
146
+ attr_accessor compression: String?
147
+ attr_accessor pack_size: Integer?
148
+ attr_accessor read_concurrency: Integer?
149
+ attr_accessor host: String?
150
+ attr_accessor progress_fps: Integer?
151
+ attr_accessor cacert: String?
152
+ attr_accessor tls_client_cert: String?
153
+ attr_accessor key_hint: String?
154
+ attr_accessor limit_download: String?
155
+ attr_accessor limit_upload: String?
156
+ attr_accessor retry_lock: String?
157
+ attr_accessor no_lock: bool
158
+ attr_accessor no_cache: bool
159
+ attr_accessor cleanup_cache: bool
160
+ attr_accessor no_extra_verify: bool
161
+ attr_accessor stuck_request_timeout: String?
162
+ attr_accessor options: Array[String]
163
+ attr_accessor http_user_agent: String?
164
+ attr_accessor quiet: bool
165
+
166
+ def initialize: (?String? restic_path, ?env: Hash[String, String], ?cache_dir: String?,
167
+ ?compression: String?, ?pack_size: Integer?, ?read_concurrency: Integer?, ?host: String?,
168
+ ?progress_fps: Integer?, ?cacert: String?, ?tls_client_cert: String?, ?key_hint: String?,
169
+ ?limit_download: String?, ?limit_upload: String?, ?retry_lock: String?, ?no_lock: bool,
170
+ ?no_cache: bool, ?cleanup_cache: bool, ?no_extra_verify: bool, ?stuck_request_timeout: String?,
171
+ ?options: Array[String], ?http_user_agent: String?, ?quiet: bool) -> void
172
+
173
+ def env: () -> Hash[String, String]
174
+
175
+ def append_global_flags: (ArgvBuilder a) -> void
176
+
177
+ def inspect: () -> String
178
+
179
+ def version: () -> Hash[String, untyped]
180
+
181
+ def cache: (?cleanup: bool, ?max_age: String?, ?no_size: bool) -> true
182
+
183
+ def run: (Array[String] argv, ?extra_env: Hash[String, String], ?skip_version_check: bool) ?{ (Hash[String, untyped] message) -> void } -> execution
184
+
185
+ def self.dispatch: (execution execution) -> execution
186
+
187
+ def run_dump: (Array[String] argv, ?extra_env: Hash[String, String]) { (IO io) -> untyped } -> untyped
188
+ | (Array[String] argv, ?extra_env: Hash[String, String]) -> IOHandle
189
+
190
+ def ensure_minimum_version!: () -> void
191
+
192
+ def run_mount: (Array[String] argv, mountpoint: String, ?extra_env: Hash[String, String], ?ready_timeout: Numeric) -> Mount
193
+ end
194
+
195
+ class Repository
196
+ attr_reader url: String
197
+ attr_reader password: password
198
+ attr_reader backend_credentials: backend_credentials
199
+
200
+ def initialize: (url: String, ?password: password, ?backend_credentials: backend_credentials, ?restic: restic_or_path) -> void
201
+
202
+ def env: () -> Hash[String, String]
203
+
204
+ def inspect: () -> String
205
+
206
+ def init: (?copy_chunker_params: bool, ?from_insecure_no_password: bool, ?from_key_hint: String?,
207
+ ?from_password_command: String?, ?from_password_file: String?, ?from_repo: String?,
208
+ ?from_repository_file: String?, ?repository_version: String?) -> Hash[String, untyped]
209
+
210
+ def config: () -> Hash[String, untyped]
211
+
212
+ def backup: (source: String | [:stdin_from_command, String | Array[String]] | [:stdin_from_command, String | Array[String], String],
213
+ ?excludes: Array[String] | String, ?exclude_files: Array[String] | String,
214
+ ?exclude_if_present: Array[String] | String, ?exclude_larger_than: String?,
215
+ ?files_from: Array[String] | String, ?files_from_raw: Array[String] | String,
216
+ ?files_from_verbatim: Array[String] | String, ?iexcludes: Array[String] | String,
217
+ ?iexclude_files: Array[String] | String, ?tags: Array[String] | String, ?dry_run: bool,
218
+ ?exclude_caches: bool, ?exclude_cloud_files: bool, ?force: bool, ?group_by: String?,
219
+ ?host: String?, ?ignore_ctime: bool, ?ignore_inode: bool, ?no_scan: bool,
220
+ ?one_file_system: bool, ?parent: String?, ?read_concurrency: Integer?,
221
+ ?skip_if_unchanged: bool, ?time: String?, ?verbose: bool, ?with_atime: bool)
222
+ ?{ (BackupStatus | BackupError | BackupVerboseStatus message) -> void } -> BackupOutcome
223
+
224
+ def cat_snapshot: (String | Snapshot id) -> Hash[String, untyped]
225
+
226
+ def cat_index: (String id) -> Hash[String, untyped]
227
+
228
+ def cat_key: (String | Key id) -> Hash[String, untyped]
229
+
230
+ def cat_tree: (String | Snapshot snapshot_id, ?subfolder: String?) -> Hash[String, untyped]
231
+
232
+ def cat_pack: (String id) { (IO io) -> untyped } -> untyped
233
+ | (String id) -> IOHandle
234
+
235
+ def cat_blob: (String id) { (IO io) -> untyped } -> untyped
236
+ | (String id) -> IOHandle
237
+
238
+ def cat_masterkey_and_game_over_if_this_leaks: () -> Hash[String, untyped]
239
+
240
+ def check: (?hosts: Array[String] | String, ?paths: Array[String] | String, ?read_data: bool,
241
+ ?read_data_subset: String?, ?tags: Array[String] | String, ?with_cache: bool) -> CheckOutcome
242
+
243
+ def copy: (from_repo: String | Repository, ?from_password: password, ?snapshot_ids: Array[String] | String,
244
+ ?from_key_hint: String?, ?from_repository_file: String?, ?hosts: Array[String] | String,
245
+ ?paths: Array[String] | String, ?tags: Array[String] | String) -> true
246
+
247
+ def diff: (from: String, to: String, ?metadata: bool) -> DiffOutcome
248
+
249
+ def dump: (snapshot_id: String, file: String, ?target: String?, ?archive: String | Symbol | nil,
250
+ ?hosts: Array[String] | String, ?paths: Array[String] | String, ?tags: Array[String] | String)
251
+ { (IO io) -> untyped } -> untyped
252
+ | (snapshot_id: String, file: String, target: String, ?archive: String | Symbol | nil,
253
+ ?hosts: Array[String] | String, ?paths: Array[String] | String, ?tags: Array[String] | String) -> true
254
+ | (snapshot_id: String, file: String, ?target: String?, ?archive: String | Symbol | nil,
255
+ ?hosts: Array[String] | String, ?paths: Array[String] | String, ?tags: Array[String] | String) -> IOHandle
256
+
257
+ def find: (patterns: Array[String] | String, ?blob: bool, ?pack: bool, ?tree: bool,
258
+ ?hosts: Array[String] | String, ?human_readable: bool, ?ignore_case: bool, ?long: bool,
259
+ ?newest: String?, ?oldest: String?, ?paths: Array[String] | String, ?reverse: bool,
260
+ ?show_pack_id: bool, ?snapshot_ids: Array[String] | String, ?tags: Array[String] | String) -> FindMatches
261
+
262
+ def forget: (?keep_last: Integer?, ?keep_hourly: Integer?, ?keep_daily: Integer?, ?keep_weekly: Integer?,
263
+ ?keep_monthly: Integer?, ?keep_yearly: Integer?, ?keep_within: String?, ?keep_within_hourly: String?,
264
+ ?keep_within_daily: String?, ?keep_within_weekly: String?, ?keep_within_monthly: String?,
265
+ ?keep_within_yearly: String?, ?keep_tags: Array[String] | String, ?hosts: Array[String] | String,
266
+ ?tags: Array[String] | String, ?paths: Array[String] | String, ?compact: bool, ?group_by: String?,
267
+ ?dry_run: bool, ?prune: bool, ?unsafe_allow_remove_all: bool, ?max_unused: String?,
268
+ ?max_repack_size: String?, ?repack_cacheable_only: bool, ?repack_uncompressed: bool,
269
+ ?repack_smaller_than: String?) -> ForgetGroups
270
+
271
+ def key_add: (?host: String?, ?user: String?, ?new_insecure_no_password: bool, ?new_password_file: String?) -> true
272
+
273
+ def add_key: (?host: String?, ?user: String?, ?new_insecure_no_password: bool, ?new_password_file: String?) -> true
274
+
275
+ def key_list: () -> Keys
276
+
277
+ def keys: () -> Keys
278
+
279
+ def key_passwd: (?host: String?, ?user: String?, ?new_insecure_no_password: bool, ?new_password_file: String?) -> true
280
+
281
+ def change_password: (?host: String?, ?user: String?, ?new_insecure_no_password: bool, ?new_password_file: String?) -> true
282
+
283
+ def key_remove: (id: String) -> true
284
+
285
+ def remove_key: (id: String) -> true
286
+
287
+ def list: (Symbol | String type) -> Array[String]
288
+
289
+ def ls: (snapshot_id: String, ?dirs: Array[String] | String, ?hosts: Array[String] | String,
290
+ ?human_readable: bool, ?long: bool, ?paths: Array[String] | String, ?recursive: bool,
291
+ ?reverse: bool, ?sort: String?, ?tags: Array[String] | String) -> LsOutcome
292
+
293
+ def migrate: (?names: Array[String] | String, ?force: bool) -> true
294
+
295
+ def mount: (mountpoint: String, ?hosts: Array[String] | String, ?paths: Array[String] | String,
296
+ ?tags: Array[String] | String, ?allow_other: bool, ?no_default_permissions: bool,
297
+ ?owner_root: bool, ?path_templates: Array[String] | String, ?time_template: String?,
298
+ ?ready_timeout: Numeric) { (Mount mount) -> untyped } -> untyped
299
+ | (mountpoint: String, ?hosts: Array[String] | String, ?paths: Array[String] | String,
300
+ ?tags: Array[String] | String, ?allow_other: bool, ?no_default_permissions: bool,
301
+ ?owner_root: bool, ?path_templates: Array[String] | String, ?time_template: String?,
302
+ ?ready_timeout: Numeric) -> Mount
303
+
304
+ def prune: (?dry_run: bool, ?max_repack_size: String?, ?max_unused: String?,
305
+ ?repack_cacheable_only: bool, ?repack_smaller_than: String?, ?repack_uncompressed: bool,
306
+ ?unsafe_recover_no_free_space: String?) -> true
307
+
308
+ def recover: () -> true
309
+
310
+ def repair_index: (?read_all_packs: bool) -> true
311
+
312
+ def repair_packs: (ids: Array[String] | String) -> true
313
+
314
+ def repair_snapshots: (?snapshot_ids: Array[String] | String, ?dry_run: bool, ?forget: bool,
315
+ ?hosts: Array[String] | String, ?paths: Array[String] | String, ?tags: Array[String] | String) -> true
316
+
317
+ def restore: (snapshot_id: String, target: String, ?excludes: Array[String] | String,
318
+ ?exclude_files: Array[String] | String, ?exclude_xattrs: Array[String] | String,
319
+ ?hosts: Array[String] | String, ?iexcludes: Array[String] | String,
320
+ ?iexclude_files: Array[String] | String, ?iincludes: Array[String] | String,
321
+ ?iinclude_files: Array[String] | String, ?includes: Array[String] | String,
322
+ ?include_files: Array[String] | String, ?include_xattrs: Array[String] | String,
323
+ ?paths: Array[String] | String, ?tags: Array[String] | String, ?delete: bool, ?dry_run: bool,
324
+ ?overwrite: String | Symbol | nil, ?ownership_by_name: bool, ?sparse: bool, ?verbose: bool,
325
+ ?verify: bool) ?{ (RestoreStatus | RestoreVerboseStatus message) -> void } -> RestoreOutcome
326
+
327
+ def rewrite: (?snapshot_ids: Array[String] | String, ?hosts: Array[String] | String,
328
+ ?tags: Array[String] | String, ?paths: Array[String] | String, ?excludes: Array[String] | String,
329
+ ?exclude_files: Array[String] | String, ?iexcludes: Array[String] | String,
330
+ ?iexclude_files: Array[String] | String, ?includes: Array[String] | String,
331
+ ?include_files: Array[String] | String, ?iincludes: Array[String] | String,
332
+ ?iinclude_files: Array[String] | String, ?dry_run: bool, ?forget: bool, ?new_host: String?,
333
+ ?new_time: String?, ?snapshot_summary: bool) -> true
334
+
335
+ def snapshots: (?tags: Array[String] | String, ?hosts: Array[String] | String,
336
+ ?paths: Array[String] | String, ?compact: bool, ?group_by: String?, ?latest: Integer?) -> Snapshots
337
+
338
+ def stats: (?snapshot_ids: Array[String] | String, ?hosts: Array[String] | String,
339
+ ?mode: String | Symbol | nil, ?paths: Array[String] | String, ?tags: Array[String] | String) -> Hash[String, untyped]
340
+
341
+ def tag: (?snapshot_ids: Array[String] | String, ?add: Array[String] | String,
342
+ ?remove: Array[String] | String, ?set: Array[String] | String, ?tags: Array[String] | String,
343
+ ?hosts: Array[String] | String, ?paths: Array[String] | String) -> TagOutcome
344
+
345
+ def unlock: (?remove_all: bool) -> true
346
+ end
347
+
348
+ class BackupOutcome
349
+ attr_reader exit_code: Integer
350
+ attr_reader output: ResticOutput
351
+
352
+ COMMAND_OUTPUT_LINE_PATTERN: Regexp
353
+
354
+ def success?: () -> bool
355
+
356
+ def partial?: () -> bool
357
+
358
+ def errors: () -> BackupErrors
359
+
360
+ def command_output: () -> Array[String]
361
+
362
+ def report: () -> Hash[String, untyped]
363
+ end
364
+
365
+ class BackupStatus < SimpleDelegator
366
+ def percent_done: () -> Float?
367
+
368
+ def total_files: () -> Integer?
369
+
370
+ def files_done: () -> Integer?
371
+
372
+ def total_bytes: () -> Integer?
373
+
374
+ def bytes_done: () -> Integer?
375
+
376
+ def current_files: () -> Array[String]
377
+
378
+ def error_count: () -> Integer
379
+ end
380
+
381
+ class BackupError < SimpleDelegator
382
+ def message: () -> String?
383
+
384
+ def during: () -> String?
385
+
386
+ def item: () -> String?
387
+ end
388
+
389
+ class BackupErrors
390
+ include Enumerable[BackupError]
391
+
392
+ def initialize: (ResticOutput output) -> void
393
+
394
+ def each: () { (BackupError error) -> void } -> void
395
+ | () -> Enumerator[BackupError, void]
396
+ end
397
+
398
+ class BackupVerboseStatus < SimpleDelegator
399
+ def action: () -> String
400
+
401
+ def item: () -> String
402
+
403
+ def duration: () -> Integer
404
+
405
+ def data_size: () -> Integer
406
+
407
+ def data_size_in_repo: () -> Integer
408
+
409
+ def metadata_size: () -> Integer
410
+
411
+ def metadata_size_in_repo: () -> Integer
412
+
413
+ def total_files: () -> Integer
414
+ end
415
+
416
+ class CheckOutcome
417
+ attr_reader exit_code: Integer
418
+ attr_reader output: ResticOutput
419
+
420
+ def report: () -> Hash[String, untyped]
421
+
422
+ def errors: () -> CheckErrors
423
+ end
424
+
425
+ class CheckError < SimpleDelegator
426
+ def message: () -> String
427
+ end
428
+
429
+ class CheckErrors
430
+ include Enumerable[CheckError]
431
+
432
+ def initialize: (ResticOutput output) -> void
433
+
434
+ def each: () { (CheckError error) -> void } -> void
435
+ | () -> Enumerator[CheckError, void]
436
+ end
437
+
438
+ class DiffOutcome
439
+ attr_reader exit_code: Integer
440
+ attr_reader output: ResticOutput
441
+
442
+ def report: () -> Hash[String, untyped]
443
+
444
+ def changes: () -> DiffChanges
445
+ end
446
+
447
+ class DiffChange < SimpleDelegator
448
+ def path: () -> String
449
+
450
+ def modifier: () -> String
451
+ end
452
+
453
+ class DiffChanges
454
+ include Enumerable[DiffChange]
455
+
456
+ def initialize: (ResticOutput output) -> void
457
+
458
+ def each: () { (DiffChange change) -> void } -> void
459
+ | () -> Enumerator[DiffChange, void]
460
+ end
461
+
462
+ class FindMatch < SimpleDelegator
463
+ def path: () -> String
464
+
465
+ def type: () -> String
466
+
467
+ def size: () -> Integer
468
+
469
+ def permissions: () -> String
470
+
471
+ def uid: () -> Integer
472
+
473
+ def gid: () -> Integer
474
+
475
+ def user: () -> String
476
+
477
+ def group: () -> String
478
+
479
+ def inode: () -> Integer
480
+
481
+ def mtime: () -> Time
482
+
483
+ def atime: () -> Time
484
+
485
+ def ctime: () -> Time
486
+ end
487
+
488
+ class MatchesPerSnapshot < SimpleDelegator
489
+ def snapshot: () -> Hash[String, untyped]
490
+
491
+ def hits: () -> Integer
492
+
493
+ def matches: () -> Array[FindMatch]
494
+ end
495
+
496
+ class FindMatches
497
+ include Enumerable[MatchesPerSnapshot]
498
+
499
+ attr_reader output: ResticOutput
500
+
501
+ def initialize: (ResticOutput output) -> void
502
+
503
+ def each: () { (MatchesPerSnapshot matches) -> void } -> void
504
+ | () -> Enumerator[MatchesPerSnapshot, void]
505
+ end
506
+
507
+ class ForgetGroups
508
+ include Enumerable[ForgetGroup]
509
+
510
+ attr_reader exit_code: Integer
511
+ attr_reader output: ResticOutput
512
+
513
+ def initialize: (Integer exit_code, ResticOutput output) -> void
514
+
515
+ def each: () { (ForgetGroup group) -> void } -> void
516
+ | () -> Enumerator[ForgetGroup, void]
517
+
518
+ def success?: () -> bool
519
+
520
+ def partial?: () -> bool
521
+ end
522
+
523
+ class ForgetGroup < SimpleDelegator
524
+ def host: () -> String
525
+
526
+ def tags: () -> Array[String]
527
+
528
+ def paths: () -> Array[String]
529
+
530
+ def keep: () -> Array[Snapshot]
531
+
532
+ def remove: () -> Array[Snapshot]
533
+
534
+ def reasons: () -> Array[ForgetReason]
535
+ end
536
+
537
+ class ForgetReason < SimpleDelegator
538
+ def snapshot: () -> Snapshot
539
+
540
+ def matches: () -> Array[String]
541
+ end
542
+
543
+ class Key < SimpleDelegator
544
+ def id: () -> String
545
+
546
+ def user_name: () -> String
547
+
548
+ def host_name: () -> String
549
+
550
+ def current?: () -> bool
551
+
552
+ def created: () -> Time
553
+ end
554
+
555
+ class Keys
556
+ include Enumerable[Key]
557
+
558
+ attr_reader output: ResticOutput
559
+
560
+ def initialize: (ResticOutput output) -> void
561
+
562
+ def each: () { (Key key) -> void } -> void
563
+ | () -> Enumerator[Key, void]
564
+ end
565
+
566
+ class LsOutcome
567
+ attr_reader exit_code: Integer
568
+ attr_reader output: ResticOutput
569
+
570
+ def snapshot: () -> Snapshot
571
+
572
+ def entries: () -> LsEntries
573
+ end
574
+
575
+ class LsEntry < SimpleDelegator
576
+ def name: () -> String
577
+
578
+ def type: () -> String
579
+
580
+ def path: () -> String
581
+
582
+ def size: () -> Integer
583
+
584
+ def permissions: () -> String
585
+
586
+ def uid: () -> Integer
587
+
588
+ def gid: () -> Integer
589
+
590
+ def inode: () -> Integer
591
+
592
+ def mtime: () -> Time
593
+
594
+ def atime: () -> Time
595
+
596
+ def ctime: () -> Time
597
+ end
598
+
599
+ class LsEntries
600
+ include Enumerable[LsEntry]
601
+
602
+ def initialize: (ResticOutput output) -> void
603
+
604
+ def each: () { (LsEntry entry) -> void } -> void
605
+ | () -> Enumerator[LsEntry, void]
606
+ end
607
+
608
+ class RestoreOutcome
609
+ attr_reader exit_code: Integer
610
+ attr_reader output: ResticOutput
611
+
612
+ def report: () -> Hash[String, untyped]
613
+ end
614
+
615
+ class RestoreStatus < SimpleDelegator
616
+ def percent_done: () -> Float?
617
+
618
+ def total_files: () -> Integer?
619
+
620
+ def files_restored: () -> Integer?
621
+
622
+ def total_bytes: () -> Integer?
623
+
624
+ def bytes_restored: () -> Integer?
625
+ end
626
+
627
+ class RestoreVerboseStatus < SimpleDelegator
628
+ def action: () -> String
629
+
630
+ def item: () -> String
631
+
632
+ def size: () -> Integer
633
+ end
634
+
635
+ class Snapshots
636
+ include Enumerable[Snapshot]
637
+
638
+ attr_reader output: ResticOutput
639
+
640
+ def initialize: (ResticOutput output) -> void
641
+
642
+ def each: () { (Snapshot snapshot) -> void } -> void
643
+ | () -> Enumerator[Snapshot, void]
644
+ end
645
+
646
+ class TagOutcome
647
+ attr_reader exit_code: Integer
648
+ attr_reader output: ResticOutput
649
+
650
+ def report: () -> Hash[String, untyped]
651
+
652
+ def changes: () -> Array[TagChange]
653
+ end
654
+
655
+ class TagChange < SimpleDelegator
656
+ def old_snapshot_id: () -> String
657
+
658
+ def new_snapshot_id: () -> String
659
+ end
660
+ end