diff --git a/.gitignore b/.gitignore index 3dd82a3..c48d2c3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -restora -restora-* +backrest +backrest-* dist -restora.exe \ No newline at end of file +backrest.exe \ No newline at end of file diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 92b812b..4349dc5 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -43,8 +43,8 @@ archives: dockers: - image_templates: - - garethgeorge/restora:latest - - garethgeorge/restora:{{ .Tag }} + - garethgeorge/backrest:latest + - garethgeorge/backrest:{{ .Tag }} changelog: sort: asc @@ -56,4 +56,4 @@ changelog: release: github: owner: garethgeorge - name: restora + name: backrest diff --git a/CHANGELOG.md b/CHANGELOG.md index f2d812e..faa0644 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,135 +1,135 @@ # Changelog -## [0.6.0](https://github.com/garethgeorge/restora/compare/v0.5.0...v0.6.0) (2023-12-22) +## [0.6.0](https://github.com/garethgeorge/backrest/compare/v0.5.0...v0.6.0) (2023-12-22) ### Features -* add activity bar to UI heading ([f5c3e76](https://github.com/garethgeorge/restora/commit/f5c3e762ed4ed3c908e843d74985fb6c7b253db7)) -* add clear error history button ([48d80b9](https://github.com/garethgeorge/restora/commit/48d80b9473db6619518924d0849b0eda78e62afa)) -* add repo view ([9522ac1](https://github.com/garethgeorge/restora/commit/9522ac18deedc15311d3d464ee36c20e7f72e39f)) -* implement garbage collection of old operations ([46456a8](https://github.com/garethgeorge/restora/commit/46456a88870934506ede4b67c3dfaa2f2afcee14)) -* support task cancellation ([fc9c06d](https://github.com/garethgeorge/restora/commit/fc9c06df00409b73dda23f4be031746f492b1a24)) +* add activity bar to UI heading ([f5c3e76](https://github.com/garethgeorge/backrest/commit/f5c3e762ed4ed3c908e843d74985fb6c7b253db7)) +* add clear error history button ([48d80b9](https://github.com/garethgeorge/backrest/commit/48d80b9473db6619518924d0849b0eda78e62afa)) +* add repo view ([9522ac1](https://github.com/garethgeorge/backrest/commit/9522ac18deedc15311d3d464ee36c20e7f72e39f)) +* implement garbage collection of old operations ([46456a8](https://github.com/garethgeorge/backrest/commit/46456a88870934506ede4b67c3dfaa2f2afcee14)) +* support task cancellation ([fc9c06d](https://github.com/garethgeorge/backrest/commit/fc9c06df00409b73dda23f4be031746f492b1a24)) ### Bug Fixes -* backup ordering in tree view ([b9c8b3e](https://github.com/garethgeorge/restora/commit/b9c8b3e378e88a0feff4d477d9d97eb5db075382)) -* hide no-op prune operations ([20dd78c](https://github.com/garethgeorge/restora/commit/20dd78cac4bdd6385cb7a0ea9ff0be75fde9135b)) -* incorrrect handling of oplog events in UI ([95ca96a](https://github.com/garethgeorge/restora/commit/95ca96a31f2e1ead2702164ec8675e4b4f54cf1d)) -* operation ordering in tree view ([2b4e1a2](https://github.com/garethgeorge/restora/commit/2b4e1a2fdbf11b010ddbcd0b6fd2640d01e4dbc8)) -* operations marked as 'warn' rather than 'error' for partial backups ([fe92b62](https://github.com/garethgeorge/restora/commit/fe92b625780481193e0ab63fbbdddb889bbda2a8)) -* race condition in snapshot browser ([f239b91](https://github.com/garethgeorge/restora/commit/f239b9170415e063ec8d60a5b5e14ae3610b9bad)) -* restic should initialize repo on backup operation ([e57abbd](https://github.com/garethgeorge/restora/commit/e57abbdcb1864c362e6ae3c22850c0380671cb34)) -* restora should not init repos added manually e.g. without the UI ([68b50e1](https://github.com/garethgeorge/restora/commit/68b50e1eb5a2ebd861c869f71f49d196cb5214f8)) -* task cancellation ([d49b729](https://github.com/garethgeorge/restora/commit/d49b72996ea7fd0543d55db3fc8e1127fe5a2476)) -* use timezone offset when grouping operations in OperationTree ([06240bd](https://github.com/garethgeorge/restora/commit/06240bd7adabd76424025030cfde2fb5e54c219f)) +* backup ordering in tree view ([b9c8b3e](https://github.com/garethgeorge/backrest/commit/b9c8b3e378e88a0feff4d477d9d97eb5db075382)) +* hide no-op prune operations ([20dd78c](https://github.com/garethgeorge/backrest/commit/20dd78cac4bdd6385cb7a0ea9ff0be75fde9135b)) +* incorrrect handling of oplog events in UI ([95ca96a](https://github.com/garethgeorge/backrest/commit/95ca96a31f2e1ead2702164ec8675e4b4f54cf1d)) +* operation ordering in tree view ([2b4e1a2](https://github.com/garethgeorge/backrest/commit/2b4e1a2fdbf11b010ddbcd0b6fd2640d01e4dbc8)) +* operations marked as 'warn' rather than 'error' for partial backups ([fe92b62](https://github.com/garethgeorge/backrest/commit/fe92b625780481193e0ab63fbbdddb889bbda2a8)) +* race condition in snapshot browser ([f239b91](https://github.com/garethgeorge/backrest/commit/f239b9170415e063ec8d60a5b5e14ae3610b9bad)) +* restic should initialize repo on backup operation ([e57abbd](https://github.com/garethgeorge/backrest/commit/e57abbdcb1864c362e6ae3c22850c0380671cb34)) +* backrest should not init repos added manually e.g. without the UI ([68b50e1](https://github.com/garethgeorge/backrest/commit/68b50e1eb5a2ebd861c869f71f49d196cb5214f8)) +* task cancellation ([d49b729](https://github.com/garethgeorge/backrest/commit/d49b72996ea7fd0543d55db3fc8e1127fe5a2476)) +* use timezone offset when grouping operations in OperationTree ([06240bd](https://github.com/garethgeorge/backrest/commit/06240bd7adabd76424025030cfde2fb5e54c219f)) -## [0.5.0](https://github.com/garethgeorge/restora/compare/v0.4.0...v0.5.0) (2023-12-10) +## [0.5.0](https://github.com/garethgeorge/backrest/compare/v0.4.0...v0.5.0) (2023-12-10) ### Features -* implement repo unlocking and operation list implementation ([6665ad9](https://github.com/garethgeorge/restora/commit/6665ad98d7f54bea30ea532932a8a3409717c913)) -* initial Windows OS support ([f048cbf](https://github.com/garethgeorge/restora/commit/f048cbf10dc60da51cd7f5aee4614a8750fd85b2)) -* match system color theme (darkmode support) ([a8762dc](https://github.com/garethgeorge/restora/commit/a8762dca329927b93db40b01cc011c00e12891f0)) +* implement repo unlocking and operation list implementation ([6665ad9](https://github.com/garethgeorge/backrest/commit/6665ad98d7f54bea30ea532932a8a3409717c913)) +* initial Windows OS support ([f048cbf](https://github.com/garethgeorge/backrest/commit/f048cbf10dc60da51cd7f5aee4614a8750fd85b2)) +* match system color theme (darkmode support) ([a8762dc](https://github.com/garethgeorge/backrest/commit/a8762dca329927b93db40b01cc011c00e12891f0)) ### Bug Fixes -* improve output detail collection for command failures ([c492f9b](https://github.com/garethgeorge/restora/commit/c492f9ba63169942509349797ebe951879b53635)) -* improve Windows path handling ([426aad4](https://github.com/garethgeorge/restora/commit/426aad4890d2de5d70cd2e0232c0d11c42606c92)) -* ordering of operations when viewed from backup tree ([063f086](https://github.com/garethgeorge/restora/commit/063f086a6e31df250dd9be42cdb5fa549307106f)) -* relax output parsing to skip over warnings ([8f85b74](https://github.com/garethgeorge/restora/commit/8f85b747f57844bbc898668723eec50a1666aa39)) -* snapshots out of order in UI ([b9bcc7e](https://github.com/garethgeorge/restora/commit/b9bcc7e7c758abafa4878b6ef895adf2d2d0bc42)) -* unexpected config location on MacOS ([8d40576](https://github.com/garethgeorge/restora/commit/8d40576c6526d6f180c96fbeb81d7f59f56b51b8)) +* improve output detail collection for command failures ([c492f9b](https://github.com/garethgeorge/backrest/commit/c492f9ba63169942509349797ebe951879b53635)) +* improve Windows path handling ([426aad4](https://github.com/garethgeorge/backrest/commit/426aad4890d2de5d70cd2e0232c0d11c42606c92)) +* ordering of operations when viewed from backup tree ([063f086](https://github.com/garethgeorge/backrest/commit/063f086a6e31df250dd9be42cdb5fa549307106f)) +* relax output parsing to skip over warnings ([8f85b74](https://github.com/garethgeorge/backrest/commit/8f85b747f57844bbc898668723eec50a1666aa39)) +* snapshots out of order in UI ([b9bcc7e](https://github.com/garethgeorge/backrest/commit/b9bcc7e7c758abafa4878b6ef895adf2d2d0bc42)) +* unexpected config location on MacOS ([8d40576](https://github.com/garethgeorge/backrest/commit/8d40576c6526d6f180c96fbeb81d7f59f56b51b8)) -## [0.4.0](https://github.com/garethgeorge/restora/compare/v0.3.0...v0.4.0) (2023-12-04) +## [0.4.0](https://github.com/garethgeorge/backrest/compare/v0.3.0...v0.4.0) (2023-12-04) ### Features -* implement prune support ([#25](https://github.com/garethgeorge/restora/issues/25)) ([a311b0a](https://github.com/garethgeorge/restora/commit/a311b0a3fb5315f17d66361a3e72fa10b8a744a1)) -* implement restore operation through snapshot browser UI ([#27](https://github.com/garethgeorge/restora/issues/27)) ([d758509](https://github.com/garethgeorge/restora/commit/d758509797e21e3ec4bc67eff4d974604e4a5476)) +* implement prune support ([#25](https://github.com/garethgeorge/backrest/issues/25)) ([a311b0a](https://github.com/garethgeorge/backrest/commit/a311b0a3fb5315f17d66361a3e72fa10b8a744a1)) +* implement restore operation through snapshot browser UI ([#27](https://github.com/garethgeorge/backrest/issues/27)) ([d758509](https://github.com/garethgeorge/backrest/commit/d758509797e21e3ec4bc67eff4d974604e4a5476)) -## [0.3.0](https://github.com/garethgeorge/restora/compare/v0.2.0...v0.3.0) (2023-12-03) +## [0.3.0](https://github.com/garethgeorge/backrest/compare/v0.2.0...v0.3.0) (2023-12-03) ### Features -* autoinstall required restic version ([b385c01](https://github.com/garethgeorge/restora/commit/b385c011210087e6d6992a4e4b279fec4b22ab89)) -* basic forget support in backend and UI ([d22d9d1](https://github.com/garethgeorge/restora/commit/d22d9d1a05831fae94ce397c0c73c6292d378cf5)) -* begin UI integration with backend ([cccdd29](https://github.com/garethgeorge/restora/commit/cccdd297c15cd47268b2a1903e9624bdbca3dc68)) -* display queued operations ([0c818bb](https://github.com/garethgeorge/restora/commit/0c818bb9452a944d8b1127e553142e1e60ed90af)) -* forget soft-deletes operations associated with removed snapshots ([f3dc7ff](https://github.com/garethgeorge/restora/commit/f3dc7ffd077fef67870852f8f4e8b9aa6c94806e)) -* forget soft-deletes operations associated with removed snapshots ([38bc107](https://github.com/garethgeorge/restora/commit/38bc107db394716e34245f1edefc5e4cf4a15333)) -* implement add plan UI ([9288589](https://github.com/garethgeorge/restora/commit/92885898cf551a2dcb4bb315f130138cd7a8cc67)) -* implement backup scheduling in orchestrator ([eadb1a8](https://github.com/garethgeorge/restora/commit/eadb1a82019f0cfc82edf8559adbad7730a4e86a)) -* implement basic plan view ([4c6f042](https://github.com/garethgeorge/restora/commit/4c6f042250946a036e46225e669ee39e2433b198)) -* implement delete button for plan and repo UIs ([ffb0d85](https://github.com/garethgeorge/restora/commit/ffb0d859f19f4af66a7521768dab083995f9672a)) -* implement forget and prune support in restic pkg ([ffb4573](https://github.com/garethgeorge/restora/commit/ffb4573737a73cc32f325bc0b9c3feed764b7879)) -* implement forget operation ([ebccf3b](https://github.com/garethgeorge/restora/commit/ebccf3bc3b78083aee635de7c6ae23b52ee88284)) -* implement repo, edit, and supporting RPCs ([d282c32](https://github.com/garethgeorge/restora/commit/d282c32c8bd3d8f5747e934d4af6a84faca1ec86)) -* implement snapshot browsing ([8ffffa0](https://github.com/garethgeorge/restora/commit/8ffffa05e41ca31e2d38fde5427dae34ac4a1abb)) -* implement snapshot indexing ([a90b30e](https://github.com/garethgeorge/restora/commit/a90b30e19f7107874bbfe244451b07f72c437213)) -* improve oplist performance and display forget operations in oplist ([#22](https://github.com/garethgeorge/restora/issues/22)) ([51b4921](https://github.com/garethgeorge/restora/commit/51b49214e3d32cc4b28e13085bd196ba164a8c19)) -* initial oplog implementation ([dd9142c](https://github.com/garethgeorge/restora/commit/dd9142c0e97e1175ff12f2861220af0e0d68b7d9)) -* initial optree implementation ([ba390a2](https://github.com/garethgeorge/restora/commit/ba390a2ca1b5e9adaab36a7db0d988f54f5a6cdd)) -* operations IDs are ordered by operation timestamp ([a1ed6f9](https://github.com/garethgeorge/restora/commit/a1ed6f90ba1d608e00c53221db45b67251085aa7)) -* present list of operations on plan view ([6491dbe](https://github.com/garethgeorge/restora/commit/6491dbed146967c0e12eee4392d1d12843dc7c5e)) -* repo can be created through UI ([9ccade5](https://github.com/garethgeorge/restora/commit/9ccade5ccd97f4e485d52ad5c675be6b0a4a1049)) -* scaffolding basic UI structure ([1273f81](https://github.com/garethgeorge/restora/commit/1273f8105a2549b0ccd0c7a588eb60646b66366e)) -* show snapshots in sidenav ([1a9a5b6](https://github.com/garethgeorge/restora/commit/1a9a5b60d24dd75752e5a3f84dd87af3e38422bb)) -* snapshot items are viewable in the UI and minor element ordering fixes ([a333001](https://github.com/garethgeorge/restora/commit/a33300175c645f31b95b3038de02821a1f3d5559)) -* support ImportSnapshotOperation in oplog ([89f95b3](https://github.com/garethgeorge/restora/commit/89f95b351fe250534cd39ac27ff34b2b148256e1)) -* update getting started guide ([2c421d6](https://github.com/garethgeorge/restora/commit/2c421d661501fa4a3120aa3f39937cd58b29c2dc)) +* autoinstall required restic version ([b385c01](https://github.com/garethgeorge/backrest/commit/b385c011210087e6d6992a4e4b279fec4b22ab89)) +* basic forget support in backend and UI ([d22d9d1](https://github.com/garethgeorge/backrest/commit/d22d9d1a05831fae94ce397c0c73c6292d378cf5)) +* begin UI integration with backend ([cccdd29](https://github.com/garethgeorge/backrest/commit/cccdd297c15cd47268b2a1903e9624bdbca3dc68)) +* display queued operations ([0c818bb](https://github.com/garethgeorge/backrest/commit/0c818bb9452a944d8b1127e553142e1e60ed90af)) +* forget soft-deletes operations associated with removed snapshots ([f3dc7ff](https://github.com/garethgeorge/backrest/commit/f3dc7ffd077fef67870852f8f4e8b9aa6c94806e)) +* forget soft-deletes operations associated with removed snapshots ([38bc107](https://github.com/garethgeorge/backrest/commit/38bc107db394716e34245f1edefc5e4cf4a15333)) +* implement add plan UI ([9288589](https://github.com/garethgeorge/backrest/commit/92885898cf551a2dcb4bb315f130138cd7a8cc67)) +* implement backup scheduling in orchestrator ([eadb1a8](https://github.com/garethgeorge/backrest/commit/eadb1a82019f0cfc82edf8559adbad7730a4e86a)) +* implement basic plan view ([4c6f042](https://github.com/garethgeorge/backrest/commit/4c6f042250946a036e46225e669ee39e2433b198)) +* implement delete button for plan and repo UIs ([ffb0d85](https://github.com/garethgeorge/backrest/commit/ffb0d859f19f4af66a7521768dab083995f9672a)) +* implement forget and prune support in restic pkg ([ffb4573](https://github.com/garethgeorge/backrest/commit/ffb4573737a73cc32f325bc0b9c3feed764b7879)) +* implement forget operation ([ebccf3b](https://github.com/garethgeorge/backrest/commit/ebccf3bc3b78083aee635de7c6ae23b52ee88284)) +* implement repo, edit, and supporting RPCs ([d282c32](https://github.com/garethgeorge/backrest/commit/d282c32c8bd3d8f5747e934d4af6a84faca1ec86)) +* implement snapshot browsing ([8ffffa0](https://github.com/garethgeorge/backrest/commit/8ffffa05e41ca31e2d38fde5427dae34ac4a1abb)) +* implement snapshot indexing ([a90b30e](https://github.com/garethgeorge/backrest/commit/a90b30e19f7107874bbfe244451b07f72c437213)) +* improve oplist performance and display forget operations in oplist ([#22](https://github.com/garethgeorge/backrest/issues/22)) ([51b4921](https://github.com/garethgeorge/backrest/commit/51b49214e3d32cc4b28e13085bd196ba164a8c19)) +* initial oplog implementation ([dd9142c](https://github.com/garethgeorge/backrest/commit/dd9142c0e97e1175ff12f2861220af0e0d68b7d9)) +* initial optree implementation ([ba390a2](https://github.com/garethgeorge/backrest/commit/ba390a2ca1b5e9adaab36a7db0d988f54f5a6cdd)) +* operations IDs are ordered by operation timestamp ([a1ed6f9](https://github.com/garethgeorge/backrest/commit/a1ed6f90ba1d608e00c53221db45b67251085aa7)) +* present list of operations on plan view ([6491dbe](https://github.com/garethgeorge/backrest/commit/6491dbed146967c0e12eee4392d1d12843dc7c5e)) +* repo can be created through UI ([9ccade5](https://github.com/garethgeorge/backrest/commit/9ccade5ccd97f4e485d52ad5c675be6b0a4a1049)) +* scaffolding basic UI structure ([1273f81](https://github.com/garethgeorge/backrest/commit/1273f8105a2549b0ccd0c7a588eb60646b66366e)) +* show snapshots in sidenav ([1a9a5b6](https://github.com/garethgeorge/backrest/commit/1a9a5b60d24dd75752e5a3f84dd87af3e38422bb)) +* snapshot items are viewable in the UI and minor element ordering fixes ([a333001](https://github.com/garethgeorge/backrest/commit/a33300175c645f31b95b3038de02821a1f3d5559)) +* support ImportSnapshotOperation in oplog ([89f95b3](https://github.com/garethgeorge/backrest/commit/89f95b351fe250534cd39ac27ff34b2b148256e1)) +* update getting started guide ([2c421d6](https://github.com/garethgeorge/backrest/commit/2c421d661501fa4a3120aa3f39937cd58b29c2dc)) ### Bug Fixes -* build and test fixes ([4957496](https://github.com/garethgeorge/restora/commit/49574967871494dcb5095e5699610097466f57f9)) -* connectivity issues with embedded server ([482cc8e](https://github.com/garethgeorge/restora/commit/482cc8ebbc93b919991f6566b212247c5874f70f)) -* deadlock in snapshots ([93b2120](https://github.com/garethgeorge/restora/commit/93b2120f74ea348e5084ab430573368bf4066eec)) -* forget deadlocking and misc smaller bugs ([b7c633d](https://github.com/garethgeorge/restora/commit/b7c633d021d68d4880a5f442ce70a858002b4af2)) -* improve error message formatting ([ae33b01](https://github.com/garethgeorge/restora/commit/ae33b01de408af3b1d711a369298a2782a24ad1e)) -* improve operation ordering to fix snapshots indexed before forget operation ([#21](https://github.com/garethgeorge/restora/issues/21)) ([b513b08](https://github.com/garethgeorge/restora/commit/b513b08e51434c28c90f5f062b4ae292f6854f4e)) -* improve UI performance ([8488d46](https://github.com/garethgeorge/restora/commit/8488d461bd7ffec2e8171d67f83093c32c79073f)) -* repo orchestrator tests ([d077fc8](https://github.com/garethgeorge/restora/commit/d077fc83c97b7fbdbeda9702828c8780182b2616)) -* restic fails to detect summary event for very short backups ([46b2a85](https://github.com/garethgeorge/restora/commit/46b2a8567706ddb21cfcf3e18b57e16d50809b56)) -* standardize on fully qualified snapshot_id and decouple protobufs from restic package ([e6031bf](https://github.com/garethgeorge/restora/commit/e6031bfa543a7300e622c1b0f56efc6320e7611e)) -* support more versions of restic ([0cdfd11](https://github.com/garethgeorge/restora/commit/0cdfd115e29a0b08d5814e71c0f4a8f2baf52e90)) -* task priority not taking effect ([af7462c](https://github.com/garethgeorge/restora/commit/af7462cefb130153cdaaa08e8ebefefa40e80e49)) -* time formatting in operation list ([53c7f12](https://github.com/garethgeorge/restora/commit/53c7f1248f5284080fff872ac79b3996474412b3)) -* UI layout adjustments ([7d1b95c](https://github.com/garethgeorge/restora/commit/7d1b95c81f0f69840ce1d20cb0d4a4bb90011dc9)) +* build and test fixes ([4957496](https://github.com/garethgeorge/backrest/commit/49574967871494dcb5095e5699610097466f57f9)) +* connectivity issues with embedded server ([482cc8e](https://github.com/garethgeorge/backrest/commit/482cc8ebbc93b919991f6566b212247c5874f70f)) +* deadlock in snapshots ([93b2120](https://github.com/garethgeorge/backrest/commit/93b2120f74ea348e5084ab430573368bf4066eec)) +* forget deadlocking and misc smaller bugs ([b7c633d](https://github.com/garethgeorge/backrest/commit/b7c633d021d68d4880a5f442ce70a858002b4af2)) +* improve error message formatting ([ae33b01](https://github.com/garethgeorge/backrest/commit/ae33b01de408af3b1d711a369298a2782a24ad1e)) +* improve operation ordering to fix snapshots indexed before forget operation ([#21](https://github.com/garethgeorge/backrest/issues/21)) ([b513b08](https://github.com/garethgeorge/backrest/commit/b513b08e51434c28c90f5f062b4ae292f6854f4e)) +* improve UI performance ([8488d46](https://github.com/garethgeorge/backrest/commit/8488d461bd7ffec2e8171d67f83093c32c79073f)) +* repo orchestrator tests ([d077fc8](https://github.com/garethgeorge/backrest/commit/d077fc83c97b7fbdbeda9702828c8780182b2616)) +* restic fails to detect summary event for very short backups ([46b2a85](https://github.com/garethgeorge/backrest/commit/46b2a8567706ddb21cfcf3e18b57e16d50809b56)) +* standardize on fully qualified snapshot_id and decouple protobufs from restic package ([e6031bf](https://github.com/garethgeorge/backrest/commit/e6031bfa543a7300e622c1b0f56efc6320e7611e)) +* support more versions of restic ([0cdfd11](https://github.com/garethgeorge/backrest/commit/0cdfd115e29a0b08d5814e71c0f4a8f2baf52e90)) +* task priority not taking effect ([af7462c](https://github.com/garethgeorge/backrest/commit/af7462cefb130153cdaaa08e8ebefefa40e80e49)) +* time formatting in operation list ([53c7f12](https://github.com/garethgeorge/backrest/commit/53c7f1248f5284080fff872ac79b3996474412b3)) +* UI layout adjustments ([7d1b95c](https://github.com/garethgeorge/backrest/commit/7d1b95c81f0f69840ce1d20cb0d4a4bb90011dc9)) -## [0.2.0](https://github.com/garethgeorge/restora/compare/v0.1.3...v0.2.0) (2023-12-03) +## [0.2.0](https://github.com/garethgeorge/backrest/compare/v0.1.3...v0.2.0) (2023-12-03) ### Features -* forget soft-deletes operations associated with removed snapshots ([f3dc7ff](https://github.com/garethgeorge/restora/commit/f3dc7ffd077fef67870852f8f4e8b9aa6c94806e)) -* forget soft-deletes operations associated with removed snapshots ([38bc107](https://github.com/garethgeorge/restora/commit/38bc107db394716e34245f1edefc5e4cf4a15333)) -* improve oplist performance and display forget operations in oplist ([#22](https://github.com/garethgeorge/restora/issues/22)) ([51b4921](https://github.com/garethgeorge/restora/commit/51b49214e3d32cc4b28e13085bd196ba164a8c19)) +* forget soft-deletes operations associated with removed snapshots ([f3dc7ff](https://github.com/garethgeorge/backrest/commit/f3dc7ffd077fef67870852f8f4e8b9aa6c94806e)) +* forget soft-deletes operations associated with removed snapshots ([38bc107](https://github.com/garethgeorge/backrest/commit/38bc107db394716e34245f1edefc5e4cf4a15333)) +* improve oplist performance and display forget operations in oplist ([#22](https://github.com/garethgeorge/backrest/issues/22)) ([51b4921](https://github.com/garethgeorge/backrest/commit/51b49214e3d32cc4b28e13085bd196ba164a8c19)) ### Bug Fixes -* forget deadlocking and misc smaller bugs ([b7c633d](https://github.com/garethgeorge/restora/commit/b7c633d021d68d4880a5f442ce70a858002b4af2)) -* improve operation ordering to fix snapshots indexed before forget operation ([#21](https://github.com/garethgeorge/restora/issues/21)) ([b513b08](https://github.com/garethgeorge/restora/commit/b513b08e51434c28c90f5f062b4ae292f6854f4e)) -* task priority not taking effect ([af7462c](https://github.com/garethgeorge/restora/commit/af7462cefb130153cdaaa08e8ebefefa40e80e49)) -* UI layout adjustments ([7d1b95c](https://github.com/garethgeorge/restora/commit/7d1b95c81f0f69840ce1d20cb0d4a4bb90011dc9)) +* forget deadlocking and misc smaller bugs ([b7c633d](https://github.com/garethgeorge/backrest/commit/b7c633d021d68d4880a5f442ce70a858002b4af2)) +* improve operation ordering to fix snapshots indexed before forget operation ([#21](https://github.com/garethgeorge/backrest/issues/21)) ([b513b08](https://github.com/garethgeorge/backrest/commit/b513b08e51434c28c90f5f062b4ae292f6854f4e)) +* task priority not taking effect ([af7462c](https://github.com/garethgeorge/backrest/commit/af7462cefb130153cdaaa08e8ebefefa40e80e49)) +* UI layout adjustments ([7d1b95c](https://github.com/garethgeorge/backrest/commit/7d1b95c81f0f69840ce1d20cb0d4a4bb90011dc9)) -## [0.2.0](https://github.com/garethgeorge/restora/compare/v0.1.3...v0.2.0) (2023-12-02) +## [0.2.0](https://github.com/garethgeorge/backrest/compare/v0.1.3...v0.2.0) (2023-12-02) ### Features -* forget soft-deletes operations associated with removed snapshots ([f3dc7ff](https://github.com/garethgeorge/restora/commit/f3dc7ffd077fef67870852f8f4e8b9aa6c94806e)) -* forget soft-deletes operations associated with removed snapshots ([38bc107](https://github.com/garethgeorge/restora/commit/38bc107db394716e34245f1edefc5e4cf4a15333)) +* forget soft-deletes operations associated with removed snapshots ([f3dc7ff](https://github.com/garethgeorge/backrest/commit/f3dc7ffd077fef67870852f8f4e8b9aa6c94806e)) +* forget soft-deletes operations associated with removed snapshots ([38bc107](https://github.com/garethgeorge/backrest/commit/38bc107db394716e34245f1edefc5e4cf4a15333)) ### Bug Fixes -* forget deadlocking and misc smaller bugs ([b7c633d](https://github.com/garethgeorge/restora/commit/b7c633d021d68d4880a5f442ce70a858002b4af2)) -* improve operation ordering to fix snapshots indexed before forget operation ([#21](https://github.com/garethgeorge/restora/issues/21)) ([b513b08](https://github.com/garethgeorge/restora/commit/b513b08e51434c28c90f5f062b4ae292f6854f4e)) -* task priority not taking effect ([af7462c](https://github.com/garethgeorge/restora/commit/af7462cefb130153cdaaa08e8ebefefa40e80e49)) +* forget deadlocking and misc smaller bugs ([b7c633d](https://github.com/garethgeorge/backrest/commit/b7c633d021d68d4880a5f442ce70a858002b4af2)) +* improve operation ordering to fix snapshots indexed before forget operation ([#21](https://github.com/garethgeorge/backrest/issues/21)) ([b513b08](https://github.com/garethgeorge/backrest/commit/b513b08e51434c28c90f5f062b4ae292f6854f4e)) +* task priority not taking effect ([af7462c](https://github.com/garethgeorge/backrest/commit/af7462cefb130153cdaaa08e8ebefefa40e80e49)) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4f9de1b..540808a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -27,5 +27,5 @@ go install github.com/bufbuild/buf/cmd/buf@v1.27.2 ```sh (cd webui && npm i && npm run build) -(cd cmd/restora && go build .) +(cd cmd/backrest && go build .) ``` diff --git a/Dockerfile b/Dockerfile index 874acd3..853a43f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,12 @@ FROM golang:alpine as gobuild RUN mkdir /tmp-orig -COPY restora /restora -RUN /restora --install-deps=true +COPY backrest /backrest +RUN /backrest --install-deps=true FROM scratch -COPY --from=gobuild /root/.local/share/restora/ /.local/share/restora/ +COPY --from=gobuild /root/.local/share/backrest/ /.local/share/backrest/ COPY --from=gobuild /tmp-orig /tmp COPY --from=gobuild /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ -ENTRYPOINT ["/restora"] -COPY restora /restora \ No newline at end of file +ENTRYPOINT ["/backrest"] +COPY backrest /backrest \ No newline at end of file diff --git a/README.md b/README.md index b718711..fcddbda 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# Restora +# Backrest -[![Build and Test](https://github.com/garethgeorge/restora/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/garethgeorge/restora/actions/workflows/build-and-test.yml) +[![Build and Test](https://github.com/garethgeorge/backrest/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/garethgeorge/backrest/actions/workflows/build-and-test.yml) -Restora is a free and open-source web UI wrapper for [restic](https://restic.net/). +Backrest is a free and open-source web UI wrapper for [restic](https://restic.net/). **Project goals:** @@ -11,7 +11,7 @@ Restora is a free and open-source web UI wrapper for [restic](https://restic.net * Safe: all backups leverage simple [restic](https://restic.net/) features and have test coverage. * Easy to pull back the curtain: all common operations should be possible from the UI, but it should be easy to drop down to the command line and use restic directly if needed. * Lightweight: your backup orchestration should blend into the background. The web UI binary is fully self contained as a single executable and the binary is ~25 MB with very light memory overhead at runtime. - * Runs everywhere: Restora should be able to run on any platform that restic supports and that you need backed up. Restora is originally conceived of as a self-hosted backup tool for NAS devices but runs just as well on an interactive Desktop or Laptop. + * Runs everywhere: Backrest should be able to run on any platform that restic supports and that you need backed up. Backrest is originally conceived of as a self-hosted backup tool for NAS devices but runs just as well on an interactive Desktop or Laptop. **Platform Support** @@ -32,24 +32,24 @@ Restora is a free and open-source web UI wrapper for [restic](https://restic.net | | | | -------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| | | -| | | +| | | +| | | # Getting Started -Restora is packaged as a single executable. It can be run directly on Linux, MacOS, and Windows with no dependencies. [restic](https://github.com/restic/restic) will be downloaded and installed automatically on first run. +Backrest is packaged as a single executable. It can be run directly on Linux, MacOS, and Windows with no dependencies. [restic](https://github.com/restic/restic) will be downloaded and installed automatically on first run. Download options - * Download and run a release from the [releases page](https://github.com/garethgeorge/restora/releases). + * Download and run a release from the [releases page](https://github.com/garethgeorge/backrest/releases). * Build from source ([see below](#building)). - * Run with docker: `garethgeorge/restora:latest` ([see on dockerhub](https://hub.docker.com/repository/docker/garethgeorge/restora/)) + * Run with docker: `garethgeorge/backrest:latest` ([see on dockerhub](https://hub.docker.com/repository/docker/garethgeorge/backrest/)) -Restora is accessible from a web browser. By default it binds to `0.0.0.0:9898` and can be accessed at `http://localhost:9898`. +Backrest is accessible from a web browser. By default it binds to `0.0.0.0:9898` and can be accessed at `http://localhost:9898`. ## Running with Docker Compose -Docker image: https://hub.docker.com/garethgeorge/restora +Docker image: https://hub.docker.com/garethgeorge/backrest
Example compose file: @@ -57,17 +57,17 @@ Example compose file: ```yaml version: "3.2" services: - restora: - image: garethgeorge/restora - container_name: restora + backrest: + image: garethgeorge/backrest + container_name: backrest volumes: - - ./restora/data:/data - - ./restora/config:/config - - ./restora/cache:/cache + - ./backrest/data:/data + - ./backrest/config:/config + - ./backrest/cache:/cache - /MY-BACKUP-DATA:/userdata # mount your directories to backup somewhere in the filesystem environment: - - RESTORA_DATA=/data # path for restora data. restic binary and the database are placed here. - - RESTORA_CONFIG=/config/config.json # path for the restora config file. + - BACKREST_DATA=/data # path for backrest data. restic binary and the database are placed here. + - BACKREST_CONFIG=/config/config.json # path for the backrest config file. - XDG_CACHE_HOME=/cache # path for the restic cache which greatly improves performance. restart: unless-stopped ``` @@ -77,33 +77,33 @@ services:
-Download a release from the [releases page](https://github.com/garethgeorge/restora/releases) +Download a release from the [releases page](https://github.com/garethgeorge/backrest/releases) #### Run on startup with cron (Basic) -Move the restora binary to `/usr/local/bin`: +Move the backrest binary to `/usr/local/bin`: ```sh -sudo mv restora /usr/local/bin/restora +sudo mv backrest /usr/local/bin/backrest ``` Add the following line to your crontab (e.g. `crontab -e`): ```sh -@reboot /usr/local/bin/restora +@reboot /usr/local/bin/backrest ``` #### Run on startup with systemd (Recommended) -Download a Linux release from the [releases page](https://github.com/garethgeorge/restora/releases). Move the restora binary to `/usr/local/bin`: +Download a Linux release from the [releases page](https://github.com/garethgeorge/backrest/releases). Move the backrest binary to `/usr/local/bin`: ```sh -sudo mv restora /usr/local/bin/restora +sudo mv backrest /usr/local/bin/backrest ``` -Create a systemd service file at `/etc/systemd/system/restora.service` with the following contents: +Create a systemd service file at `/etc/systemd/system/backrest.service` with the following contents: ```ini [Unit] @@ -114,7 +114,7 @@ After=network.target Type=simple User= Group= -ExecStart=/usr/local/bin/restora +ExecStart=/usr/local/bin/backrest [Install] WantedBy=multi-user.target @@ -123,8 +123,8 @@ WantedBy=multi-user.target Then run the following commands to enable and start the service: ```sh -sudo systemctl enable restora -sudo systemctl start restora +sudo systemctl enable backrest +sudo systemctl start backrest ``` Note: you can set the linux user and group to your primary user (e.g. `whoami` when logged in). @@ -135,9 +135,9 @@ Note: you can set the linux user and group to your primary user (e.g. `whoami` w
-Download a Darwin release from the [releases page](https://github.com/garethgeorge/restora/releases) and install it to `/usr/local/bin`. +Download a Darwin release from the [releases page](https://github.com/garethgeorge/backrest/releases) and install it to `/usr/local/bin`. -At the moment there is no automated way to run Restora on startup on MacOS. You can run it manually or create a launch agent to run it on startup. See [lingon](https://www.peterborgapps.com/lingon/) for a GUI tool to create a launch agent that runs Restora at startup. +At the moment there is no automated way to run Backrest on startup on MacOS. You can run it manually or create a launch agent to run it on startup. See [lingon](https://www.peterborgapps.com/lingon/) for a GUI tool to create a launch agent that runs Backrest at startup.
@@ -145,11 +145,11 @@ At the moment there is no automated way to run Restora on startup on MacOS. You
-Download a Windows release from the [releases page](https://github.com/garethgeorge/restora/releases) and install it to `C:\Program Files\Restora\restora.exe` (create the path if it does not exist). +Download a Windows release from the [releases page](https://github.com/garethgeorge/backrest/releases) and install it to `C:\Program Files\Backrest\backrest.exe` (create the path if it does not exist). To run the binary on login, create a shortcut to the binary and place it in the `shell:startup` folder. See [this windows support article](https://support.microsoft.com/en-us/windows/add-an-app-to-run-automatically-at-startup-in-windows-10-150da165-dcd9-7230-517b-cf3c295d89dd) for more details. -warning: Restora is not tested on Windows to the same bar as Linux and MacOS. Please report any issues you encounter. Some folders may not be accessible to Restora or to restic on Windows due to permissions issues. +warning: Backrest is not tested on Windows to the same bar as Linux and MacOS. Please report any issues you encounter. Some folders may not be accessible to Backrest or to restic on Windows due to permissions issues.
@@ -157,23 +157,23 @@ warning: Restora is not tested on Windows to the same bar as Linux and MacOS. Pl ## Environment Variables - * `RESTORA_PORT` - the port to bind to. Defaults to 9898. - * `RESTORA_CONFIG` - the path to the config file. Defaults to `$HOME/.config/restora/config.json` or if `$XDG_CONFIG_HOME` is set, `$XDG_CONFIG_HOME/restora/config.json`. - * `RESTORA_DATA` - the path to the data directory. Defaults to `$HOME/.local/share/restora` or if `$XDG_DATA_HOME` is set, `$XDG_DATA_HOME/restora`. - * `RESTORA_RESTIC_COMMAND` - the path to the restic binary. Defaults managed version of restic which will be downloaded and installed in the data directory. + * `BACKREST_PORT` - the port to bind to. Defaults to 9898. + * `BACKREST_CONFIG` - the path to the config file. Defaults to `$HOME/.config/backrest/config.json` or if `$XDG_CONFIG_HOME` is set, `$XDG_CONFIG_HOME/backrest/config.json`. + * `BACKREST_DATA` - the path to the data directory. Defaults to `$HOME/.local/share/backrest` or if `$XDG_DATA_HOME` is set, `$XDG_DATA_HOME/backrest`. + * `BACKREST_RESTIC_COMMAND` - the path to the restic binary. Defaults managed version of restic which will be downloaded and installed in the data directory. * `XDG_CACHE_HOME` -- the path to the cache directory. This is propagated to restic. # Usage ## Adding a Repository -A restora repository maps to the concept of a restic repository (and is indeed a restic repo under-the-hood). A repository is a location where restora will store your backups. +A backrest repository maps to the concept of a restic repository (and is indeed a restic repo under-the-hood). A repository is a location where backrest will store your backups. -To add a repository, click the "Add Repository" button on the side nav. You will be prompted to enter a name for the repository and a path to the repository. The path can be a local path or a remote path (e.g. an S3 bucket). See the [restic docs](https://restic.readthedocs.io/en/stable/030_preparing_a_new_repo.html) for more details on the types of repositories that restic supports. Restora allows you to configure environment variables which should be used to pass additional credentials for remote repositories. For example, if you are using an S3 bucket, you can configure the `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables to pass your AWS credentials to restic. +To add a repository, click the "Add Repository" button on the side nav. You will be prompted to enter a name for the repository and a path to the repository. The path can be a local path or a remote path (e.g. an S3 bucket). See the [restic docs](https://restic.readthedocs.io/en/stable/030_preparing_a_new_repo.html) for more details on the types of repositories that restic supports. Backrest allows you to configure environment variables which should be used to pass additional credentials for remote repositories. For example, if you are using an S3 bucket, you can configure the `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables to pass your AWS credentials to restic. ## Adding a Plan -A plan is a new concept introduced by restora. A plan is a set of rules for backing up data. A plan can be configured to backup one or more directories to a single repository. Each plan has it's own schedule and retention policy controlling when backups are run and how long backups are kept. +A plan is a new concept introduced by backrest. A plan is a set of rules for backing up data. A plan can be configured to backup one or more directories to a single repository. Each plan has it's own schedule and retention policy controlling when backups are run and how long backups are kept. To add a plan, click the "Add Plan" button on the side nav. You will be prompted to enter a name for the plan and select a repository to backup to. You will then be prompted to select one or more directories to backup. A default retention policy is given but you can also pick between time based retention or keeping a configurable number of snapshots. @@ -183,7 +183,7 @@ Backups are run automatically based on the scheduled specified in your plan. You ## Best Practices - * Configure a reasonable retention policy for each plan. Restora performs well up to a history of ~1000s of snapshots but too many may eventually slow performance. - * Backup your configuration (e.g. `$RESTORA_CONFIG` or `$HOME/.config/restora/config.json` by default on Linux/MacOS) + * Configure a reasonable retention policy for each plan. Backrest performs well up to a history of ~1000s of snapshots but too many may eventually slow performance. + * Backup your configuration (e.g. `$BACKREST_CONFIG` or `$HOME/.config/backrest/config.json` by default on Linux/MacOS) * Your configuration contains the encryption keys for your repositories. If you loose this file you will not be able to restore your backups. * You may alternatively backup your encryption keys individually in which case you will be able to use restic directly to restore your backups. diff --git a/restora.go b/backrest.go similarity index 90% rename from restora.go rename to backrest.go index e1adcdd..311fb53 100644 --- a/restora.go +++ b/backrest.go @@ -13,11 +13,11 @@ import ( "syscall" rice "github.com/GeertJohan/go.rice" - "github.com/garethgeorge/restora/internal/api" - "github.com/garethgeorge/restora/internal/config" - "github.com/garethgeorge/restora/internal/oplog" - "github.com/garethgeorge/restora/internal/orchestrator" - "github.com/garethgeorge/restora/internal/resticinstaller" + "github.com/garethgeorge/backrest/internal/api" + "github.com/garethgeorge/backrest/internal/config" + "github.com/garethgeorge/backrest/internal/oplog" + "github.com/garethgeorge/backrest/internal/orchestrator" + "github.com/garethgeorge/backrest/internal/resticinstaller" "github.com/mattn/go-colorable" "go.etcd.io/bbolt" "go.uber.org/zap" @@ -25,7 +25,7 @@ import ( ) var ( - installOnly = flag.Bool("install-deps", false, "Install restora and exit") + installOnly = flag.Bool("install-deps", false, "Install backrest and exit") ) func main() { diff --git a/gen/go/types/value.pb.go b/gen/go/types/value.pb.go index b9a3c01..49fdc6d 100644 --- a/gen/go/types/value.pb.go +++ b/gen/go/types/value.pb.go @@ -172,11 +172,11 @@ var file_types_value_proto_rawDesc = []byte{ 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x22, 0x0a, 0x0a, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, + 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x72, 0x65, 0x74, 0x68, 0x67, 0x65, - 0x6f, 0x72, 0x67, 0x65, 0x2f, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x2f, 0x67, 0x65, 0x6e, - 0x2f, 0x67, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x6f, 0x72, 0x67, 0x65, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x72, 0x65, 0x73, 0x74, 0x2f, 0x67, 0x65, + 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/gen/go/v1/config.pb.go b/gen/go/v1/config.pb.go index 6b043b8..e4e0d62 100644 --- a/gen/go/v1/config.pb.go +++ b/gen/go/v1/config.pb.go @@ -495,11 +495,11 @@ var file_v1_config_proto_rawDesc = []byte{ 0x05, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x55, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x6d, 0x61, 0x78, 0x5f, 0x75, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x65, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x6d, - 0x61, 0x78, 0x55, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x42, 0x2d, 0x5a, - 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x72, 0x65, - 0x74, 0x68, 0x67, 0x65, 0x6f, 0x72, 0x67, 0x65, 0x2f, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x2f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x78, 0x55, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x42, 0x2e, 0x5a, + 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x72, 0x65, + 0x74, 0x68, 0x67, 0x65, 0x6f, 0x72, 0x67, 0x65, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x72, 0x65, 0x73, + 0x74, 0x2f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/gen/go/v1/operations.pb.go b/gen/go/v1/operations.pb.go index 81acdf1..c771d6d 100644 --- a/gen/go/v1/operations.pb.go +++ b/gen/go/v1/operations.pb.go @@ -189,7 +189,7 @@ type Operation struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // required, primary ID of the operation. + // required, primary ID of the operation. ID is sequential based on creation time of the operation. Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // required, repo id if associated with a repo RepoId string `protobuf:"bytes,2,opt,name=repo_id,json=repoId,proto3" json:"repo_id,omitempty"` @@ -481,7 +481,7 @@ func (x *OperationBackup) GetLastStatus() *BackupProgressEntry { return nil } -// OperationIndexSnapshot tracks that a snapshot was detected by restora. +// OperationIndexSnapshot tracks that a snapshot was detected by backrest. type OperationIndexSnapshot struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -817,11 +817,11 @@ var file_v1_operations_proto_rawDesc = []byte{ 0x10, 0x04, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x43, - 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x06, 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, + 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x06, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x72, 0x65, 0x74, 0x68, 0x67, - 0x65, 0x6f, 0x72, 0x67, 0x65, 0x2f, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x2f, 0x67, 0x6f, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x65, 0x6f, 0x72, 0x67, 0x65, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x72, 0x65, 0x73, 0x74, 0x2f, 0x67, + 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/gen/go/v1/restic.pb.go b/gen/go/v1/restic.pb.go index 38732ce..43965f4 100644 --- a/gen/go/v1/restic.pb.go +++ b/gen/go/v1/restic.pb.go @@ -676,10 +676,10 @@ var file_v1_restic_proto_rawDesc = []byte{ 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x6f, 0x6e, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x70, 0x65, 0x72, - 0x63, 0x65, 0x6e, 0x74, 0x44, 0x6f, 0x6e, 0x65, 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, + 0x63, 0x65, 0x6e, 0x74, 0x44, 0x6f, 0x6e, 0x65, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x72, 0x65, 0x74, 0x68, 0x67, 0x65, 0x6f, - 0x72, 0x67, 0x65, 0x2f, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x2f, 0x67, 0x6f, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x67, 0x65, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x72, 0x65, 0x73, 0x74, 0x2f, 0x67, 0x6f, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/gen/go/v1/service.pb.go b/gen/go/v1/service.pb.go index 8497e33..aeb666c 100644 --- a/gen/go/v1/service.pb.go +++ b/gen/go/v1/service.pb.go @@ -7,7 +7,7 @@ package v1 import ( - types "github.com/garethgeorge/restora/gen/go/types" + types "github.com/garethgeorge/backrest/gen/go/types" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -604,90 +604,91 @@ var file_v1_service_proto_rawDesc = []byte{ 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x32, 0xff, 0x09, 0x0a, 0x07, 0x52, 0x65, 0x73, 0x74, 0x6f, - 0x72, 0x61, 0x12, 0x43, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0a, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x2f, 0x76, 0x31, - 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3a, 0x0a, 0x09, 0x53, 0x65, 0x74, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x0a, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x1a, 0x0a, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x15, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x0f, 0x3a, 0x01, 0x2a, 0x22, 0x0a, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x3b, 0x0a, 0x07, 0x41, 0x64, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x12, 0x08, - 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x1a, 0x0a, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22, - 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x65, 0x70, 0x6f, - 0x12, 0x61, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x12, - 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x76, 0x31, 0x2f, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x30, 0x01, 0x12, 0x57, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, - 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, - 0x74, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, 0x76, - 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5b, 0x0a, 0x0d, - 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x12, 0x18, 0x2e, - 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, - 0x74, 0x69, 0x63, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x22, - 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x3a, 0x01, 0x2a, 0x22, 0x0d, 0x2f, 0x76, 0x31, 0x2f, - 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x12, 0x70, 0x0a, 0x11, 0x4c, 0x69, 0x73, - 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x1c, + 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x32, 0x80, 0x0a, 0x0a, 0x08, 0x42, 0x61, 0x63, 0x6b, 0x72, + 0x65, 0x73, 0x74, 0x12, 0x43, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0a, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x2f, 0x76, + 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3a, 0x0a, 0x09, 0x53, 0x65, 0x74, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x0a, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x1a, 0x0a, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x15, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x3a, 0x01, 0x2a, 0x22, 0x0a, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3b, 0x0a, 0x07, 0x41, 0x64, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x12, + 0x08, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x1a, 0x0a, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, + 0x22, 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x65, 0x70, + 0x6f, 0x12, 0x61, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, + 0x12, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x76, 0x31, + 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x30, 0x01, 0x12, 0x57, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x11, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, + 0x73, 0x74, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, + 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5b, 0x0a, + 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x12, 0x18, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, - 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, - 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x46, 0x69, - 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x18, 0x3a, 0x01, 0x2a, 0x22, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x6e, 0x61, 0x70, - 0x73, 0x68, 0x6f, 0x74, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x06, 0x42, - 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x12, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, 0x76, - 0x31, 0x2f, 0x63, 0x6d, 0x64, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x4d, 0x0a, 0x05, - 0x50, 0x72, 0x75, 0x6e, 0x65, 0x12, 0x12, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x3a, 0x01, 0x2a, 0x22, 0x0d, 0x2f, 0x76, - 0x31, 0x2f, 0x63, 0x6d, 0x64, 0x2f, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x12, 0x4f, 0x0a, 0x06, 0x46, - 0x6f, 0x72, 0x67, 0x65, 0x74, 0x12, 0x12, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, 0x76, - 0x31, 0x2f, 0x63, 0x6d, 0x64, 0x2f, 0x66, 0x6f, 0x72, 0x67, 0x65, 0x74, 0x12, 0x59, 0x0a, 0x07, - 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x1a, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, - 0x74, 0x6f, 0x72, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x1a, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22, 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6d, 0x64, 0x2f, - 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x4f, 0x0a, 0x06, 0x55, 0x6e, 0x6c, 0x6f, 0x63, - 0x6b, 0x12, 0x12, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x19, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6d, - 0x64, 0x2f, 0x75, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x4e, 0x0a, 0x06, 0x43, 0x61, 0x6e, 0x63, - 0x65, 0x6c, 0x12, 0x11, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x19, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6d, - 0x64, 0x2f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x61, 0x0a, 0x0c, 0x43, 0x6c, 0x65, 0x61, - 0x72, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x17, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, - 0x65, 0x61, 0x72, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x1a, 0x3a, 0x01, 0x2a, 0x22, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6d, 0x64, 0x2f, 0x63, 0x6c, - 0x65, 0x61, 0x72, 0x5f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x5b, 0x0a, 0x10, 0x50, - 0x61, 0x74, 0x68, 0x41, 0x75, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x12, - 0x12, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x1a, 0x11, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x3a, 0x01, - 0x2a, 0x22, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, - 0x65, 0x74, 0x65, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x72, 0x65, 0x74, 0x68, 0x67, 0x65, 0x6f, - 0x72, 0x67, 0x65, 0x2f, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x2f, 0x67, 0x6f, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, + 0x73, 0x74, 0x69, 0x63, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4c, 0x69, 0x73, 0x74, + 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x3a, 0x01, 0x2a, 0x22, 0x0d, 0x2f, 0x76, 0x31, + 0x2f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x12, 0x70, 0x0a, 0x11, 0x4c, 0x69, + 0x73, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, + 0x1c, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, + 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, + 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x46, + 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x18, 0x3a, 0x01, 0x2a, 0x22, 0x13, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x06, + 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x12, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, + 0x76, 0x31, 0x2f, 0x63, 0x6d, 0x64, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x4d, 0x0a, + 0x05, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x12, 0x12, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x3a, 0x01, 0x2a, 0x22, 0x0d, 0x2f, + 0x76, 0x31, 0x2f, 0x63, 0x6d, 0x64, 0x2f, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x12, 0x4f, 0x0a, 0x06, + 0x46, 0x6f, 0x72, 0x67, 0x65, 0x74, 0x12, 0x12, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, + 0x76, 0x31, 0x2f, 0x63, 0x6d, 0x64, 0x2f, 0x66, 0x6f, 0x72, 0x67, 0x65, 0x74, 0x12, 0x59, 0x0a, + 0x07, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x1a, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x1a, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22, 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6d, 0x64, + 0x2f, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x4f, 0x0a, 0x06, 0x55, 0x6e, 0x6c, 0x6f, + 0x63, 0x6b, 0x12, 0x12, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x19, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, 0x76, 0x31, 0x2f, 0x63, + 0x6d, 0x64, 0x2f, 0x75, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x4e, 0x0a, 0x06, 0x43, 0x61, 0x6e, + 0x63, 0x65, 0x6c, 0x12, 0x11, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x36, + 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x19, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, 0x76, 0x31, 0x2f, 0x63, + 0x6d, 0x64, 0x2f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x61, 0x0a, 0x0c, 0x43, 0x6c, 0x65, + 0x61, 0x72, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x17, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x6c, 0x65, 0x61, 0x72, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x1a, 0x3a, 0x01, 0x2a, 0x22, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6d, 0x64, 0x2f, 0x63, + 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x5b, 0x0a, 0x10, + 0x50, 0x61, 0x74, 0x68, 0x41, 0x75, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, + 0x12, 0x12, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x11, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x3a, + 0x01, 0x2a, 0x22, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, + 0x6c, 0x65, 0x74, 0x65, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x72, 0x65, 0x74, 0x68, 0x67, 0x65, + 0x6f, 0x72, 0x67, 0x65, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x72, 0x65, 0x73, 0x74, 0x2f, 0x67, 0x6f, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -723,36 +724,36 @@ var file_v1_service_proto_goTypes = []interface{}{ } var file_v1_service_proto_depIdxs = []int32{ 6, // 0: v1.ListSnapshotFilesResponse.entries:type_name -> v1.LsEntry - 7, // 1: v1.Restora.GetConfig:input_type -> google.protobuf.Empty - 8, // 2: v1.Restora.SetConfig:input_type -> v1.Config - 9, // 3: v1.Restora.AddRepo:input_type -> v1.Repo - 7, // 4: v1.Restora.GetOperationEvents:input_type -> google.protobuf.Empty - 2, // 5: v1.Restora.GetOperations:input_type -> v1.GetOperationsRequest - 1, // 6: v1.Restora.ListSnapshots:input_type -> v1.ListSnapshotsRequest - 4, // 7: v1.Restora.ListSnapshotFiles:input_type -> v1.ListSnapshotFilesRequest - 10, // 8: v1.Restora.Backup:input_type -> types.StringValue - 10, // 9: v1.Restora.Prune:input_type -> types.StringValue - 10, // 10: v1.Restora.Forget:input_type -> types.StringValue - 3, // 11: v1.Restora.Restore:input_type -> v1.RestoreSnapshotRequest - 10, // 12: v1.Restora.Unlock:input_type -> types.StringValue - 11, // 13: v1.Restora.Cancel:input_type -> types.Int64Value - 0, // 14: v1.Restora.ClearHistory:input_type -> v1.ClearHistoryRequest - 10, // 15: v1.Restora.PathAutocomplete:input_type -> types.StringValue - 8, // 16: v1.Restora.GetConfig:output_type -> v1.Config - 8, // 17: v1.Restora.SetConfig:output_type -> v1.Config - 8, // 18: v1.Restora.AddRepo:output_type -> v1.Config - 12, // 19: v1.Restora.GetOperationEvents:output_type -> v1.OperationEvent - 13, // 20: v1.Restora.GetOperations:output_type -> v1.OperationList - 14, // 21: v1.Restora.ListSnapshots:output_type -> v1.ResticSnapshotList - 5, // 22: v1.Restora.ListSnapshotFiles:output_type -> v1.ListSnapshotFilesResponse - 7, // 23: v1.Restora.Backup:output_type -> google.protobuf.Empty - 7, // 24: v1.Restora.Prune:output_type -> google.protobuf.Empty - 7, // 25: v1.Restora.Forget:output_type -> google.protobuf.Empty - 7, // 26: v1.Restora.Restore:output_type -> google.protobuf.Empty - 7, // 27: v1.Restora.Unlock:output_type -> google.protobuf.Empty - 7, // 28: v1.Restora.Cancel:output_type -> google.protobuf.Empty - 7, // 29: v1.Restora.ClearHistory:output_type -> google.protobuf.Empty - 15, // 30: v1.Restora.PathAutocomplete:output_type -> types.StringList + 7, // 1: v1.Backrest.GetConfig:input_type -> google.protobuf.Empty + 8, // 2: v1.Backrest.SetConfig:input_type -> v1.Config + 9, // 3: v1.Backrest.AddRepo:input_type -> v1.Repo + 7, // 4: v1.Backrest.GetOperationEvents:input_type -> google.protobuf.Empty + 2, // 5: v1.Backrest.GetOperations:input_type -> v1.GetOperationsRequest + 1, // 6: v1.Backrest.ListSnapshots:input_type -> v1.ListSnapshotsRequest + 4, // 7: v1.Backrest.ListSnapshotFiles:input_type -> v1.ListSnapshotFilesRequest + 10, // 8: v1.Backrest.Backup:input_type -> types.StringValue + 10, // 9: v1.Backrest.Prune:input_type -> types.StringValue + 10, // 10: v1.Backrest.Forget:input_type -> types.StringValue + 3, // 11: v1.Backrest.Restore:input_type -> v1.RestoreSnapshotRequest + 10, // 12: v1.Backrest.Unlock:input_type -> types.StringValue + 11, // 13: v1.Backrest.Cancel:input_type -> types.Int64Value + 0, // 14: v1.Backrest.ClearHistory:input_type -> v1.ClearHistoryRequest + 10, // 15: v1.Backrest.PathAutocomplete:input_type -> types.StringValue + 8, // 16: v1.Backrest.GetConfig:output_type -> v1.Config + 8, // 17: v1.Backrest.SetConfig:output_type -> v1.Config + 8, // 18: v1.Backrest.AddRepo:output_type -> v1.Config + 12, // 19: v1.Backrest.GetOperationEvents:output_type -> v1.OperationEvent + 13, // 20: v1.Backrest.GetOperations:output_type -> v1.OperationList + 14, // 21: v1.Backrest.ListSnapshots:output_type -> v1.ResticSnapshotList + 5, // 22: v1.Backrest.ListSnapshotFiles:output_type -> v1.ListSnapshotFilesResponse + 7, // 23: v1.Backrest.Backup:output_type -> google.protobuf.Empty + 7, // 24: v1.Backrest.Prune:output_type -> google.protobuf.Empty + 7, // 25: v1.Backrest.Forget:output_type -> google.protobuf.Empty + 7, // 26: v1.Backrest.Restore:output_type -> google.protobuf.Empty + 7, // 27: v1.Backrest.Unlock:output_type -> google.protobuf.Empty + 7, // 28: v1.Backrest.Cancel:output_type -> google.protobuf.Empty + 7, // 29: v1.Backrest.ClearHistory:output_type -> google.protobuf.Empty + 15, // 30: v1.Backrest.PathAutocomplete:output_type -> types.StringList 16, // [16:31] is the sub-list for method output_type 1, // [1:16] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name diff --git a/gen/go/v1/service.pb.gw.go b/gen/go/v1/service.pb.gw.go index 1e06d72..d118324 100644 --- a/gen/go/v1/service.pb.gw.go +++ b/gen/go/v1/service.pb.gw.go @@ -13,7 +13,7 @@ import ( "io" "net/http" - "github.com/garethgeorge/restora/gen/go/types" + "github.com/garethgeorge/backrest/gen/go/types" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" @@ -33,7 +33,7 @@ var _ = runtime.String var _ = utilities.NewDoubleArray var _ = metadata.Join -func request_Restora_GetConfig_0(ctx context.Context, marshaler runtime.Marshaler, client RestoraClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_Backrest_GetConfig_0(ctx context.Context, marshaler runtime.Marshaler, client BackrestClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq emptypb.Empty var metadata runtime.ServerMetadata @@ -42,7 +42,7 @@ func request_Restora_GetConfig_0(ctx context.Context, marshaler runtime.Marshale } -func local_request_Restora_GetConfig_0(ctx context.Context, marshaler runtime.Marshaler, server RestoraServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_Backrest_GetConfig_0(ctx context.Context, marshaler runtime.Marshaler, server BackrestServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq emptypb.Empty var metadata runtime.ServerMetadata @@ -51,7 +51,7 @@ func local_request_Restora_GetConfig_0(ctx context.Context, marshaler runtime.Ma } -func request_Restora_SetConfig_0(ctx context.Context, marshaler runtime.Marshaler, client RestoraClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_Backrest_SetConfig_0(ctx context.Context, marshaler runtime.Marshaler, client BackrestClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq Config var metadata runtime.ServerMetadata @@ -68,7 +68,7 @@ func request_Restora_SetConfig_0(ctx context.Context, marshaler runtime.Marshale } -func local_request_Restora_SetConfig_0(ctx context.Context, marshaler runtime.Marshaler, server RestoraServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_Backrest_SetConfig_0(ctx context.Context, marshaler runtime.Marshaler, server BackrestServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq Config var metadata runtime.ServerMetadata @@ -85,7 +85,7 @@ func local_request_Restora_SetConfig_0(ctx context.Context, marshaler runtime.Ma } -func request_Restora_AddRepo_0(ctx context.Context, marshaler runtime.Marshaler, client RestoraClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_Backrest_AddRepo_0(ctx context.Context, marshaler runtime.Marshaler, client BackrestClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq Repo var metadata runtime.ServerMetadata @@ -102,7 +102,7 @@ func request_Restora_AddRepo_0(ctx context.Context, marshaler runtime.Marshaler, } -func local_request_Restora_AddRepo_0(ctx context.Context, marshaler runtime.Marshaler, server RestoraServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_Backrest_AddRepo_0(ctx context.Context, marshaler runtime.Marshaler, server BackrestServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq Repo var metadata runtime.ServerMetadata @@ -119,7 +119,7 @@ func local_request_Restora_AddRepo_0(ctx context.Context, marshaler runtime.Mars } -func request_Restora_GetOperationEvents_0(ctx context.Context, marshaler runtime.Marshaler, client RestoraClient, req *http.Request, pathParams map[string]string) (Restora_GetOperationEventsClient, runtime.ServerMetadata, error) { +func request_Backrest_GetOperationEvents_0(ctx context.Context, marshaler runtime.Marshaler, client BackrestClient, req *http.Request, pathParams map[string]string) (Backrest_GetOperationEventsClient, runtime.ServerMetadata, error) { var protoReq emptypb.Empty var metadata runtime.ServerMetadata @@ -136,7 +136,7 @@ func request_Restora_GetOperationEvents_0(ctx context.Context, marshaler runtime } -func request_Restora_GetOperations_0(ctx context.Context, marshaler runtime.Marshaler, client RestoraClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_Backrest_GetOperations_0(ctx context.Context, marshaler runtime.Marshaler, client BackrestClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetOperationsRequest var metadata runtime.ServerMetadata @@ -153,7 +153,7 @@ func request_Restora_GetOperations_0(ctx context.Context, marshaler runtime.Mars } -func local_request_Restora_GetOperations_0(ctx context.Context, marshaler runtime.Marshaler, server RestoraServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_Backrest_GetOperations_0(ctx context.Context, marshaler runtime.Marshaler, server BackrestServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetOperationsRequest var metadata runtime.ServerMetadata @@ -170,7 +170,7 @@ func local_request_Restora_GetOperations_0(ctx context.Context, marshaler runtim } -func request_Restora_ListSnapshots_0(ctx context.Context, marshaler runtime.Marshaler, client RestoraClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_Backrest_ListSnapshots_0(ctx context.Context, marshaler runtime.Marshaler, client BackrestClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListSnapshotsRequest var metadata runtime.ServerMetadata @@ -187,7 +187,7 @@ func request_Restora_ListSnapshots_0(ctx context.Context, marshaler runtime.Mars } -func local_request_Restora_ListSnapshots_0(ctx context.Context, marshaler runtime.Marshaler, server RestoraServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_Backrest_ListSnapshots_0(ctx context.Context, marshaler runtime.Marshaler, server BackrestServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListSnapshotsRequest var metadata runtime.ServerMetadata @@ -204,7 +204,7 @@ func local_request_Restora_ListSnapshots_0(ctx context.Context, marshaler runtim } -func request_Restora_ListSnapshotFiles_0(ctx context.Context, marshaler runtime.Marshaler, client RestoraClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_Backrest_ListSnapshotFiles_0(ctx context.Context, marshaler runtime.Marshaler, client BackrestClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListSnapshotFilesRequest var metadata runtime.ServerMetadata @@ -221,7 +221,7 @@ func request_Restora_ListSnapshotFiles_0(ctx context.Context, marshaler runtime. } -func local_request_Restora_ListSnapshotFiles_0(ctx context.Context, marshaler runtime.Marshaler, server RestoraServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_Backrest_ListSnapshotFiles_0(ctx context.Context, marshaler runtime.Marshaler, server BackrestServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListSnapshotFilesRequest var metadata runtime.ServerMetadata @@ -238,7 +238,7 @@ func local_request_Restora_ListSnapshotFiles_0(ctx context.Context, marshaler ru } -func request_Restora_Backup_0(ctx context.Context, marshaler runtime.Marshaler, client RestoraClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_Backrest_Backup_0(ctx context.Context, marshaler runtime.Marshaler, client BackrestClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq types.StringValue var metadata runtime.ServerMetadata @@ -255,7 +255,7 @@ func request_Restora_Backup_0(ctx context.Context, marshaler runtime.Marshaler, } -func local_request_Restora_Backup_0(ctx context.Context, marshaler runtime.Marshaler, server RestoraServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_Backrest_Backup_0(ctx context.Context, marshaler runtime.Marshaler, server BackrestServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq types.StringValue var metadata runtime.ServerMetadata @@ -272,7 +272,7 @@ func local_request_Restora_Backup_0(ctx context.Context, marshaler runtime.Marsh } -func request_Restora_Prune_0(ctx context.Context, marshaler runtime.Marshaler, client RestoraClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_Backrest_Prune_0(ctx context.Context, marshaler runtime.Marshaler, client BackrestClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq types.StringValue var metadata runtime.ServerMetadata @@ -289,7 +289,7 @@ func request_Restora_Prune_0(ctx context.Context, marshaler runtime.Marshaler, c } -func local_request_Restora_Prune_0(ctx context.Context, marshaler runtime.Marshaler, server RestoraServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_Backrest_Prune_0(ctx context.Context, marshaler runtime.Marshaler, server BackrestServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq types.StringValue var metadata runtime.ServerMetadata @@ -306,7 +306,7 @@ func local_request_Restora_Prune_0(ctx context.Context, marshaler runtime.Marsha } -func request_Restora_Forget_0(ctx context.Context, marshaler runtime.Marshaler, client RestoraClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_Backrest_Forget_0(ctx context.Context, marshaler runtime.Marshaler, client BackrestClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq types.StringValue var metadata runtime.ServerMetadata @@ -323,7 +323,7 @@ func request_Restora_Forget_0(ctx context.Context, marshaler runtime.Marshaler, } -func local_request_Restora_Forget_0(ctx context.Context, marshaler runtime.Marshaler, server RestoraServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_Backrest_Forget_0(ctx context.Context, marshaler runtime.Marshaler, server BackrestServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq types.StringValue var metadata runtime.ServerMetadata @@ -340,7 +340,7 @@ func local_request_Restora_Forget_0(ctx context.Context, marshaler runtime.Marsh } -func request_Restora_Restore_0(ctx context.Context, marshaler runtime.Marshaler, client RestoraClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_Backrest_Restore_0(ctx context.Context, marshaler runtime.Marshaler, client BackrestClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq RestoreSnapshotRequest var metadata runtime.ServerMetadata @@ -357,7 +357,7 @@ func request_Restora_Restore_0(ctx context.Context, marshaler runtime.Marshaler, } -func local_request_Restora_Restore_0(ctx context.Context, marshaler runtime.Marshaler, server RestoraServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_Backrest_Restore_0(ctx context.Context, marshaler runtime.Marshaler, server BackrestServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq RestoreSnapshotRequest var metadata runtime.ServerMetadata @@ -374,7 +374,7 @@ func local_request_Restora_Restore_0(ctx context.Context, marshaler runtime.Mars } -func request_Restora_Unlock_0(ctx context.Context, marshaler runtime.Marshaler, client RestoraClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_Backrest_Unlock_0(ctx context.Context, marshaler runtime.Marshaler, client BackrestClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq types.StringValue var metadata runtime.ServerMetadata @@ -391,7 +391,7 @@ func request_Restora_Unlock_0(ctx context.Context, marshaler runtime.Marshaler, } -func local_request_Restora_Unlock_0(ctx context.Context, marshaler runtime.Marshaler, server RestoraServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_Backrest_Unlock_0(ctx context.Context, marshaler runtime.Marshaler, server BackrestServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq types.StringValue var metadata runtime.ServerMetadata @@ -408,7 +408,7 @@ func local_request_Restora_Unlock_0(ctx context.Context, marshaler runtime.Marsh } -func request_Restora_Cancel_0(ctx context.Context, marshaler runtime.Marshaler, client RestoraClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_Backrest_Cancel_0(ctx context.Context, marshaler runtime.Marshaler, client BackrestClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq types.Int64Value var metadata runtime.ServerMetadata @@ -425,7 +425,7 @@ func request_Restora_Cancel_0(ctx context.Context, marshaler runtime.Marshaler, } -func local_request_Restora_Cancel_0(ctx context.Context, marshaler runtime.Marshaler, server RestoraServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_Backrest_Cancel_0(ctx context.Context, marshaler runtime.Marshaler, server BackrestServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq types.Int64Value var metadata runtime.ServerMetadata @@ -442,7 +442,7 @@ func local_request_Restora_Cancel_0(ctx context.Context, marshaler runtime.Marsh } -func request_Restora_ClearHistory_0(ctx context.Context, marshaler runtime.Marshaler, client RestoraClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_Backrest_ClearHistory_0(ctx context.Context, marshaler runtime.Marshaler, client BackrestClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ClearHistoryRequest var metadata runtime.ServerMetadata @@ -459,7 +459,7 @@ func request_Restora_ClearHistory_0(ctx context.Context, marshaler runtime.Marsh } -func local_request_Restora_ClearHistory_0(ctx context.Context, marshaler runtime.Marshaler, server RestoraServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_Backrest_ClearHistory_0(ctx context.Context, marshaler runtime.Marshaler, server BackrestServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ClearHistoryRequest var metadata runtime.ServerMetadata @@ -476,7 +476,7 @@ func local_request_Restora_ClearHistory_0(ctx context.Context, marshaler runtime } -func request_Restora_PathAutocomplete_0(ctx context.Context, marshaler runtime.Marshaler, client RestoraClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_Backrest_PathAutocomplete_0(ctx context.Context, marshaler runtime.Marshaler, client BackrestClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq types.StringValue var metadata runtime.ServerMetadata @@ -493,7 +493,7 @@ func request_Restora_PathAutocomplete_0(ctx context.Context, marshaler runtime.M } -func local_request_Restora_PathAutocomplete_0(ctx context.Context, marshaler runtime.Marshaler, server RestoraServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_Backrest_PathAutocomplete_0(ctx context.Context, marshaler runtime.Marshaler, server BackrestServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq types.StringValue var metadata runtime.ServerMetadata @@ -510,13 +510,13 @@ func local_request_Restora_PathAutocomplete_0(ctx context.Context, marshaler run } -// RegisterRestoraHandlerServer registers the http handlers for service Restora to "mux". -// UnaryRPC :call RestoraServer directly. +// RegisterBackrestHandlerServer registers the http handlers for service Backrest to "mux". +// UnaryRPC :call BackrestServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterRestoraHandlerFromEndpoint instead. -func RegisterRestoraHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RestoraServer) error { +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterBackrestHandlerFromEndpoint instead. +func RegisterBackrestHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BackrestServer) error { - mux.Handle("GET", pattern_Restora_GetConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Backrest_GetConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -524,12 +524,12 @@ func RegisterRestoraHandlerServer(ctx context.Context, mux *runtime.ServeMux, se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.Restora/GetConfig", runtime.WithHTTPPathPattern("/v1/config")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.Backrest/GetConfig", runtime.WithHTTPPathPattern("/v1/config")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Restora_GetConfig_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Backrest_GetConfig_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -537,11 +537,11 @@ func RegisterRestoraHandlerServer(ctx context.Context, mux *runtime.ServeMux, se return } - forward_Restora_GetConfig_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Backrest_GetConfig_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Restora_SetConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Backrest_SetConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -549,12 +549,12 @@ func RegisterRestoraHandlerServer(ctx context.Context, mux *runtime.ServeMux, se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.Restora/SetConfig", runtime.WithHTTPPathPattern("/v1/config")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.Backrest/SetConfig", runtime.WithHTTPPathPattern("/v1/config")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Restora_SetConfig_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Backrest_SetConfig_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -562,11 +562,11 @@ func RegisterRestoraHandlerServer(ctx context.Context, mux *runtime.ServeMux, se return } - forward_Restora_SetConfig_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Backrest_SetConfig_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Restora_AddRepo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Backrest_AddRepo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -574,12 +574,12 @@ func RegisterRestoraHandlerServer(ctx context.Context, mux *runtime.ServeMux, se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.Restora/AddRepo", runtime.WithHTTPPathPattern("/v1/config/repo")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.Backrest/AddRepo", runtime.WithHTTPPathPattern("/v1/config/repo")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Restora_AddRepo_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Backrest_AddRepo_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -587,18 +587,18 @@ func RegisterRestoraHandlerServer(ctx context.Context, mux *runtime.ServeMux, se return } - forward_Restora_AddRepo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Backrest_AddRepo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Restora_GetOperationEvents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Backrest_GetOperationEvents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return }) - mux.Handle("POST", pattern_Restora_GetOperations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Backrest_GetOperations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -606,12 +606,12 @@ func RegisterRestoraHandlerServer(ctx context.Context, mux *runtime.ServeMux, se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.Restora/GetOperations", runtime.WithHTTPPathPattern("/v1/operations")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.Backrest/GetOperations", runtime.WithHTTPPathPattern("/v1/operations")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Restora_GetOperations_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Backrest_GetOperations_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -619,11 +619,11 @@ func RegisterRestoraHandlerServer(ctx context.Context, mux *runtime.ServeMux, se return } - forward_Restora_GetOperations_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Backrest_GetOperations_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Restora_ListSnapshots_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Backrest_ListSnapshots_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -631,12 +631,12 @@ func RegisterRestoraHandlerServer(ctx context.Context, mux *runtime.ServeMux, se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.Restora/ListSnapshots", runtime.WithHTTPPathPattern("/v1/snapshots")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.Backrest/ListSnapshots", runtime.WithHTTPPathPattern("/v1/snapshots")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Restora_ListSnapshots_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Backrest_ListSnapshots_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -644,11 +644,11 @@ func RegisterRestoraHandlerServer(ctx context.Context, mux *runtime.ServeMux, se return } - forward_Restora_ListSnapshots_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Backrest_ListSnapshots_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Restora_ListSnapshotFiles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Backrest_ListSnapshotFiles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -656,12 +656,12 @@ func RegisterRestoraHandlerServer(ctx context.Context, mux *runtime.ServeMux, se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.Restora/ListSnapshotFiles", runtime.WithHTTPPathPattern("/v1/snapshots/files")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.Backrest/ListSnapshotFiles", runtime.WithHTTPPathPattern("/v1/snapshots/files")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Restora_ListSnapshotFiles_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Backrest_ListSnapshotFiles_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -669,11 +669,11 @@ func RegisterRestoraHandlerServer(ctx context.Context, mux *runtime.ServeMux, se return } - forward_Restora_ListSnapshotFiles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Backrest_ListSnapshotFiles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Restora_Backup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Backrest_Backup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -681,12 +681,12 @@ func RegisterRestoraHandlerServer(ctx context.Context, mux *runtime.ServeMux, se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.Restora/Backup", runtime.WithHTTPPathPattern("/v1/cmd/backup")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.Backrest/Backup", runtime.WithHTTPPathPattern("/v1/cmd/backup")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Restora_Backup_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Backrest_Backup_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -694,11 +694,11 @@ func RegisterRestoraHandlerServer(ctx context.Context, mux *runtime.ServeMux, se return } - forward_Restora_Backup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Backrest_Backup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Restora_Prune_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Backrest_Prune_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -706,12 +706,12 @@ func RegisterRestoraHandlerServer(ctx context.Context, mux *runtime.ServeMux, se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.Restora/Prune", runtime.WithHTTPPathPattern("/v1/cmd/prune")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.Backrest/Prune", runtime.WithHTTPPathPattern("/v1/cmd/prune")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Restora_Prune_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Backrest_Prune_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -719,11 +719,11 @@ func RegisterRestoraHandlerServer(ctx context.Context, mux *runtime.ServeMux, se return } - forward_Restora_Prune_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Backrest_Prune_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Restora_Forget_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Backrest_Forget_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -731,12 +731,12 @@ func RegisterRestoraHandlerServer(ctx context.Context, mux *runtime.ServeMux, se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.Restora/Forget", runtime.WithHTTPPathPattern("/v1/cmd/forget")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.Backrest/Forget", runtime.WithHTTPPathPattern("/v1/cmd/forget")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Restora_Forget_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Backrest_Forget_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -744,11 +744,11 @@ func RegisterRestoraHandlerServer(ctx context.Context, mux *runtime.ServeMux, se return } - forward_Restora_Forget_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Backrest_Forget_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Restora_Restore_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Backrest_Restore_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -756,12 +756,12 @@ func RegisterRestoraHandlerServer(ctx context.Context, mux *runtime.ServeMux, se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.Restora/Restore", runtime.WithHTTPPathPattern("/v1/cmd/restore")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.Backrest/Restore", runtime.WithHTTPPathPattern("/v1/cmd/restore")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Restora_Restore_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Backrest_Restore_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -769,11 +769,11 @@ func RegisterRestoraHandlerServer(ctx context.Context, mux *runtime.ServeMux, se return } - forward_Restora_Restore_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Backrest_Restore_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Restora_Unlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Backrest_Unlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -781,12 +781,12 @@ func RegisterRestoraHandlerServer(ctx context.Context, mux *runtime.ServeMux, se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.Restora/Unlock", runtime.WithHTTPPathPattern("/v1/cmd/unlock")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.Backrest/Unlock", runtime.WithHTTPPathPattern("/v1/cmd/unlock")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Restora_Unlock_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Backrest_Unlock_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -794,11 +794,11 @@ func RegisterRestoraHandlerServer(ctx context.Context, mux *runtime.ServeMux, se return } - forward_Restora_Unlock_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Backrest_Unlock_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Restora_Cancel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Backrest_Cancel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -806,12 +806,12 @@ func RegisterRestoraHandlerServer(ctx context.Context, mux *runtime.ServeMux, se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.Restora/Cancel", runtime.WithHTTPPathPattern("/v1/cmd/cancel")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.Backrest/Cancel", runtime.WithHTTPPathPattern("/v1/cmd/cancel")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Restora_Cancel_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Backrest_Cancel_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -819,11 +819,11 @@ func RegisterRestoraHandlerServer(ctx context.Context, mux *runtime.ServeMux, se return } - forward_Restora_Cancel_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Backrest_Cancel_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Restora_ClearHistory_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Backrest_ClearHistory_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -831,12 +831,12 @@ func RegisterRestoraHandlerServer(ctx context.Context, mux *runtime.ServeMux, se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.Restora/ClearHistory", runtime.WithHTTPPathPattern("/v1/cmd/clear_history")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.Backrest/ClearHistory", runtime.WithHTTPPathPattern("/v1/cmd/clear_history")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Restora_ClearHistory_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Backrest_ClearHistory_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -844,11 +844,11 @@ func RegisterRestoraHandlerServer(ctx context.Context, mux *runtime.ServeMux, se return } - forward_Restora_ClearHistory_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Backrest_ClearHistory_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Restora_PathAutocomplete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Backrest_PathAutocomplete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -856,12 +856,12 @@ func RegisterRestoraHandlerServer(ctx context.Context, mux *runtime.ServeMux, se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.Restora/PathAutocomplete", runtime.WithHTTPPathPattern("/v1/autocomplete/path")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/v1.Backrest/PathAutocomplete", runtime.WithHTTPPathPattern("/v1/autocomplete/path")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Restora_PathAutocomplete_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Backrest_PathAutocomplete_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -869,16 +869,16 @@ func RegisterRestoraHandlerServer(ctx context.Context, mux *runtime.ServeMux, se return } - forward_Restora_PathAutocomplete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Backrest_PathAutocomplete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) return nil } -// RegisterRestoraHandlerFromEndpoint is same as RegisterRestoraHandler but +// RegisterBackrestHandlerFromEndpoint is same as RegisterBackrestHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterRestoraHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { +func RegisterBackrestHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { conn, err := grpc.DialContext(ctx, endpoint, opts...) if err != nil { return err @@ -898,349 +898,349 @@ func RegisterRestoraHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeM }() }() - return RegisterRestoraHandler(ctx, mux, conn) + return RegisterBackrestHandler(ctx, mux, conn) } -// RegisterRestoraHandler registers the http handlers for service Restora to "mux". +// RegisterBackrestHandler registers the http handlers for service Backrest to "mux". // The handlers forward requests to the grpc endpoint over "conn". -func RegisterRestoraHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterRestoraHandlerClient(ctx, mux, NewRestoraClient(conn)) +func RegisterBackrestHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterBackrestHandlerClient(ctx, mux, NewBackrestClient(conn)) } -// RegisterRestoraHandlerClient registers the http handlers for service Restora -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "RestoraClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "RestoraClient" +// RegisterBackrestHandlerClient registers the http handlers for service Backrest +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BackrestClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BackrestClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "RestoraClient" to call the correct interceptors. -func RegisterRestoraHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RestoraClient) error { +// "BackrestClient" to call the correct interceptors. +func RegisterBackrestHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BackrestClient) error { - mux.Handle("GET", pattern_Restora_GetConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Backrest_GetConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.Restora/GetConfig", runtime.WithHTTPPathPattern("/v1/config")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.Backrest/GetConfig", runtime.WithHTTPPathPattern("/v1/config")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Restora_GetConfig_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Backrest_GetConfig_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Restora_GetConfig_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Backrest_GetConfig_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Restora_SetConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Backrest_SetConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.Restora/SetConfig", runtime.WithHTTPPathPattern("/v1/config")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.Backrest/SetConfig", runtime.WithHTTPPathPattern("/v1/config")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Restora_SetConfig_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Backrest_SetConfig_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Restora_SetConfig_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Backrest_SetConfig_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Restora_AddRepo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Backrest_AddRepo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.Restora/AddRepo", runtime.WithHTTPPathPattern("/v1/config/repo")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.Backrest/AddRepo", runtime.WithHTTPPathPattern("/v1/config/repo")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Restora_AddRepo_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Backrest_AddRepo_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Restora_AddRepo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Backrest_AddRepo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Restora_GetOperationEvents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Backrest_GetOperationEvents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.Restora/GetOperationEvents", runtime.WithHTTPPathPattern("/v1/events/operations")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.Backrest/GetOperationEvents", runtime.WithHTTPPathPattern("/v1/events/operations")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Restora_GetOperationEvents_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Backrest_GetOperationEvents_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Restora_GetOperationEvents_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + forward_Backrest_GetOperationEvents_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Restora_GetOperations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Backrest_GetOperations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.Restora/GetOperations", runtime.WithHTTPPathPattern("/v1/operations")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.Backrest/GetOperations", runtime.WithHTTPPathPattern("/v1/operations")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Restora_GetOperations_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Backrest_GetOperations_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Restora_GetOperations_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Backrest_GetOperations_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Restora_ListSnapshots_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Backrest_ListSnapshots_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.Restora/ListSnapshots", runtime.WithHTTPPathPattern("/v1/snapshots")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.Backrest/ListSnapshots", runtime.WithHTTPPathPattern("/v1/snapshots")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Restora_ListSnapshots_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Backrest_ListSnapshots_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Restora_ListSnapshots_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Backrest_ListSnapshots_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Restora_ListSnapshotFiles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Backrest_ListSnapshotFiles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.Restora/ListSnapshotFiles", runtime.WithHTTPPathPattern("/v1/snapshots/files")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.Backrest/ListSnapshotFiles", runtime.WithHTTPPathPattern("/v1/snapshots/files")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Restora_ListSnapshotFiles_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Backrest_ListSnapshotFiles_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Restora_ListSnapshotFiles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Backrest_ListSnapshotFiles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Restora_Backup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Backrest_Backup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.Restora/Backup", runtime.WithHTTPPathPattern("/v1/cmd/backup")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.Backrest/Backup", runtime.WithHTTPPathPattern("/v1/cmd/backup")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Restora_Backup_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Backrest_Backup_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Restora_Backup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Backrest_Backup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Restora_Prune_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Backrest_Prune_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.Restora/Prune", runtime.WithHTTPPathPattern("/v1/cmd/prune")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.Backrest/Prune", runtime.WithHTTPPathPattern("/v1/cmd/prune")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Restora_Prune_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Backrest_Prune_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Restora_Prune_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Backrest_Prune_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Restora_Forget_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Backrest_Forget_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.Restora/Forget", runtime.WithHTTPPathPattern("/v1/cmd/forget")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.Backrest/Forget", runtime.WithHTTPPathPattern("/v1/cmd/forget")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Restora_Forget_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Backrest_Forget_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Restora_Forget_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Backrest_Forget_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Restora_Restore_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Backrest_Restore_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.Restora/Restore", runtime.WithHTTPPathPattern("/v1/cmd/restore")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.Backrest/Restore", runtime.WithHTTPPathPattern("/v1/cmd/restore")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Restora_Restore_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Backrest_Restore_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Restora_Restore_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Backrest_Restore_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Restora_Unlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Backrest_Unlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.Restora/Unlock", runtime.WithHTTPPathPattern("/v1/cmd/unlock")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.Backrest/Unlock", runtime.WithHTTPPathPattern("/v1/cmd/unlock")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Restora_Unlock_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Backrest_Unlock_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Restora_Unlock_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Backrest_Unlock_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Restora_Cancel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Backrest_Cancel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.Restora/Cancel", runtime.WithHTTPPathPattern("/v1/cmd/cancel")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.Backrest/Cancel", runtime.WithHTTPPathPattern("/v1/cmd/cancel")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Restora_Cancel_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Backrest_Cancel_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Restora_Cancel_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Backrest_Cancel_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Restora_ClearHistory_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Backrest_ClearHistory_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.Restora/ClearHistory", runtime.WithHTTPPathPattern("/v1/cmd/clear_history")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.Backrest/ClearHistory", runtime.WithHTTPPathPattern("/v1/cmd/clear_history")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Restora_ClearHistory_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Backrest_ClearHistory_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Restora_ClearHistory_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Backrest_ClearHistory_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Restora_PathAutocomplete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Backrest_PathAutocomplete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.Restora/PathAutocomplete", runtime.WithHTTPPathPattern("/v1/autocomplete/path")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/v1.Backrest/PathAutocomplete", runtime.WithHTTPPathPattern("/v1/autocomplete/path")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Restora_PathAutocomplete_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Backrest_PathAutocomplete_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Restora_PathAutocomplete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Backrest_PathAutocomplete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1248,65 +1248,65 @@ func RegisterRestoraHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } var ( - pattern_Restora_GetConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "config"}, "")) + pattern_Backrest_GetConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "config"}, "")) - pattern_Restora_SetConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "config"}, "")) + pattern_Backrest_SetConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "config"}, "")) - pattern_Restora_AddRepo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "config", "repo"}, "")) + pattern_Backrest_AddRepo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "config", "repo"}, "")) - pattern_Restora_GetOperationEvents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "events", "operations"}, "")) + pattern_Backrest_GetOperationEvents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "events", "operations"}, "")) - pattern_Restora_GetOperations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "operations"}, "")) + pattern_Backrest_GetOperations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "operations"}, "")) - pattern_Restora_ListSnapshots_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "snapshots"}, "")) + pattern_Backrest_ListSnapshots_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "snapshots"}, "")) - pattern_Restora_ListSnapshotFiles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "snapshots", "files"}, "")) + pattern_Backrest_ListSnapshotFiles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "snapshots", "files"}, "")) - pattern_Restora_Backup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "cmd", "backup"}, "")) + pattern_Backrest_Backup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "cmd", "backup"}, "")) - pattern_Restora_Prune_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "cmd", "prune"}, "")) + pattern_Backrest_Prune_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "cmd", "prune"}, "")) - pattern_Restora_Forget_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "cmd", "forget"}, "")) + pattern_Backrest_Forget_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "cmd", "forget"}, "")) - pattern_Restora_Restore_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "cmd", "restore"}, "")) + pattern_Backrest_Restore_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "cmd", "restore"}, "")) - pattern_Restora_Unlock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "cmd", "unlock"}, "")) + pattern_Backrest_Unlock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "cmd", "unlock"}, "")) - pattern_Restora_Cancel_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "cmd", "cancel"}, "")) + pattern_Backrest_Cancel_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "cmd", "cancel"}, "")) - pattern_Restora_ClearHistory_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "cmd", "clear_history"}, "")) + pattern_Backrest_ClearHistory_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "cmd", "clear_history"}, "")) - pattern_Restora_PathAutocomplete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "autocomplete", "path"}, "")) + pattern_Backrest_PathAutocomplete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "autocomplete", "path"}, "")) ) var ( - forward_Restora_GetConfig_0 = runtime.ForwardResponseMessage + forward_Backrest_GetConfig_0 = runtime.ForwardResponseMessage - forward_Restora_SetConfig_0 = runtime.ForwardResponseMessage + forward_Backrest_SetConfig_0 = runtime.ForwardResponseMessage - forward_Restora_AddRepo_0 = runtime.ForwardResponseMessage + forward_Backrest_AddRepo_0 = runtime.ForwardResponseMessage - forward_Restora_GetOperationEvents_0 = runtime.ForwardResponseStream + forward_Backrest_GetOperationEvents_0 = runtime.ForwardResponseStream - forward_Restora_GetOperations_0 = runtime.ForwardResponseMessage + forward_Backrest_GetOperations_0 = runtime.ForwardResponseMessage - forward_Restora_ListSnapshots_0 = runtime.ForwardResponseMessage + forward_Backrest_ListSnapshots_0 = runtime.ForwardResponseMessage - forward_Restora_ListSnapshotFiles_0 = runtime.ForwardResponseMessage + forward_Backrest_ListSnapshotFiles_0 = runtime.ForwardResponseMessage - forward_Restora_Backup_0 = runtime.ForwardResponseMessage + forward_Backrest_Backup_0 = runtime.ForwardResponseMessage - forward_Restora_Prune_0 = runtime.ForwardResponseMessage + forward_Backrest_Prune_0 = runtime.ForwardResponseMessage - forward_Restora_Forget_0 = runtime.ForwardResponseMessage + forward_Backrest_Forget_0 = runtime.ForwardResponseMessage - forward_Restora_Restore_0 = runtime.ForwardResponseMessage + forward_Backrest_Restore_0 = runtime.ForwardResponseMessage - forward_Restora_Unlock_0 = runtime.ForwardResponseMessage + forward_Backrest_Unlock_0 = runtime.ForwardResponseMessage - forward_Restora_Cancel_0 = runtime.ForwardResponseMessage + forward_Backrest_Cancel_0 = runtime.ForwardResponseMessage - forward_Restora_ClearHistory_0 = runtime.ForwardResponseMessage + forward_Backrest_ClearHistory_0 = runtime.ForwardResponseMessage - forward_Restora_PathAutocomplete_0 = runtime.ForwardResponseMessage + forward_Backrest_PathAutocomplete_0 = runtime.ForwardResponseMessage ) diff --git a/gen/go/v1/service_grpc.pb.go b/gen/go/v1/service_grpc.pb.go index cb6a738..63f4710 100644 --- a/gen/go/v1/service_grpc.pb.go +++ b/gen/go/v1/service_grpc.pb.go @@ -8,7 +8,7 @@ package v1 import ( context "context" - types "github.com/garethgeorge/restora/gen/go/types" + types "github.com/garethgeorge/backrest/gen/go/types" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -21,31 +21,31 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Restora_GetConfig_FullMethodName = "/v1.Restora/GetConfig" - Restora_SetConfig_FullMethodName = "/v1.Restora/SetConfig" - Restora_AddRepo_FullMethodName = "/v1.Restora/AddRepo" - Restora_GetOperationEvents_FullMethodName = "/v1.Restora/GetOperationEvents" - Restora_GetOperations_FullMethodName = "/v1.Restora/GetOperations" - Restora_ListSnapshots_FullMethodName = "/v1.Restora/ListSnapshots" - Restora_ListSnapshotFiles_FullMethodName = "/v1.Restora/ListSnapshotFiles" - Restora_Backup_FullMethodName = "/v1.Restora/Backup" - Restora_Prune_FullMethodName = "/v1.Restora/Prune" - Restora_Forget_FullMethodName = "/v1.Restora/Forget" - Restora_Restore_FullMethodName = "/v1.Restora/Restore" - Restora_Unlock_FullMethodName = "/v1.Restora/Unlock" - Restora_Cancel_FullMethodName = "/v1.Restora/Cancel" - Restora_ClearHistory_FullMethodName = "/v1.Restora/ClearHistory" - Restora_PathAutocomplete_FullMethodName = "/v1.Restora/PathAutocomplete" + Backrest_GetConfig_FullMethodName = "/v1.Backrest/GetConfig" + Backrest_SetConfig_FullMethodName = "/v1.Backrest/SetConfig" + Backrest_AddRepo_FullMethodName = "/v1.Backrest/AddRepo" + Backrest_GetOperationEvents_FullMethodName = "/v1.Backrest/GetOperationEvents" + Backrest_GetOperations_FullMethodName = "/v1.Backrest/GetOperations" + Backrest_ListSnapshots_FullMethodName = "/v1.Backrest/ListSnapshots" + Backrest_ListSnapshotFiles_FullMethodName = "/v1.Backrest/ListSnapshotFiles" + Backrest_Backup_FullMethodName = "/v1.Backrest/Backup" + Backrest_Prune_FullMethodName = "/v1.Backrest/Prune" + Backrest_Forget_FullMethodName = "/v1.Backrest/Forget" + Backrest_Restore_FullMethodName = "/v1.Backrest/Restore" + Backrest_Unlock_FullMethodName = "/v1.Backrest/Unlock" + Backrest_Cancel_FullMethodName = "/v1.Backrest/Cancel" + Backrest_ClearHistory_FullMethodName = "/v1.Backrest/ClearHistory" + Backrest_PathAutocomplete_FullMethodName = "/v1.Backrest/PathAutocomplete" ) -// RestoraClient is the client API for Restora service. +// BackrestClient is the client API for Backrest service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type RestoraClient interface { +type BackrestClient interface { GetConfig(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Config, error) SetConfig(ctx context.Context, in *Config, opts ...grpc.CallOption) (*Config, error) AddRepo(ctx context.Context, in *Repo, opts ...grpc.CallOption) (*Config, error) - GetOperationEvents(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (Restora_GetOperationEventsClient, error) + GetOperationEvents(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (Backrest_GetOperationEventsClient, error) GetOperations(ctx context.Context, in *GetOperationsRequest, opts ...grpc.CallOption) (*OperationList, error) ListSnapshots(ctx context.Context, in *ListSnapshotsRequest, opts ...grpc.CallOption) (*ResticSnapshotList, error) ListSnapshotFiles(ctx context.Context, in *ListSnapshotFilesRequest, opts ...grpc.CallOption) (*ListSnapshotFilesResponse, error) @@ -66,47 +66,47 @@ type RestoraClient interface { PathAutocomplete(ctx context.Context, in *types.StringValue, opts ...grpc.CallOption) (*types.StringList, error) } -type restoraClient struct { +type backrestClient struct { cc grpc.ClientConnInterface } -func NewRestoraClient(cc grpc.ClientConnInterface) RestoraClient { - return &restoraClient{cc} +func NewBackrestClient(cc grpc.ClientConnInterface) BackrestClient { + return &backrestClient{cc} } -func (c *restoraClient) GetConfig(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Config, error) { +func (c *backrestClient) GetConfig(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Config, error) { out := new(Config) - err := c.cc.Invoke(ctx, Restora_GetConfig_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Backrest_GetConfig_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *restoraClient) SetConfig(ctx context.Context, in *Config, opts ...grpc.CallOption) (*Config, error) { +func (c *backrestClient) SetConfig(ctx context.Context, in *Config, opts ...grpc.CallOption) (*Config, error) { out := new(Config) - err := c.cc.Invoke(ctx, Restora_SetConfig_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Backrest_SetConfig_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *restoraClient) AddRepo(ctx context.Context, in *Repo, opts ...grpc.CallOption) (*Config, error) { +func (c *backrestClient) AddRepo(ctx context.Context, in *Repo, opts ...grpc.CallOption) (*Config, error) { out := new(Config) - err := c.cc.Invoke(ctx, Restora_AddRepo_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Backrest_AddRepo_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *restoraClient) GetOperationEvents(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (Restora_GetOperationEventsClient, error) { - stream, err := c.cc.NewStream(ctx, &Restora_ServiceDesc.Streams[0], Restora_GetOperationEvents_FullMethodName, opts...) +func (c *backrestClient) GetOperationEvents(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (Backrest_GetOperationEventsClient, error) { + stream, err := c.cc.NewStream(ctx, &Backrest_ServiceDesc.Streams[0], Backrest_GetOperationEvents_FullMethodName, opts...) if err != nil { return nil, err } - x := &restoraGetOperationEventsClient{stream} + x := &backrestGetOperationEventsClient{stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -116,16 +116,16 @@ func (c *restoraClient) GetOperationEvents(ctx context.Context, in *emptypb.Empt return x, nil } -type Restora_GetOperationEventsClient interface { +type Backrest_GetOperationEventsClient interface { Recv() (*OperationEvent, error) grpc.ClientStream } -type restoraGetOperationEventsClient struct { +type backrestGetOperationEventsClient struct { grpc.ClientStream } -func (x *restoraGetOperationEventsClient) Recv() (*OperationEvent, error) { +func (x *backrestGetOperationEventsClient) Recv() (*OperationEvent, error) { m := new(OperationEvent) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err @@ -133,113 +133,113 @@ func (x *restoraGetOperationEventsClient) Recv() (*OperationEvent, error) { return m, nil } -func (c *restoraClient) GetOperations(ctx context.Context, in *GetOperationsRequest, opts ...grpc.CallOption) (*OperationList, error) { +func (c *backrestClient) GetOperations(ctx context.Context, in *GetOperationsRequest, opts ...grpc.CallOption) (*OperationList, error) { out := new(OperationList) - err := c.cc.Invoke(ctx, Restora_GetOperations_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Backrest_GetOperations_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *restoraClient) ListSnapshots(ctx context.Context, in *ListSnapshotsRequest, opts ...grpc.CallOption) (*ResticSnapshotList, error) { +func (c *backrestClient) ListSnapshots(ctx context.Context, in *ListSnapshotsRequest, opts ...grpc.CallOption) (*ResticSnapshotList, error) { out := new(ResticSnapshotList) - err := c.cc.Invoke(ctx, Restora_ListSnapshots_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Backrest_ListSnapshots_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *restoraClient) ListSnapshotFiles(ctx context.Context, in *ListSnapshotFilesRequest, opts ...grpc.CallOption) (*ListSnapshotFilesResponse, error) { +func (c *backrestClient) ListSnapshotFiles(ctx context.Context, in *ListSnapshotFilesRequest, opts ...grpc.CallOption) (*ListSnapshotFilesResponse, error) { out := new(ListSnapshotFilesResponse) - err := c.cc.Invoke(ctx, Restora_ListSnapshotFiles_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Backrest_ListSnapshotFiles_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *restoraClient) Backup(ctx context.Context, in *types.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *backrestClient) Backup(ctx context.Context, in *types.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, Restora_Backup_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Backrest_Backup_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *restoraClient) Prune(ctx context.Context, in *types.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *backrestClient) Prune(ctx context.Context, in *types.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, Restora_Prune_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Backrest_Prune_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *restoraClient) Forget(ctx context.Context, in *types.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *backrestClient) Forget(ctx context.Context, in *types.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, Restora_Forget_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Backrest_Forget_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *restoraClient) Restore(ctx context.Context, in *RestoreSnapshotRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *backrestClient) Restore(ctx context.Context, in *RestoreSnapshotRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, Restora_Restore_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Backrest_Restore_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *restoraClient) Unlock(ctx context.Context, in *types.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *backrestClient) Unlock(ctx context.Context, in *types.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, Restora_Unlock_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Backrest_Unlock_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *restoraClient) Cancel(ctx context.Context, in *types.Int64Value, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *backrestClient) Cancel(ctx context.Context, in *types.Int64Value, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, Restora_Cancel_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Backrest_Cancel_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *restoraClient) ClearHistory(ctx context.Context, in *ClearHistoryRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *backrestClient) ClearHistory(ctx context.Context, in *ClearHistoryRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, Restora_ClearHistory_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Backrest_ClearHistory_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *restoraClient) PathAutocomplete(ctx context.Context, in *types.StringValue, opts ...grpc.CallOption) (*types.StringList, error) { +func (c *backrestClient) PathAutocomplete(ctx context.Context, in *types.StringValue, opts ...grpc.CallOption) (*types.StringList, error) { out := new(types.StringList) - err := c.cc.Invoke(ctx, Restora_PathAutocomplete_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Backrest_PathAutocomplete_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -// RestoraServer is the server API for Restora service. -// All implementations must embed UnimplementedRestoraServer +// BackrestServer is the server API for Backrest service. +// All implementations must embed UnimplementedBackrestServer // for forward compatibility -type RestoraServer interface { +type BackrestServer interface { GetConfig(context.Context, *emptypb.Empty) (*Config, error) SetConfig(context.Context, *Config) (*Config, error) AddRepo(context.Context, *Repo) (*Config, error) - GetOperationEvents(*emptypb.Empty, Restora_GetOperationEventsServer) error + GetOperationEvents(*emptypb.Empty, Backrest_GetOperationEventsServer) error GetOperations(context.Context, *GetOperationsRequest) (*OperationList, error) ListSnapshots(context.Context, *ListSnapshotsRequest) (*ResticSnapshotList, error) ListSnapshotFiles(context.Context, *ListSnapshotFilesRequest) (*ListSnapshotFilesResponse, error) @@ -258,412 +258,412 @@ type RestoraServer interface { ClearHistory(context.Context, *ClearHistoryRequest) (*emptypb.Empty, error) // PathAutocomplete provides path autocompletion options for a given filesystem path. PathAutocomplete(context.Context, *types.StringValue) (*types.StringList, error) - mustEmbedUnimplementedRestoraServer() + mustEmbedUnimplementedBackrestServer() } -// UnimplementedRestoraServer must be embedded to have forward compatible implementations. -type UnimplementedRestoraServer struct { +// UnimplementedBackrestServer must be embedded to have forward compatible implementations. +type UnimplementedBackrestServer struct { } -func (UnimplementedRestoraServer) GetConfig(context.Context, *emptypb.Empty) (*Config, error) { +func (UnimplementedBackrestServer) GetConfig(context.Context, *emptypb.Empty) (*Config, error) { return nil, status.Errorf(codes.Unimplemented, "method GetConfig not implemented") } -func (UnimplementedRestoraServer) SetConfig(context.Context, *Config) (*Config, error) { +func (UnimplementedBackrestServer) SetConfig(context.Context, *Config) (*Config, error) { return nil, status.Errorf(codes.Unimplemented, "method SetConfig not implemented") } -func (UnimplementedRestoraServer) AddRepo(context.Context, *Repo) (*Config, error) { +func (UnimplementedBackrestServer) AddRepo(context.Context, *Repo) (*Config, error) { return nil, status.Errorf(codes.Unimplemented, "method AddRepo not implemented") } -func (UnimplementedRestoraServer) GetOperationEvents(*emptypb.Empty, Restora_GetOperationEventsServer) error { +func (UnimplementedBackrestServer) GetOperationEvents(*emptypb.Empty, Backrest_GetOperationEventsServer) error { return status.Errorf(codes.Unimplemented, "method GetOperationEvents not implemented") } -func (UnimplementedRestoraServer) GetOperations(context.Context, *GetOperationsRequest) (*OperationList, error) { +func (UnimplementedBackrestServer) GetOperations(context.Context, *GetOperationsRequest) (*OperationList, error) { return nil, status.Errorf(codes.Unimplemented, "method GetOperations not implemented") } -func (UnimplementedRestoraServer) ListSnapshots(context.Context, *ListSnapshotsRequest) (*ResticSnapshotList, error) { +func (UnimplementedBackrestServer) ListSnapshots(context.Context, *ListSnapshotsRequest) (*ResticSnapshotList, error) { return nil, status.Errorf(codes.Unimplemented, "method ListSnapshots not implemented") } -func (UnimplementedRestoraServer) ListSnapshotFiles(context.Context, *ListSnapshotFilesRequest) (*ListSnapshotFilesResponse, error) { +func (UnimplementedBackrestServer) ListSnapshotFiles(context.Context, *ListSnapshotFilesRequest) (*ListSnapshotFilesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListSnapshotFiles not implemented") } -func (UnimplementedRestoraServer) Backup(context.Context, *types.StringValue) (*emptypb.Empty, error) { +func (UnimplementedBackrestServer) Backup(context.Context, *types.StringValue) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Backup not implemented") } -func (UnimplementedRestoraServer) Prune(context.Context, *types.StringValue) (*emptypb.Empty, error) { +func (UnimplementedBackrestServer) Prune(context.Context, *types.StringValue) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Prune not implemented") } -func (UnimplementedRestoraServer) Forget(context.Context, *types.StringValue) (*emptypb.Empty, error) { +func (UnimplementedBackrestServer) Forget(context.Context, *types.StringValue) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Forget not implemented") } -func (UnimplementedRestoraServer) Restore(context.Context, *RestoreSnapshotRequest) (*emptypb.Empty, error) { +func (UnimplementedBackrestServer) Restore(context.Context, *RestoreSnapshotRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Restore not implemented") } -func (UnimplementedRestoraServer) Unlock(context.Context, *types.StringValue) (*emptypb.Empty, error) { +func (UnimplementedBackrestServer) Unlock(context.Context, *types.StringValue) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Unlock not implemented") } -func (UnimplementedRestoraServer) Cancel(context.Context, *types.Int64Value) (*emptypb.Empty, error) { +func (UnimplementedBackrestServer) Cancel(context.Context, *types.Int64Value) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Cancel not implemented") } -func (UnimplementedRestoraServer) ClearHistory(context.Context, *ClearHistoryRequest) (*emptypb.Empty, error) { +func (UnimplementedBackrestServer) ClearHistory(context.Context, *ClearHistoryRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method ClearHistory not implemented") } -func (UnimplementedRestoraServer) PathAutocomplete(context.Context, *types.StringValue) (*types.StringList, error) { +func (UnimplementedBackrestServer) PathAutocomplete(context.Context, *types.StringValue) (*types.StringList, error) { return nil, status.Errorf(codes.Unimplemented, "method PathAutocomplete not implemented") } -func (UnimplementedRestoraServer) mustEmbedUnimplementedRestoraServer() {} +func (UnimplementedBackrestServer) mustEmbedUnimplementedBackrestServer() {} -// UnsafeRestoraServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to RestoraServer will +// UnsafeBackrestServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to BackrestServer will // result in compilation errors. -type UnsafeRestoraServer interface { - mustEmbedUnimplementedRestoraServer() +type UnsafeBackrestServer interface { + mustEmbedUnimplementedBackrestServer() } -func RegisterRestoraServer(s grpc.ServiceRegistrar, srv RestoraServer) { - s.RegisterService(&Restora_ServiceDesc, srv) +func RegisterBackrestServer(s grpc.ServiceRegistrar, srv BackrestServer) { + s.RegisterService(&Backrest_ServiceDesc, srv) } -func _Restora_GetConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Backrest_GetConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(emptypb.Empty) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(RestoraServer).GetConfig(ctx, in) + return srv.(BackrestServer).GetConfig(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Restora_GetConfig_FullMethodName, + FullMethod: Backrest_GetConfig_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RestoraServer).GetConfig(ctx, req.(*emptypb.Empty)) + return srv.(BackrestServer).GetConfig(ctx, req.(*emptypb.Empty)) } return interceptor(ctx, in, info, handler) } -func _Restora_SetConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Backrest_SetConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Config) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(RestoraServer).SetConfig(ctx, in) + return srv.(BackrestServer).SetConfig(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Restora_SetConfig_FullMethodName, + FullMethod: Backrest_SetConfig_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RestoraServer).SetConfig(ctx, req.(*Config)) + return srv.(BackrestServer).SetConfig(ctx, req.(*Config)) } return interceptor(ctx, in, info, handler) } -func _Restora_AddRepo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Backrest_AddRepo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Repo) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(RestoraServer).AddRepo(ctx, in) + return srv.(BackrestServer).AddRepo(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Restora_AddRepo_FullMethodName, + FullMethod: Backrest_AddRepo_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RestoraServer).AddRepo(ctx, req.(*Repo)) + return srv.(BackrestServer).AddRepo(ctx, req.(*Repo)) } return interceptor(ctx, in, info, handler) } -func _Restora_GetOperationEvents_Handler(srv interface{}, stream grpc.ServerStream) error { +func _Backrest_GetOperationEvents_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(emptypb.Empty) if err := stream.RecvMsg(m); err != nil { return err } - return srv.(RestoraServer).GetOperationEvents(m, &restoraGetOperationEventsServer{stream}) + return srv.(BackrestServer).GetOperationEvents(m, &backrestGetOperationEventsServer{stream}) } -type Restora_GetOperationEventsServer interface { +type Backrest_GetOperationEventsServer interface { Send(*OperationEvent) error grpc.ServerStream } -type restoraGetOperationEventsServer struct { +type backrestGetOperationEventsServer struct { grpc.ServerStream } -func (x *restoraGetOperationEventsServer) Send(m *OperationEvent) error { +func (x *backrestGetOperationEventsServer) Send(m *OperationEvent) error { return x.ServerStream.SendMsg(m) } -func _Restora_GetOperations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Backrest_GetOperations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetOperationsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(RestoraServer).GetOperations(ctx, in) + return srv.(BackrestServer).GetOperations(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Restora_GetOperations_FullMethodName, + FullMethod: Backrest_GetOperations_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RestoraServer).GetOperations(ctx, req.(*GetOperationsRequest)) + return srv.(BackrestServer).GetOperations(ctx, req.(*GetOperationsRequest)) } return interceptor(ctx, in, info, handler) } -func _Restora_ListSnapshots_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Backrest_ListSnapshots_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListSnapshotsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(RestoraServer).ListSnapshots(ctx, in) + return srv.(BackrestServer).ListSnapshots(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Restora_ListSnapshots_FullMethodName, + FullMethod: Backrest_ListSnapshots_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RestoraServer).ListSnapshots(ctx, req.(*ListSnapshotsRequest)) + return srv.(BackrestServer).ListSnapshots(ctx, req.(*ListSnapshotsRequest)) } return interceptor(ctx, in, info, handler) } -func _Restora_ListSnapshotFiles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Backrest_ListSnapshotFiles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListSnapshotFilesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(RestoraServer).ListSnapshotFiles(ctx, in) + return srv.(BackrestServer).ListSnapshotFiles(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Restora_ListSnapshotFiles_FullMethodName, + FullMethod: Backrest_ListSnapshotFiles_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RestoraServer).ListSnapshotFiles(ctx, req.(*ListSnapshotFilesRequest)) + return srv.(BackrestServer).ListSnapshotFiles(ctx, req.(*ListSnapshotFilesRequest)) } return interceptor(ctx, in, info, handler) } -func _Restora_Backup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Backrest_Backup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(types.StringValue) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(RestoraServer).Backup(ctx, in) + return srv.(BackrestServer).Backup(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Restora_Backup_FullMethodName, + FullMethod: Backrest_Backup_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RestoraServer).Backup(ctx, req.(*types.StringValue)) + return srv.(BackrestServer).Backup(ctx, req.(*types.StringValue)) } return interceptor(ctx, in, info, handler) } -func _Restora_Prune_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Backrest_Prune_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(types.StringValue) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(RestoraServer).Prune(ctx, in) + return srv.(BackrestServer).Prune(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Restora_Prune_FullMethodName, + FullMethod: Backrest_Prune_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RestoraServer).Prune(ctx, req.(*types.StringValue)) + return srv.(BackrestServer).Prune(ctx, req.(*types.StringValue)) } return interceptor(ctx, in, info, handler) } -func _Restora_Forget_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Backrest_Forget_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(types.StringValue) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(RestoraServer).Forget(ctx, in) + return srv.(BackrestServer).Forget(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Restora_Forget_FullMethodName, + FullMethod: Backrest_Forget_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RestoraServer).Forget(ctx, req.(*types.StringValue)) + return srv.(BackrestServer).Forget(ctx, req.(*types.StringValue)) } return interceptor(ctx, in, info, handler) } -func _Restora_Restore_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Backrest_Restore_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(RestoreSnapshotRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(RestoraServer).Restore(ctx, in) + return srv.(BackrestServer).Restore(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Restora_Restore_FullMethodName, + FullMethod: Backrest_Restore_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RestoraServer).Restore(ctx, req.(*RestoreSnapshotRequest)) + return srv.(BackrestServer).Restore(ctx, req.(*RestoreSnapshotRequest)) } return interceptor(ctx, in, info, handler) } -func _Restora_Unlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Backrest_Unlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(types.StringValue) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(RestoraServer).Unlock(ctx, in) + return srv.(BackrestServer).Unlock(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Restora_Unlock_FullMethodName, + FullMethod: Backrest_Unlock_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RestoraServer).Unlock(ctx, req.(*types.StringValue)) + return srv.(BackrestServer).Unlock(ctx, req.(*types.StringValue)) } return interceptor(ctx, in, info, handler) } -func _Restora_Cancel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Backrest_Cancel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(types.Int64Value) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(RestoraServer).Cancel(ctx, in) + return srv.(BackrestServer).Cancel(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Restora_Cancel_FullMethodName, + FullMethod: Backrest_Cancel_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RestoraServer).Cancel(ctx, req.(*types.Int64Value)) + return srv.(BackrestServer).Cancel(ctx, req.(*types.Int64Value)) } return interceptor(ctx, in, info, handler) } -func _Restora_ClearHistory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Backrest_ClearHistory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ClearHistoryRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(RestoraServer).ClearHistory(ctx, in) + return srv.(BackrestServer).ClearHistory(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Restora_ClearHistory_FullMethodName, + FullMethod: Backrest_ClearHistory_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RestoraServer).ClearHistory(ctx, req.(*ClearHistoryRequest)) + return srv.(BackrestServer).ClearHistory(ctx, req.(*ClearHistoryRequest)) } return interceptor(ctx, in, info, handler) } -func _Restora_PathAutocomplete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Backrest_PathAutocomplete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(types.StringValue) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(RestoraServer).PathAutocomplete(ctx, in) + return srv.(BackrestServer).PathAutocomplete(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Restora_PathAutocomplete_FullMethodName, + FullMethod: Backrest_PathAutocomplete_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RestoraServer).PathAutocomplete(ctx, req.(*types.StringValue)) + return srv.(BackrestServer).PathAutocomplete(ctx, req.(*types.StringValue)) } return interceptor(ctx, in, info, handler) } -// Restora_ServiceDesc is the grpc.ServiceDesc for Restora service. +// Backrest_ServiceDesc is the grpc.ServiceDesc for Backrest service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) -var Restora_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "v1.Restora", - HandlerType: (*RestoraServer)(nil), +var Backrest_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "v1.Backrest", + HandlerType: (*BackrestServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetConfig", - Handler: _Restora_GetConfig_Handler, + Handler: _Backrest_GetConfig_Handler, }, { MethodName: "SetConfig", - Handler: _Restora_SetConfig_Handler, + Handler: _Backrest_SetConfig_Handler, }, { MethodName: "AddRepo", - Handler: _Restora_AddRepo_Handler, + Handler: _Backrest_AddRepo_Handler, }, { MethodName: "GetOperations", - Handler: _Restora_GetOperations_Handler, + Handler: _Backrest_GetOperations_Handler, }, { MethodName: "ListSnapshots", - Handler: _Restora_ListSnapshots_Handler, + Handler: _Backrest_ListSnapshots_Handler, }, { MethodName: "ListSnapshotFiles", - Handler: _Restora_ListSnapshotFiles_Handler, + Handler: _Backrest_ListSnapshotFiles_Handler, }, { MethodName: "Backup", - Handler: _Restora_Backup_Handler, + Handler: _Backrest_Backup_Handler, }, { MethodName: "Prune", - Handler: _Restora_Prune_Handler, + Handler: _Backrest_Prune_Handler, }, { MethodName: "Forget", - Handler: _Restora_Forget_Handler, + Handler: _Backrest_Forget_Handler, }, { MethodName: "Restore", - Handler: _Restora_Restore_Handler, + Handler: _Backrest_Restore_Handler, }, { MethodName: "Unlock", - Handler: _Restora_Unlock_Handler, + Handler: _Backrest_Unlock_Handler, }, { MethodName: "Cancel", - Handler: _Restora_Cancel_Handler, + Handler: _Backrest_Cancel_Handler, }, { MethodName: "ClearHistory", - Handler: _Restora_ClearHistory_Handler, + Handler: _Backrest_ClearHistory_Handler, }, { MethodName: "PathAutocomplete", - Handler: _Restora_PathAutocomplete_Handler, + Handler: _Backrest_PathAutocomplete_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "GetOperationEvents", - Handler: _Restora_GetOperationEvents_Handler, + Handler: _Backrest_GetOperationEvents_Handler, ServerStreams: true, }, }, diff --git a/go.mod b/go.mod index 14431c1..eefa605 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/garethgeorge/restora +module github.com/garethgeorge/backrest go 1.21 diff --git a/internal/api/api.go b/internal/api/api.go index ff5acc6..119e446 100644 --- a/internal/api/api.go +++ b/internal/api/api.go @@ -8,7 +8,7 @@ import ( "os" "path/filepath" - v1 "github.com/garethgeorge/restora/gen/go/v1" + v1 "github.com/garethgeorge/backrest/gen/go/v1" "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/logging" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "go.uber.org/zap" @@ -68,7 +68,7 @@ func serveGRPC(ctx context.Context, socket string, server *Server) error { logging.StreamServerInterceptor(loggingFunc(logger)), ), ) - v1.RegisterRestoraServer(grpcServer, server) + v1.RegisterBackrestServer(grpcServer, server) go func() { <-ctx.Done() grpcServer.GracefulStop() @@ -81,7 +81,7 @@ func serveGRPC(ctx context.Context, socket string, server *Server) error { } func serveHTTPHandlers(ctx context.Context, server *Server, mux *runtime.ServeMux) error { - tmpDir, err := os.MkdirTemp("", "restora") + tmpDir, err := os.MkdirTemp("", "backrest") if err != nil { return fmt.Errorf("failed to create temp dir for unix domain socket: %w", err) } @@ -89,10 +89,10 @@ func serveHTTPHandlers(ctx context.Context, server *Server, mux *runtime.ServeMu os.RemoveAll(tmpDir) }() - socket := filepath.Join(tmpDir, "restora.sock") + socket := filepath.Join(tmpDir, "backrest.sock") opts := []grpc.DialOption{grpc.WithTransportCredentials(insecure.NewCredentials())} - err = v1.RegisterRestoraHandlerFromEndpoint(ctx, mux, fmt.Sprintf("unix:%v", socket), opts) + err = v1.RegisterBackrestHandlerFromEndpoint(ctx, mux, fmt.Sprintf("unix:%v", socket), opts) if err != nil { return fmt.Errorf("failed to register gateway: %w", err) } diff --git a/internal/api/server.go b/internal/api/server.go index 3a83bd9..61b2d11 100644 --- a/internal/api/server.go +++ b/internal/api/server.go @@ -8,28 +8,28 @@ import ( "path" "time" - "github.com/garethgeorge/restora/gen/go/types" - v1 "github.com/garethgeorge/restora/gen/go/v1" - "github.com/garethgeorge/restora/internal/config" - "github.com/garethgeorge/restora/internal/oplog" - "github.com/garethgeorge/restora/internal/oplog/indexutil" - "github.com/garethgeorge/restora/internal/orchestrator" - "github.com/garethgeorge/restora/internal/protoutil" - "github.com/garethgeorge/restora/internal/resticinstaller" - "github.com/garethgeorge/restora/pkg/restic" + "github.com/garethgeorge/backrest/gen/go/types" + v1 "github.com/garethgeorge/backrest/gen/go/v1" + "github.com/garethgeorge/backrest/internal/config" + "github.com/garethgeorge/backrest/internal/oplog" + "github.com/garethgeorge/backrest/internal/oplog/indexutil" + "github.com/garethgeorge/backrest/internal/orchestrator" + "github.com/garethgeorge/backrest/internal/protoutil" + "github.com/garethgeorge/backrest/internal/resticinstaller" + "github.com/garethgeorge/backrest/pkg/restic" "go.uber.org/zap" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/emptypb" ) type Server struct { - *v1.UnimplementedRestoraServer + *v1.UnimplementedBackrestServer config config.ConfigStore orchestrator *orchestrator.Orchestrator oplog *oplog.OpLog } -var _ v1.RestoraServer = &Server{} +var _ v1.BackrestServer = &Server{} func NewServer(config config.ConfigStore, orchestrator *orchestrator.Orchestrator, oplog *oplog.OpLog) *Server { s := &Server{ @@ -158,7 +158,7 @@ func (s *Server) ListSnapshotFiles(ctx context.Context, query *v1.ListSnapshotFi } // GetOperationEvents implements GET /v1/events/operations -func (s *Server) GetOperationEvents(_ *emptypb.Empty, stream v1.Restora_GetOperationEventsServer) error { +func (s *Server) GetOperationEvents(_ *emptypb.Empty, stream v1.Backrest_GetOperationEventsServer) error { errorChan := make(chan error) defer close(errorChan) callback := func(oldOp *v1.Operation, newOp *v1.Operation) { diff --git a/internal/config/config.go b/internal/config/config.go index 6efa737..d2652e8 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -7,7 +7,7 @@ import ( "path" "sync" - v1 "github.com/garethgeorge/restora/gen/go/v1" + v1 "github.com/garethgeorge/backrest/gen/go/v1" ) var ErrConfigNotFound = fmt.Errorf("config not found") @@ -30,7 +30,7 @@ func configDir(override string) string { } if env := os.Getenv("XDG_CONFIG_HOME"); env != "" { - return path.Join(env, "restora") + return path.Join(env, "backrest") } home, err := os.UserHomeDir() @@ -38,7 +38,7 @@ func configDir(override string) string { panic(err) } - return fmt.Sprintf("%v/.config/restora", home) + return fmt.Sprintf("%v/.config/backrest", home) } type CachingValidatingStore struct { diff --git a/internal/config/config_test.go b/internal/config/config_test.go index c96831b..d62b7eb 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -4,7 +4,7 @@ import ( "strings" "testing" - v1 "github.com/garethgeorge/restora/gen/go/v1" + v1 "github.com/garethgeorge/backrest/gen/go/v1" "google.golang.org/protobuf/proto" ) diff --git a/internal/config/environment.go b/internal/config/environment.go index 4ca5015..1683ad5 100644 --- a/internal/config/environment.go +++ b/internal/config/environment.go @@ -9,37 +9,37 @@ import ( ) var ( - EnvVarConfigPath = "RESTORA_CONFIG" // path to config file - EnvVarDataDir = "RESTORA_DATA" // path to data directory - EnvVarBindAddress = "RESTORA_PORT" // port to bind to (default 9898) - EnvVarBinPath = "RESTORA_RESTIC_COMMAND" // path to restic binary (default restic) + EnvVarConfigPath = "BACKREST_CONFIG" // path to config file + EnvVarDataDir = "BACKREST_DATA" // path to data directory + EnvVarBindAddress = "BACKREST_PORT" // port to bind to (default 9898) + EnvVarBinPath = "BACKREST_RESTIC_COMMAND" // path to restic binary (default restic) ) // ConfigFilePath -// - *nix systems use $XDG_CONFIG_HOME/restora/config.json -// - windows uses %APPDATA%/restora/config.json +// - *nix systems use $XDG_CONFIG_HOME/backrest/config.json +// - windows uses %APPDATA%/backrest/config.json func ConfigFilePath() string { if val := os.Getenv(EnvVarConfigPath); val != "" { return val } - return path.Join(getConfigDir(), "restora/config.json") + return path.Join(getConfigDir(), "backrest/config.json") } // DataDir -// - *nix systems use $XDG_DATA_HOME/restora -// - windows uses %APPDATA%/restora/data +// - *nix systems use $XDG_DATA_HOME/backrest +// - windows uses %APPDATA%/backrest/data func DataDir() string { if val := os.Getenv(EnvVarDataDir); val != "" { return val } if val := os.Getenv("XDG_DATA_HOME"); val != "" { - return path.Join(val, "restora") + return path.Join(val, "backrest") } if runtime.GOOS == "windows" { - return path.Join(getConfigDir(), "restora/data") + return path.Join(getConfigDir(), "backrest/data") } - return path.Join(getHomeDir(), ".local/share/restora") + return path.Join(getHomeDir(), ".local/share/backrest") } func BindAddress() string { diff --git a/internal/config/jsonstore.go b/internal/config/jsonstore.go index 47d19ac..247707e 100644 --- a/internal/config/jsonstore.go +++ b/internal/config/jsonstore.go @@ -8,7 +8,7 @@ import ( "path/filepath" "sync" - v1 "github.com/garethgeorge/restora/gen/go/v1" + v1 "github.com/garethgeorge/backrest/gen/go/v1" "github.com/natefinch/atomic" "google.golang.org/protobuf/encoding/protojson" ) diff --git a/internal/config/memstore.go b/internal/config/memstore.go index c23be1f..3d03b00 100644 --- a/internal/config/memstore.go +++ b/internal/config/memstore.go @@ -3,7 +3,7 @@ package config import ( "sync" - v1 "github.com/garethgeorge/restora/gen/go/v1" + v1 "github.com/garethgeorge/backrest/gen/go/v1" ) type MemoryStore struct { diff --git a/internal/config/validate.go b/internal/config/validate.go index edd696a..278264d 100644 --- a/internal/config/validate.go +++ b/internal/config/validate.go @@ -6,7 +6,7 @@ import ( "regexp" "strings" - v1 "github.com/garethgeorge/restora/gen/go/v1" + v1 "github.com/garethgeorge/backrest/gen/go/v1" "github.com/gitploy-io/cronexpr" "github.com/hashicorp/go-multierror" ) diff --git a/internal/oplog/indexutil/indexutil.go b/internal/oplog/indexutil/indexutil.go index 0d2f720..0213f9c 100644 --- a/internal/oplog/indexutil/indexutil.go +++ b/internal/oplog/indexutil/indexutil.go @@ -4,7 +4,7 @@ import ( "bytes" "sort" - "github.com/garethgeorge/restora/internal/oplog/serializationutil" + "github.com/garethgeorge/backrest/internal/oplog/serializationutil" bolt "go.etcd.io/bbolt" ) diff --git a/internal/oplog/oplog.go b/internal/oplog/oplog.go index 600dfe1..f6f675a 100644 --- a/internal/oplog/oplog.go +++ b/internal/oplog/oplog.go @@ -9,11 +9,11 @@ import ( "sync/atomic" "time" - v1 "github.com/garethgeorge/restora/gen/go/v1" - "github.com/garethgeorge/restora/internal/oplog/indexutil" - "github.com/garethgeorge/restora/internal/oplog/serializationutil" - "github.com/garethgeorge/restora/internal/protoutil" - "github.com/garethgeorge/restora/pkg/restic" + v1 "github.com/garethgeorge/backrest/gen/go/v1" + "github.com/garethgeorge/backrest/internal/oplog/indexutil" + "github.com/garethgeorge/backrest/internal/oplog/serializationutil" + "github.com/garethgeorge/backrest/internal/protoutil" + "github.com/garethgeorge/backrest/pkg/restic" bolt "go.etcd.io/bbolt" "go.uber.org/zap" "google.golang.org/protobuf/proto" diff --git a/internal/oplog/oplog_test.go b/internal/oplog/oplog_test.go index 2fe4e5f..02e1cdd 100644 --- a/internal/oplog/oplog_test.go +++ b/internal/oplog/oplog_test.go @@ -4,8 +4,8 @@ import ( "slices" "testing" - v1 "github.com/garethgeorge/restora/gen/go/v1" - "github.com/garethgeorge/restora/internal/oplog/indexutil" + v1 "github.com/garethgeorge/backrest/gen/go/v1" + "github.com/garethgeorge/backrest/internal/oplog/indexutil" ) const ( diff --git a/internal/orchestrator/orchestrator.go b/internal/orchestrator/orchestrator.go index 7175fd2..88faa2a 100644 --- a/internal/orchestrator/orchestrator.go +++ b/internal/orchestrator/orchestrator.go @@ -9,10 +9,10 @@ import ( "sync/atomic" "time" - v1 "github.com/garethgeorge/restora/gen/go/v1" - "github.com/garethgeorge/restora/internal/config" - "github.com/garethgeorge/restora/internal/oplog" - "github.com/garethgeorge/restora/pkg/restic" + v1 "github.com/garethgeorge/backrest/gen/go/v1" + "github.com/garethgeorge/backrest/internal/config" + "github.com/garethgeorge/backrest/internal/oplog" + "github.com/garethgeorge/backrest/pkg/restic" "go.uber.org/zap" "google.golang.org/protobuf/proto" ) diff --git a/internal/orchestrator/orchestrator_test.go b/internal/orchestrator/orchestrator_test.go index 35dfffe..81dbbe1 100644 --- a/internal/orchestrator/orchestrator_test.go +++ b/internal/orchestrator/orchestrator_test.go @@ -6,8 +6,8 @@ import ( "testing" "time" - v1 "github.com/garethgeorge/restora/gen/go/v1" - "github.com/garethgeorge/restora/internal/config" + v1 "github.com/garethgeorge/backrest/gen/go/v1" + "github.com/garethgeorge/backrest/internal/config" ) type testTask struct { diff --git a/internal/orchestrator/repo.go b/internal/orchestrator/repo.go index c5fd54b..460b49d 100644 --- a/internal/orchestrator/repo.go +++ b/internal/orchestrator/repo.go @@ -8,9 +8,9 @@ import ( "sync" "time" - v1 "github.com/garethgeorge/restora/gen/go/v1" - "github.com/garethgeorge/restora/internal/protoutil" - "github.com/garethgeorge/restora/pkg/restic" + v1 "github.com/garethgeorge/backrest/gen/go/v1" + "github.com/garethgeorge/backrest/internal/protoutil" + "github.com/garethgeorge/backrest/pkg/restic" "go.uber.org/zap" ) diff --git a/internal/orchestrator/repo_test.go b/internal/orchestrator/repo_test.go index 8165423..3efe699 100644 --- a/internal/orchestrator/repo_test.go +++ b/internal/orchestrator/repo_test.go @@ -5,10 +5,10 @@ import ( "slices" "testing" - v1 "github.com/garethgeorge/restora/gen/go/v1" - "github.com/garethgeorge/restora/pkg/restic" - "github.com/garethgeorge/restora/test/helpers" - test "github.com/garethgeorge/restora/test/helpers" + v1 "github.com/garethgeorge/backrest/gen/go/v1" + "github.com/garethgeorge/backrest/pkg/restic" + "github.com/garethgeorge/backrest/test/helpers" + test "github.com/garethgeorge/backrest/test/helpers" ) func TestBackup(t *testing.T) { diff --git a/internal/orchestrator/scheduledtaskheap_test.go b/internal/orchestrator/scheduledtaskheap_test.go index f31515d..6a0fee6 100644 --- a/internal/orchestrator/scheduledtaskheap_test.go +++ b/internal/orchestrator/scheduledtaskheap_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - v1 "github.com/garethgeorge/restora/gen/go/v1" + v1 "github.com/garethgeorge/backrest/gen/go/v1" ) type heapTestTask struct { diff --git a/internal/orchestrator/taskbackup.go b/internal/orchestrator/taskbackup.go index 620a439..a4a9c82 100644 --- a/internal/orchestrator/taskbackup.go +++ b/internal/orchestrator/taskbackup.go @@ -6,9 +6,9 @@ import ( "fmt" "time" - v1 "github.com/garethgeorge/restora/gen/go/v1" - "github.com/garethgeorge/restora/internal/protoutil" - "github.com/garethgeorge/restora/pkg/restic" + v1 "github.com/garethgeorge/backrest/gen/go/v1" + "github.com/garethgeorge/backrest/internal/protoutil" + "github.com/garethgeorge/backrest/pkg/restic" "github.com/gitploy-io/cronexpr" "go.uber.org/zap" ) diff --git a/internal/orchestrator/taskcollectgarbage.go b/internal/orchestrator/taskcollectgarbage.go index f0ff54f..6c19864 100644 --- a/internal/orchestrator/taskcollectgarbage.go +++ b/internal/orchestrator/taskcollectgarbage.go @@ -5,7 +5,7 @@ import ( "fmt" "time" - v1 "github.com/garethgeorge/restora/gen/go/v1" + v1 "github.com/garethgeorge/backrest/gen/go/v1" "go.uber.org/zap" ) diff --git a/internal/orchestrator/taskforget.go b/internal/orchestrator/taskforget.go index 3e93494..88ad8b2 100644 --- a/internal/orchestrator/taskforget.go +++ b/internal/orchestrator/taskforget.go @@ -6,8 +6,8 @@ import ( "fmt" "time" - v1 "github.com/garethgeorge/restora/gen/go/v1" - "github.com/garethgeorge/restora/internal/oplog/indexutil" + v1 "github.com/garethgeorge/backrest/gen/go/v1" + "github.com/garethgeorge/backrest/internal/oplog/indexutil" "github.com/hashicorp/go-multierror" "go.uber.org/zap" ) diff --git a/internal/orchestrator/taskindexsnapshots.go b/internal/orchestrator/taskindexsnapshots.go index eebc13a..9346e26 100644 --- a/internal/orchestrator/taskindexsnapshots.go +++ b/internal/orchestrator/taskindexsnapshots.go @@ -5,10 +5,10 @@ import ( "fmt" "time" - v1 "github.com/garethgeorge/restora/gen/go/v1" - "github.com/garethgeorge/restora/internal/oplog" - "github.com/garethgeorge/restora/internal/oplog/indexutil" - "github.com/garethgeorge/restora/internal/protoutil" + v1 "github.com/garethgeorge/backrest/gen/go/v1" + "github.com/garethgeorge/backrest/internal/oplog" + "github.com/garethgeorge/backrest/internal/oplog/indexutil" + "github.com/garethgeorge/backrest/internal/protoutil" "go.uber.org/zap" ) diff --git a/internal/orchestrator/taskprune.go b/internal/orchestrator/taskprune.go index 6c4c9f2..c6a84f7 100644 --- a/internal/orchestrator/taskprune.go +++ b/internal/orchestrator/taskprune.go @@ -7,8 +7,8 @@ import ( "sync" "time" - v1 "github.com/garethgeorge/restora/gen/go/v1" - "github.com/garethgeorge/restora/internal/oplog/indexutil" + v1 "github.com/garethgeorge/backrest/gen/go/v1" + "github.com/garethgeorge/backrest/internal/oplog/indexutil" "go.uber.org/zap" ) diff --git a/internal/orchestrator/taskrestore.go b/internal/orchestrator/taskrestore.go index c5971de..19cc681 100644 --- a/internal/orchestrator/taskrestore.go +++ b/internal/orchestrator/taskrestore.go @@ -5,7 +5,7 @@ import ( "fmt" "time" - v1 "github.com/garethgeorge/restora/gen/go/v1" + v1 "github.com/garethgeorge/backrest/gen/go/v1" "go.uber.org/zap" ) diff --git a/internal/orchestrator/tasks.go b/internal/orchestrator/tasks.go index ee93af7..8d1e487 100644 --- a/internal/orchestrator/tasks.go +++ b/internal/orchestrator/tasks.go @@ -7,8 +7,8 @@ import ( "sync/atomic" "time" - v1 "github.com/garethgeorge/restora/gen/go/v1" - "github.com/garethgeorge/restora/internal/oplog" + v1 "github.com/garethgeorge/backrest/gen/go/v1" + "github.com/garethgeorge/backrest/internal/oplog" "github.com/hashicorp/go-multierror" ) diff --git a/internal/protoutil/conversion.go b/internal/protoutil/conversion.go index 7cae33f..08a9907 100644 --- a/internal/protoutil/conversion.go +++ b/internal/protoutil/conversion.go @@ -1,8 +1,8 @@ package protoutil import ( - v1 "github.com/garethgeorge/restora/gen/go/v1" - "github.com/garethgeorge/restora/pkg/restic" + v1 "github.com/garethgeorge/backrest/gen/go/v1" + "github.com/garethgeorge/backrest/pkg/restic" ) func SnapshotToProto(s *restic.Snapshot) *v1.ResticSnapshot { diff --git a/internal/protoutil/conversion_test.go b/internal/protoutil/conversion_test.go index b4610a8..95ec7d0 100644 --- a/internal/protoutil/conversion_test.go +++ b/internal/protoutil/conversion_test.go @@ -3,8 +3,8 @@ package protoutil import ( "testing" - v1 "github.com/garethgeorge/restora/gen/go/v1" - "github.com/garethgeorge/restora/pkg/restic" + v1 "github.com/garethgeorge/backrest/gen/go/v1" + "github.com/garethgeorge/backrest/pkg/restic" "google.golang.org/protobuf/proto" ) @@ -13,7 +13,7 @@ func TestSnapshotToProto(t *testing.T) { Id: "db155169d788e6e432e320aedbdff5a54cc439653093bb56944a67682528aa52", Time: "2023-11-10T19:14:17.053824063-08:00", Tree: "3e2918b261948e69602ee9504b8f475bcc7cdc4dcec0b3f34ecdb014287d07b2", - Paths: []string{"/restora"}, + Paths: []string{"/backrest"}, Hostname: "pop-os", Username: "dontpanic", Tags: []string{}, @@ -24,7 +24,7 @@ func TestSnapshotToProto(t *testing.T) { Id: "db155169d788e6e432e320aedbdff5a54cc439653093bb56944a67682528aa52", UnixTimeMs: 1699672457053, Tree: "3e2918b261948e69602ee9504b8f475bcc7cdc4dcec0b3f34ecdb014287d07b2", - Paths: []string{"/restora"}, + Paths: []string{"/backrest"}, Hostname: "pop-os", Username: "dontpanic", Tags: []string{}, diff --git a/internal/protoutil/validation.go b/internal/protoutil/validation.go index 6bec8d6..af10b33 100644 --- a/internal/protoutil/validation.go +++ b/internal/protoutil/validation.go @@ -4,8 +4,8 @@ import ( "errors" "fmt" - v1 "github.com/garethgeorge/restora/gen/go/v1" - "github.com/garethgeorge/restora/pkg/restic" + v1 "github.com/garethgeorge/backrest/gen/go/v1" + "github.com/garethgeorge/backrest/pkg/restic" ) // ValidateOperation verifies critical properties of the operation proto. diff --git a/internal/resticinstaller/resticinstaller.go b/internal/resticinstaller/resticinstaller.go index 0b6a6ff..5c477a2 100644 --- a/internal/resticinstaller/resticinstaller.go +++ b/internal/resticinstaller/resticinstaller.go @@ -14,7 +14,7 @@ import ( "strings" "sync" - "github.com/garethgeorge/restora/internal/config" + "github.com/garethgeorge/backrest/internal/config" "go.uber.org/zap" ) diff --git a/pkg/restic/outputs.go b/pkg/restic/outputs.go index 7f04fef..cb7ea3e 100644 --- a/pkg/restic/outputs.go +++ b/pkg/restic/outputs.go @@ -10,7 +10,7 @@ import ( "slices" "time" - v1 "github.com/garethgeorge/restora/gen/go/v1" + v1 "github.com/garethgeorge/backrest/gen/go/v1" ) type Snapshot struct { diff --git a/pkg/restic/outputs_test.go b/pkg/restic/outputs_test.go index 16bc84c..e2d1a6e 100644 --- a/pkg/restic/outputs_test.go +++ b/pkg/restic/outputs_test.go @@ -28,7 +28,7 @@ func TestReadBackupProgressEntries(t *testing.T) { } func TestReadLs(t *testing.T) { - testInput := `{"time":"2023-11-10T19:14:17.053824063-08:00","tree":"3e2918b261948e69602ee9504b8f475bcc7cdc4dcec0b3f34ecdb014287d07b2","paths":["/restora"],"hostname":"pop-os","username":"dontpanic","uid":1000,"gid":1000,"id":"db155169d788e6e432e320aedbdff5a54cc439653093bb56944a67682528aa52","short_id":"db155169","struct_type":"snapshot"} + testInput := `{"time":"2023-11-10T19:14:17.053824063-08:00","tree":"3e2918b261948e69602ee9504b8f475bcc7cdc4dcec0b3f34ecdb014287d07b2","paths":["/backrest"],"hostname":"pop-os","username":"dontpanic","uid":1000,"gid":1000,"id":"db155169d788e6e432e320aedbdff5a54cc439653093bb56944a67682528aa52","short_id":"db155169","struct_type":"snapshot"} {"name":".git","type":"dir","path":"/.git","uid":1000,"gid":1000,"mode":2147484157,"mtime":"2023-11-10T18:32:38.156599473-08:00","atime":"2023-11-10T18:32:38.156599473-08:00","ctime":"2023-11-10T18:32:38.156599473-08:00","struct_type":"node"} {"name":".gitignore","type":"file","path":"/.gitignore","uid":1000,"gid":1000,"size":22,"mode":436,"mtime":"2023-11-10T00:41:26.611346634-08:00","atime":"2023-11-10T00:41:26.611346634-08:00","ctime":"2023-11-10T00:41:26.611346634-08:00","struct_type":"node"} {"name":"README.md","type":"file","path":"/README.md","uid":1000,"gid":1000,"size":762,"mode":436,"mtime":"2023-11-10T00:59:06.842538768-08:00","atime":"2023-11-10T00:59:06.842538768-08:00","ctime":"2023-11-10T00:59:06.842538768-08:00","struct_type":"node"}` diff --git a/pkg/restic/restic.go b/pkg/restic/restic.go index 7a952b1..8c10414 100644 --- a/pkg/restic/restic.go +++ b/pkg/restic/restic.go @@ -12,7 +12,7 @@ import ( "strings" "sync" - v1 "github.com/garethgeorge/restora/gen/go/v1" + v1 "github.com/garethgeorge/backrest/gen/go/v1" ) var errAlreadyInitialized = errors.New("repo already initialized") diff --git a/pkg/restic/restic_test.go b/pkg/restic/restic_test.go index c82ce61..c9d3dc5 100644 --- a/pkg/restic/restic_test.go +++ b/pkg/restic/restic_test.go @@ -8,8 +8,8 @@ import ( "slices" "testing" - v1 "github.com/garethgeorge/restora/gen/go/v1" - "github.com/garethgeorge/restora/test/helpers" + v1 "github.com/garethgeorge/backrest/gen/go/v1" + "github.com/garethgeorge/backrest/test/helpers" ) func TestResticInit(t *testing.T) { diff --git a/proto/types/value.proto b/proto/types/value.proto index 8bd87a3..7728ecb 100644 --- a/proto/types/value.proto +++ b/proto/types/value.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package types; -option go_package = "github.com/garethgeorge/restora/gen/go/types"; +option go_package = "github.com/garethgeorge/backrest/gen/go/types"; message StringValue { string value = 1; diff --git a/proto/v1/config.proto b/proto/v1/config.proto index 119621c..7227906 100644 --- a/proto/v1/config.proto +++ b/proto/v1/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v1; -option go_package = "github.com/garethgeorge/restora/go/proto/v1"; +option go_package = "github.com/garethgeorge/backrest/go/proto/v1"; // Config is the top level config object for restic UI. message Config { diff --git a/proto/v1/operations.proto b/proto/v1/operations.proto index 8ebd416..c39bc0f 100644 --- a/proto/v1/operations.proto +++ b/proto/v1/operations.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v1; -option go_package = "github.com/garethgeorge/restora/go/proto/v1"; +option go_package = "github.com/garethgeorge/backrest/go/proto/v1"; import "v1/restic.proto"; import "v1/config.proto"; @@ -66,7 +66,7 @@ message OperationBackup { BackupProgressEntry last_status = 3; } -// OperationIndexSnapshot tracks that a snapshot was detected by restora. +// OperationIndexSnapshot tracks that a snapshot was detected by backrest. message OperationIndexSnapshot { ResticSnapshot snapshot = 2; // the snapshot that was indexed. bool forgot = 3; // tracks whether this snapshot is forgotten yet. diff --git a/proto/v1/restic.proto b/proto/v1/restic.proto index b1fade1..10f85fc 100644 --- a/proto/v1/restic.proto +++ b/proto/v1/restic.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v1; -option go_package = "github.com/garethgeorge/restora/go/proto/v1"; +option go_package = "github.com/garethgeorge/backrest/go/proto/v1"; // ResticSnapshot represents a restic snapshot. message ResticSnapshot { diff --git a/proto/v1/service.proto b/proto/v1/service.proto index 6de48e1..f6fdf13 100644 --- a/proto/v1/service.proto +++ b/proto/v1/service.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v1; -option go_package = "github.com/garethgeorge/restora/go/proto/v1"; +option go_package = "github.com/garethgeorge/backrest/go/proto/v1"; import "v1/config.proto"; import "v1/restic.proto"; @@ -11,7 +11,7 @@ import "types/value.proto"; import "google/protobuf/empty.proto"; import "google/api/annotations.proto"; -service Restora { +service Backrest { rpc GetConfig (google.protobuf.Empty) returns (Config) { option (google.api.http) = { get: "/v1/config" diff --git a/scripts/build-all.sh b/scripts/build-all.sh index 4f8b5cb..e617bd0 100755 --- a/scripts/build-all.sh +++ b/scripts/build-all.sh @@ -2,17 +2,17 @@ (cd webui && npm i && npm run build) -for bin in restora-*; do +for bin in backrest-*; do rm -f $bin done find webui/dist -name '*.map' -exec rm ./{} \; -GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o restora-linux-amd64 -GOOS=linux GOARCH=arm64 go build -ldflags="-s -w" -o restora-linux-arm64 -GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" -o restora-darwin-amd64 -GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w" -o restora-darwin-arm64 +GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o backrest-linux-amd64 +GOOS=linux GOARCH=arm64 go build -ldflags="-s -w" -o backrest-linux-arm64 +GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" -o backrest-darwin-amd64 +GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w" -o backrest-darwin-arm64 -for bin in restora-*; do +for bin in backrest-*; do rice append --exec $bin done diff --git a/scripts/build.sh b/scripts/build.sh index 43ec84a..1cd6e77 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -2,6 +2,6 @@ set -x (cd webui && npm i && npm run build) -rm -f restora +rm -f backrest go build . -rice append --exec restora +rice append --exec backrest diff --git a/test/helpers/installrestic.go b/test/helpers/installrestic.go index 9ecfa40..55e5c80 100644 --- a/test/helpers/installrestic.go +++ b/test/helpers/installrestic.go @@ -3,7 +3,7 @@ package helpers import ( "testing" - "github.com/garethgeorge/restora/internal/resticinstaller" + "github.com/garethgeorge/backrest/internal/resticinstaller" ) func ResticBinary(t *testing.T) string { diff --git a/webui/gen/ts/v1/service.pb.ts b/webui/gen/ts/v1/service.pb.ts index 8101818..989ea70 100644 --- a/webui/gen/ts/v1/service.pb.ts +++ b/webui/gen/ts/v1/service.pb.ts @@ -61,7 +61,7 @@ export type LsEntry = { ctime?: string } -export class Restora { +export class Backrest { static GetConfig(req: GoogleProtobufEmpty.Empty, initReq?: fm.InitReq): Promise { return fm.fetchReq(`/v1/config?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) } diff --git a/webui/package-lock.json b/webui/package-lock.json index 0107397..cd5d299 100644 --- a/webui/package-lock.json +++ b/webui/package-lock.json @@ -1,11 +1,11 @@ { - "name": "restora", + "name": "backrest", "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "restora", + "name": "backrest", "version": "1.0.0", "license": "ISC", "dependencies": { diff --git a/webui/package.json b/webui/package.json index 3edbffd..2f6cc81 100644 --- a/webui/package.json +++ b/webui/package.json @@ -1,10 +1,10 @@ { - "name": "restora", + "name": "backrest", "version": "1.0.0", "description": "", "scripts": { "start": "parcel serve src/index.html", - "build": "RESTORA_BUILD_VERSION=$(git describe --tags --abbrev=0) UI_OS=unix parcel build src/index.html", + "build": "BACKREST_BUILD_VERSION=$(git describe --tags --abbrev=0) UI_OS=unix parcel build src/index.html", "build-windows": "set UI_OS=windows & parcel build src/index.html", "test": "echo \"Error: no test specified\" && exit 1" }, diff --git a/webui/src/components/OperationList.tsx b/webui/src/components/OperationList.tsx index 5853d71..2f32b65 100644 --- a/webui/src/components/OperationList.tsx +++ b/webui/src/components/OperationList.tsx @@ -44,7 +44,7 @@ import { normalizeSnapshotId, } from "../lib/formatting"; import _ from "lodash"; -import { GetOperationsRequest, Restora } from "../../gen/ts/v1/service.pb"; +import { GetOperationsRequest, Backrest } from "../../gen/ts/v1/service.pb"; import { useAlertApi } from "./Alerts"; import { MessageInstance } from "antd/es/message/interface"; @@ -188,7 +188,7 @@ export const OperationRow = ({ let title = ( <> {showPlan ? operation.planId + " - " : undefined} {formatTime(operation.unixTimeStartMs!)} - {opName}{" "} - {details.displayState} + {details.displayState} ); @@ -196,7 +196,7 @@ export const OperationRow = ({ title = <> {title} diff --git a/webui/src/components/OperationTree.tsx b/webui/src/components/OperationTree.tsx index 1ffa293..906c7a3 100644 --- a/webui/src/components/OperationTree.tsx +++ b/webui/src/components/OperationTree.tsx @@ -176,7 +176,7 @@ export const OperationTree = ({ let detailsElem: React.ReactNode | null = null; if (details.length > 0) { detailsElem = ( - + [{details.join(", ")}] ); diff --git a/webui/src/components/SnapshotBrowser.tsx b/webui/src/components/SnapshotBrowser.tsx index 8f87a7d..5bd919e 100644 --- a/webui/src/components/SnapshotBrowser.tsx +++ b/webui/src/components/SnapshotBrowser.tsx @@ -4,7 +4,7 @@ import type { DataNode, EventDataNode } from "antd/es/tree"; import { ListSnapshotFilesResponse, LsEntry, - Restora, + Backrest, RestoreSnapshotRequest, } from "../../gen/ts/v1/service.pb"; import { useAlertApi } from "./Alerts"; @@ -81,7 +81,7 @@ export const SnapshotBrowser = ({ useEffect(() => { (async () => { try { - const resp = await Restora.ListSnapshotFiles( + const resp = await Backrest.ListSnapshotFiles( { path: "/", repoId, @@ -101,7 +101,7 @@ export const SnapshotBrowser = ({ return; } - const resp = await Restora.ListSnapshotFiles( + const resp = await Backrest.ListSnapshotFiles( { path: (key + "/") as string, repoId, @@ -225,7 +225,7 @@ const FileNode = ({ entry }: { entry: LsEntry }) => { setDropdown(null)}> {entry.name} {entry.type === "file" ? ( - + ({formatBytes(entry.size)}) ) : null} @@ -267,7 +267,7 @@ const RestoreModal = ({ try { const values = await validateForm(form); - await Restora.Restore( + await Backrest.Restore( { planId, repoId, diff --git a/webui/src/components/URIAutocomplete.tsx b/webui/src/components/URIAutocomplete.tsx index a03258e..e2f24c6 100644 --- a/webui/src/components/URIAutocomplete.tsx +++ b/webui/src/components/URIAutocomplete.tsx @@ -1,6 +1,6 @@ import { AutoComplete } from "antd"; import React, { useEffect, useState } from "react"; -import { Restora } from "../../gen/ts/v1/service.pb"; +import { Backrest } from "../../gen/ts/v1/service.pb"; import { StringList } from "../../gen/ts/types/value.pb"; import { isWindows } from "../state/buildcfg"; @@ -29,7 +29,7 @@ export const URIAutocomplete = (props: React.PropsWithChildren) => { } timeout = setTimeout(() => { - Restora.PathAutocomplete({ value: value + sep }, { pathPrefix: "/api" }) + Backrest.PathAutocomplete({ value: value + sep }, { pathPrefix: "/api" }) .then((res: StringList) => { if (!res.values) { return; diff --git a/webui/src/index.html b/webui/src/index.html index f0954c6..81d9363 100644 --- a/webui/src/index.html +++ b/webui/src/index.html @@ -1,7 +1,7 @@ - Restora + Backrest diff --git a/webui/src/index.sass b/webui/src/index.sass index d3df718..0159b78 100644 --- a/webui/src/index.sass +++ b/webui/src/index.sass @@ -1,7 +1,7 @@ body margin: 0px -.restora +.backrest &.operation-details color: grey font-family: monospace diff --git a/webui/src/state/buildcfg.ts b/webui/src/state/buildcfg.ts index 26e1cf4..b5da85f 100644 --- a/webui/src/state/buildcfg.ts +++ b/webui/src/state/buildcfg.ts @@ -1,5 +1,5 @@ export const uios = (process.env.UI_OS || "").trim().toLowerCase(); export const isWindows = uios === "windows"; export const uiBuildVersion = ( - process.env.RESTORA_BUILD_VERSION || "dev-snapshot-build" + process.env.BACKREST_BUILD_VERSION || "dev-snapshot-build" ).trim(); diff --git a/webui/src/state/config.ts b/webui/src/state/config.ts index 53ad496..ce2e9f0 100644 --- a/webui/src/state/config.ts +++ b/webui/src/state/config.ts @@ -1,6 +1,6 @@ import { atom, useSetRecoilState } from "recoil"; import { Config, Repo } from "../../gen/ts/v1/config.pb"; -import { Restora } from "../../gen/ts/v1/service.pb"; +import { Backrest } from "../../gen/ts/v1/service.pb"; import { API_PREFIX } from "../constants"; export const configState = atom({ @@ -9,17 +9,17 @@ export const configState = atom({ }); export const fetchConfig = async (): Promise => { - return await Restora.GetConfig({}, { pathPrefix: API_PREFIX }); + return await Backrest.GetConfig({}, { pathPrefix: API_PREFIX }); }; export const addRepo = async (repo: Repo): Promise => { - return await Restora.AddRepo(repo, { + return await Backrest.AddRepo(repo, { pathPrefix: API_PREFIX, }); }; export const updateConfig = async (config: Config): Promise => { - return await Restora.SetConfig(config, { + return await Backrest.SetConfig(config, { pathPrefix: API_PREFIX, }); }; diff --git a/webui/src/state/oplog.ts b/webui/src/state/oplog.ts index fccd216..134de01 100644 --- a/webui/src/state/oplog.ts +++ b/webui/src/state/oplog.ts @@ -4,7 +4,7 @@ import { OperationEventType, OperationStatus, } from "../../gen/ts/v1/operations.pb"; -import { GetOperationsRequest, Restora } from "../../gen/ts/v1/service.pb"; +import { GetOperationsRequest, Backrest } from "../../gen/ts/v1/service.pb"; import { API_PREFIX } from "../constants"; import { BackupProgressEntry, ResticSnapshot } from "../../gen/ts/v1/restic.pb"; import _ from "lodash"; @@ -22,7 +22,7 @@ const subscribers: ((event: OperationEvent) => void)[] = []; while (true) { let nextConnWaitUntil = new Date().getTime() + 5000; try { - await Restora.GetOperationEvents( + await Backrest.GetOperationEvents( {}, (event: OperationEvent) => { console.log("operation event", event); @@ -44,7 +44,7 @@ const subscribers: ((event: OperationEvent) => void)[] = []; export const getOperations = async ( req: GetOperationsRequest ): Promise => { - const opList = await Restora.GetOperations(req, { + const opList = await Backrest.GetOperations(req, { pathPrefix: API_PREFIX, }); return (opList.operations || []).map(toEop); diff --git a/webui/src/views/AddRepoModal.tsx b/webui/src/views/AddRepoModal.tsx index 33681f4..34ad78e 100644 --- a/webui/src/views/AddRepoModal.tsx +++ b/webui/src/views/AddRepoModal.tsx @@ -15,7 +15,7 @@ import { Repo } from "../../gen/ts/v1/config.pb"; import { URIAutocomplete } from "../components/URIAutocomplete"; import { MinusCircleOutlined, PlusOutlined } from "@ant-design/icons"; import { useAlertApi } from "../components/Alerts"; -import { Restora } from "../../gen/ts/v1/service.pb"; +import { Backrest } from "../../gen/ts/v1/service.pb"; import { addRepo, configState, @@ -110,7 +110,7 @@ export const AddRepoModal = ({ // Update the snapshots for the repo to confirm the config works. // TODO: this operation is only used here, find a different RPC for this purpose. - await Restora.ListSnapshots( + await Backrest.ListSnapshots( { repoId: repo.id, }, diff --git a/webui/src/views/App.tsx b/webui/src/views/App.tsx index a300b53..8c7a65e 100644 --- a/webui/src/views/App.tsx +++ b/webui/src/views/App.tsx @@ -62,7 +62,7 @@ export const App: React.FC = () => { style={{ color: colorTextLightSolid }} onClick={() => setContent(null, [])} > - Restora{" "} + Backrest{" "} {uiBuildVersion} @@ -112,7 +112,7 @@ const getSidenavItems = (config: Config | null): MenuProps["items"] => { key: "p-" + plan.id, icon: , label: ( -
+
{plan.id}{" "}