You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

error.go 18 kB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
Squashed commit of the following: commit 0afcb843d7ffd596991c4885cab768273a6eb42c Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 17:13:29 2016 -0600 Removed Upload stats as the upload table is just a temporary table commit 7ecd73ff5535612d79d471409173ee7f1fcfa157 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 08:42:41 2016 -0600 Fix for CodeMirror mode commit c29b9ab531e2e7af0fb5db24dc17e51027dd1174 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 08:03:33 2016 -0600 Made tabbing in editor use spaces commit 23af384c53206a8a40e11e45bf49d7a149c4adcd Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 07:56:46 2016 -0600 Fix for data-url commit cfb8a97591cb6fc0a92e49563b7b764c524db0e9 Merge: 7fc8a89 991ce42 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 07:42:53 2016 -0600 Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file Conflicts: modules/bindata/bindata.go public/js/gogs.js commit 7fc8a89cb495478225b02d613e647f99a1489634 Merge: fd3d86c c03d040 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 07:40:00 2016 -0600 Merge branch 'feature-create-and-edit-repo-file' of github.com:richmahn/gogs into feature-create-and-edit-repo-file commit fd3d86ca6bbc02cfda566a504ffd6b03db4f75ef Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 07:39:44 2016 -0600 Code cleanup commit c03d0401c1049eeeccc32ab1f9c3303c130be5ee Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 29 15:38:23 2016 -0600 Code cleanup commit 98e1206ccf9f9a4503c020e3a7830cf9f861dfae Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Thu Jul 28 18:36:01 2016 -0600 Code cleanup and fixes commit c2895dc742f25f8412879c9fa15e18f27f42f194 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Thu Jul 28 18:24:04 2016 -0600 Fixes per Unknwon's requests commit 6aa7e46b21ad4c96e562daa2eac26a8fb408f8ef Merge: 889e9fa ad7ea88 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Thu Jul 28 17:13:43 2016 -0600 Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file Conflicts: modules/bindata/bindata.go modules/setting/setting.go commit 889e9faf1bd8559a4979c8f46005d488c1a234d4 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 22 14:09:18 2016 -0600 Fix in gogs.js commit 47603edf223f147b114be65f3bd27bc1e88827a5 Merge: bb57912 cf85e9e Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 22 14:07:36 2016 -0600 Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file Conflicts: modules/bindata/bindata.go public/js/gogs.js commit bb5791255867a71c11a77b639db050ad09c597a4 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 22 14:02:18 2016 -0600 Update for using CodeMirror mode addon commit d10d128c51039be19e2af9c66c63db66a9f2ec6d Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Tue Jul 19 16:12:57 2016 -0600 Update for Edit commit 34a34982025144e3225e389f7849eb6273c1d576 Merge: fa1b752 1c7dcdd Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Tue Jul 19 11:52:02 2016 -0600 Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file Conflicts: modules/bindata/bindata.go commit fa1b752be29cd455c5184ddac2ffe80b3489763e Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 15 18:35:42 2016 -0600 Feature for editing, creating, uploading and deleting files
9 years ago
Squashed commit of the following: commit 0afcb843d7ffd596991c4885cab768273a6eb42c Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 17:13:29 2016 -0600 Removed Upload stats as the upload table is just a temporary table commit 7ecd73ff5535612d79d471409173ee7f1fcfa157 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 08:42:41 2016 -0600 Fix for CodeMirror mode commit c29b9ab531e2e7af0fb5db24dc17e51027dd1174 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 08:03:33 2016 -0600 Made tabbing in editor use spaces commit 23af384c53206a8a40e11e45bf49d7a149c4adcd Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 07:56:46 2016 -0600 Fix for data-url commit cfb8a97591cb6fc0a92e49563b7b764c524db0e9 Merge: 7fc8a89 991ce42 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 07:42:53 2016 -0600 Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file Conflicts: modules/bindata/bindata.go public/js/gogs.js commit 7fc8a89cb495478225b02d613e647f99a1489634 Merge: fd3d86c c03d040 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 07:40:00 2016 -0600 Merge branch 'feature-create-and-edit-repo-file' of github.com:richmahn/gogs into feature-create-and-edit-repo-file commit fd3d86ca6bbc02cfda566a504ffd6b03db4f75ef Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 07:39:44 2016 -0600 Code cleanup commit c03d0401c1049eeeccc32ab1f9c3303c130be5ee Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 29 15:38:23 2016 -0600 Code cleanup commit 98e1206ccf9f9a4503c020e3a7830cf9f861dfae Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Thu Jul 28 18:36:01 2016 -0600 Code cleanup and fixes commit c2895dc742f25f8412879c9fa15e18f27f42f194 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Thu Jul 28 18:24:04 2016 -0600 Fixes per Unknwon's requests commit 6aa7e46b21ad4c96e562daa2eac26a8fb408f8ef Merge: 889e9fa ad7ea88 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Thu Jul 28 17:13:43 2016 -0600 Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file Conflicts: modules/bindata/bindata.go modules/setting/setting.go commit 889e9faf1bd8559a4979c8f46005d488c1a234d4 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 22 14:09:18 2016 -0600 Fix in gogs.js commit 47603edf223f147b114be65f3bd27bc1e88827a5 Merge: bb57912 cf85e9e Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 22 14:07:36 2016 -0600 Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file Conflicts: modules/bindata/bindata.go public/js/gogs.js commit bb5791255867a71c11a77b639db050ad09c597a4 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 22 14:02:18 2016 -0600 Update for using CodeMirror mode addon commit d10d128c51039be19e2af9c66c63db66a9f2ec6d Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Tue Jul 19 16:12:57 2016 -0600 Update for Edit commit 34a34982025144e3225e389f7849eb6273c1d576 Merge: fa1b752 1c7dcdd Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Tue Jul 19 11:52:02 2016 -0600 Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file Conflicts: modules/bindata/bindata.go commit fa1b752be29cd455c5184ddac2ffe80b3489763e Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 15 18:35:42 2016 -0600 Feature for editing, creating, uploading and deleting files
9 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
Squashed commit of the following: commit 0afcb843d7ffd596991c4885cab768273a6eb42c Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 17:13:29 2016 -0600 Removed Upload stats as the upload table is just a temporary table commit 7ecd73ff5535612d79d471409173ee7f1fcfa157 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 08:42:41 2016 -0600 Fix for CodeMirror mode commit c29b9ab531e2e7af0fb5db24dc17e51027dd1174 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 08:03:33 2016 -0600 Made tabbing in editor use spaces commit 23af384c53206a8a40e11e45bf49d7a149c4adcd Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 07:56:46 2016 -0600 Fix for data-url commit cfb8a97591cb6fc0a92e49563b7b764c524db0e9 Merge: 7fc8a89 991ce42 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 07:42:53 2016 -0600 Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file Conflicts: modules/bindata/bindata.go public/js/gogs.js commit 7fc8a89cb495478225b02d613e647f99a1489634 Merge: fd3d86c c03d040 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 07:40:00 2016 -0600 Merge branch 'feature-create-and-edit-repo-file' of github.com:richmahn/gogs into feature-create-and-edit-repo-file commit fd3d86ca6bbc02cfda566a504ffd6b03db4f75ef Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 07:39:44 2016 -0600 Code cleanup commit c03d0401c1049eeeccc32ab1f9c3303c130be5ee Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 29 15:38:23 2016 -0600 Code cleanup commit 98e1206ccf9f9a4503c020e3a7830cf9f861dfae Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Thu Jul 28 18:36:01 2016 -0600 Code cleanup and fixes commit c2895dc742f25f8412879c9fa15e18f27f42f194 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Thu Jul 28 18:24:04 2016 -0600 Fixes per Unknwon's requests commit 6aa7e46b21ad4c96e562daa2eac26a8fb408f8ef Merge: 889e9fa ad7ea88 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Thu Jul 28 17:13:43 2016 -0600 Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file Conflicts: modules/bindata/bindata.go modules/setting/setting.go commit 889e9faf1bd8559a4979c8f46005d488c1a234d4 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 22 14:09:18 2016 -0600 Fix in gogs.js commit 47603edf223f147b114be65f3bd27bc1e88827a5 Merge: bb57912 cf85e9e Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 22 14:07:36 2016 -0600 Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file Conflicts: modules/bindata/bindata.go public/js/gogs.js commit bb5791255867a71c11a77b639db050ad09c597a4 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 22 14:02:18 2016 -0600 Update for using CodeMirror mode addon commit d10d128c51039be19e2af9c66c63db66a9f2ec6d Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Tue Jul 19 16:12:57 2016 -0600 Update for Edit commit 34a34982025144e3225e389f7849eb6273c1d576 Merge: fa1b752 1c7dcdd Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Tue Jul 19 11:52:02 2016 -0600 Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file Conflicts: modules/bindata/bindata.go commit fa1b752be29cd455c5184ddac2ffe80b3489763e Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 15 18:35:42 2016 -0600 Feature for editing, creating, uploading and deleting files
9 years ago
Squashed commit of the following: commit 0afcb843d7ffd596991c4885cab768273a6eb42c Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 17:13:29 2016 -0600 Removed Upload stats as the upload table is just a temporary table commit 7ecd73ff5535612d79d471409173ee7f1fcfa157 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 08:42:41 2016 -0600 Fix for CodeMirror mode commit c29b9ab531e2e7af0fb5db24dc17e51027dd1174 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 08:03:33 2016 -0600 Made tabbing in editor use spaces commit 23af384c53206a8a40e11e45bf49d7a149c4adcd Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 07:56:46 2016 -0600 Fix for data-url commit cfb8a97591cb6fc0a92e49563b7b764c524db0e9 Merge: 7fc8a89 991ce42 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 07:42:53 2016 -0600 Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file Conflicts: modules/bindata/bindata.go public/js/gogs.js commit 7fc8a89cb495478225b02d613e647f99a1489634 Merge: fd3d86c c03d040 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 07:40:00 2016 -0600 Merge branch 'feature-create-and-edit-repo-file' of github.com:richmahn/gogs into feature-create-and-edit-repo-file commit fd3d86ca6bbc02cfda566a504ffd6b03db4f75ef Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 07:39:44 2016 -0600 Code cleanup commit c03d0401c1049eeeccc32ab1f9c3303c130be5ee Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 29 15:38:23 2016 -0600 Code cleanup commit 98e1206ccf9f9a4503c020e3a7830cf9f861dfae Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Thu Jul 28 18:36:01 2016 -0600 Code cleanup and fixes commit c2895dc742f25f8412879c9fa15e18f27f42f194 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Thu Jul 28 18:24:04 2016 -0600 Fixes per Unknwon's requests commit 6aa7e46b21ad4c96e562daa2eac26a8fb408f8ef Merge: 889e9fa ad7ea88 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Thu Jul 28 17:13:43 2016 -0600 Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file Conflicts: modules/bindata/bindata.go modules/setting/setting.go commit 889e9faf1bd8559a4979c8f46005d488c1a234d4 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 22 14:09:18 2016 -0600 Fix in gogs.js commit 47603edf223f147b114be65f3bd27bc1e88827a5 Merge: bb57912 cf85e9e Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 22 14:07:36 2016 -0600 Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file Conflicts: modules/bindata/bindata.go public/js/gogs.js commit bb5791255867a71c11a77b639db050ad09c597a4 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 22 14:02:18 2016 -0600 Update for using CodeMirror mode addon commit d10d128c51039be19e2af9c66c63db66a9f2ec6d Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Tue Jul 19 16:12:57 2016 -0600 Update for Edit commit 34a34982025144e3225e389f7849eb6273c1d576 Merge: fa1b752 1c7dcdd Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Tue Jul 19 11:52:02 2016 -0600 Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file Conflicts: modules/bindata/bindata.go commit fa1b752be29cd455c5184ddac2ffe80b3489763e Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 15 18:35:42 2016 -0600 Feature for editing, creating, uploading and deleting files
9 years ago
Squashed commit of the following: commit 0afcb843d7ffd596991c4885cab768273a6eb42c Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 17:13:29 2016 -0600 Removed Upload stats as the upload table is just a temporary table commit 7ecd73ff5535612d79d471409173ee7f1fcfa157 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 08:42:41 2016 -0600 Fix for CodeMirror mode commit c29b9ab531e2e7af0fb5db24dc17e51027dd1174 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 08:03:33 2016 -0600 Made tabbing in editor use spaces commit 23af384c53206a8a40e11e45bf49d7a149c4adcd Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 07:56:46 2016 -0600 Fix for data-url commit cfb8a97591cb6fc0a92e49563b7b764c524db0e9 Merge: 7fc8a89 991ce42 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 07:42:53 2016 -0600 Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file Conflicts: modules/bindata/bindata.go public/js/gogs.js commit 7fc8a89cb495478225b02d613e647f99a1489634 Merge: fd3d86c c03d040 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 07:40:00 2016 -0600 Merge branch 'feature-create-and-edit-repo-file' of github.com:richmahn/gogs into feature-create-and-edit-repo-file commit fd3d86ca6bbc02cfda566a504ffd6b03db4f75ef Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 07:39:44 2016 -0600 Code cleanup commit c03d0401c1049eeeccc32ab1f9c3303c130be5ee Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 29 15:38:23 2016 -0600 Code cleanup commit 98e1206ccf9f9a4503c020e3a7830cf9f861dfae Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Thu Jul 28 18:36:01 2016 -0600 Code cleanup and fixes commit c2895dc742f25f8412879c9fa15e18f27f42f194 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Thu Jul 28 18:24:04 2016 -0600 Fixes per Unknwon's requests commit 6aa7e46b21ad4c96e562daa2eac26a8fb408f8ef Merge: 889e9fa ad7ea88 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Thu Jul 28 17:13:43 2016 -0600 Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file Conflicts: modules/bindata/bindata.go modules/setting/setting.go commit 889e9faf1bd8559a4979c8f46005d488c1a234d4 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 22 14:09:18 2016 -0600 Fix in gogs.js commit 47603edf223f147b114be65f3bd27bc1e88827a5 Merge: bb57912 cf85e9e Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 22 14:07:36 2016 -0600 Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file Conflicts: modules/bindata/bindata.go public/js/gogs.js commit bb5791255867a71c11a77b639db050ad09c597a4 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 22 14:02:18 2016 -0600 Update for using CodeMirror mode addon commit d10d128c51039be19e2af9c66c63db66a9f2ec6d Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Tue Jul 19 16:12:57 2016 -0600 Update for Edit commit 34a34982025144e3225e389f7849eb6273c1d576 Merge: fa1b752 1c7dcdd Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Tue Jul 19 11:52:02 2016 -0600 Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file Conflicts: modules/bindata/bindata.go commit fa1b752be29cd455c5184ddac2ffe80b3489763e Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 15 18:35:42 2016 -0600 Feature for editing, creating, uploading and deleting files
9 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693
  1. // Copyright 2015 The Gogs Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package models
  5. import (
  6. "fmt"
  7. )
  8. type ErrNameReserved struct {
  9. Name string
  10. }
  11. func IsErrNameReserved(err error) bool {
  12. _, ok := err.(ErrNameReserved)
  13. return ok
  14. }
  15. func (err ErrNameReserved) Error() string {
  16. return fmt.Sprintf("name is reserved [name: %s]", err.Name)
  17. }
  18. type ErrNamePatternNotAllowed struct {
  19. Pattern string
  20. }
  21. func IsErrNamePatternNotAllowed(err error) bool {
  22. _, ok := err.(ErrNamePatternNotAllowed)
  23. return ok
  24. }
  25. func (err ErrNamePatternNotAllowed) Error() string {
  26. return fmt.Sprintf("name pattern is not allowed [pattern: %s]", err.Pattern)
  27. }
  28. // ____ ___
  29. // | | \______ ___________
  30. // | | / ___// __ \_ __ \
  31. // | | /\___ \\ ___/| | \/
  32. // |______//____ >\___ >__|
  33. // \/ \/
  34. type ErrUserAlreadyExist struct {
  35. Name string
  36. }
  37. func IsErrUserAlreadyExist(err error) bool {
  38. _, ok := err.(ErrUserAlreadyExist)
  39. return ok
  40. }
  41. func (err ErrUserAlreadyExist) Error() string {
  42. return fmt.Sprintf("user already exists [name: %s]", err.Name)
  43. }
  44. type ErrUserNotExist struct {
  45. UID int64
  46. Name string
  47. KeyID int64
  48. }
  49. func IsErrUserNotExist(err error) bool {
  50. _, ok := err.(ErrUserNotExist)
  51. return ok
  52. }
  53. func (err ErrUserNotExist) Error() string {
  54. return fmt.Sprintf("user does not exist [uid: %d, name: %s, keyid: %d]", err.UID, err.Name, err.KeyID)
  55. }
  56. type ErrEmailAlreadyUsed struct {
  57. Email string
  58. }
  59. func IsErrEmailAlreadyUsed(err error) bool {
  60. _, ok := err.(ErrEmailAlreadyUsed)
  61. return ok
  62. }
  63. func (err ErrEmailAlreadyUsed) Error() string {
  64. return fmt.Sprintf("e-mail has been used [email: %s]", err.Email)
  65. }
  66. type ErrUserOwnRepos struct {
  67. UID int64
  68. }
  69. func IsErrUserOwnRepos(err error) bool {
  70. _, ok := err.(ErrUserOwnRepos)
  71. return ok
  72. }
  73. func (err ErrUserOwnRepos) Error() string {
  74. return fmt.Sprintf("user still has ownership of repositories [uid: %d]", err.UID)
  75. }
  76. type ErrUserHasOrgs struct {
  77. UID int64
  78. }
  79. func IsErrUserHasOrgs(err error) bool {
  80. _, ok := err.(ErrUserHasOrgs)
  81. return ok
  82. }
  83. func (err ErrUserHasOrgs) Error() string {
  84. return fmt.Sprintf("user still has membership of organizations [uid: %d]", err.UID)
  85. }
  86. type ErrReachLimitOfRepo struct {
  87. Limit int
  88. }
  89. func IsErrReachLimitOfRepo(err error) bool {
  90. _, ok := err.(ErrReachLimitOfRepo)
  91. return ok
  92. }
  93. func (err ErrReachLimitOfRepo) Error() string {
  94. return fmt.Sprintf("user has reached maximum limit of repositories [limit: %d]", err.Limit)
  95. }
  96. // __ __.__ __ .__
  97. // / \ / \__| | _|__|
  98. // \ \/\/ / | |/ / |
  99. // \ /| | <| |
  100. // \__/\ / |__|__|_ \__|
  101. // \/ \/
  102. type ErrWikiAlreadyExist struct {
  103. Title string
  104. }
  105. func IsErrWikiAlreadyExist(err error) bool {
  106. _, ok := err.(ErrWikiAlreadyExist)
  107. return ok
  108. }
  109. func (err ErrWikiAlreadyExist) Error() string {
  110. return fmt.Sprintf("wiki page already exists [title: %s]", err.Title)
  111. }
  112. // __________ ___. .__ .__ ____ __.
  113. // \______ \__ _\_ |__ | | |__| ____ | |/ _|____ ___.__.
  114. // | ___/ | \ __ \| | | |/ ___\ | <_/ __ < | |
  115. // | | | | / \_\ \ |_| \ \___ | | \ ___/\___ |
  116. // |____| |____/|___ /____/__|\___ > |____|__ \___ > ____|
  117. // \/ \/ \/ \/\/
  118. type ErrKeyUnableVerify struct {
  119. Result string
  120. }
  121. func IsErrKeyUnableVerify(err error) bool {
  122. _, ok := err.(ErrKeyUnableVerify)
  123. return ok
  124. }
  125. func (err ErrKeyUnableVerify) Error() string {
  126. return fmt.Sprintf("Unable to verify key content [result: %s]", err.Result)
  127. }
  128. type ErrKeyNotExist struct {
  129. ID int64
  130. }
  131. func IsErrKeyNotExist(err error) bool {
  132. _, ok := err.(ErrKeyNotExist)
  133. return ok
  134. }
  135. func (err ErrKeyNotExist) Error() string {
  136. return fmt.Sprintf("public key does not exist [id: %d]", err.ID)
  137. }
  138. type ErrKeyAlreadyExist struct {
  139. OwnerID int64
  140. Content string
  141. }
  142. func IsErrKeyAlreadyExist(err error) bool {
  143. _, ok := err.(ErrKeyAlreadyExist)
  144. return ok
  145. }
  146. func (err ErrKeyAlreadyExist) Error() string {
  147. return fmt.Sprintf("public key already exists [owner_id: %d, content: %s]", err.OwnerID, err.Content)
  148. }
  149. type ErrKeyNameAlreadyUsed struct {
  150. OwnerID int64
  151. Name string
  152. }
  153. func IsErrKeyNameAlreadyUsed(err error) bool {
  154. _, ok := err.(ErrKeyNameAlreadyUsed)
  155. return ok
  156. }
  157. func (err ErrKeyNameAlreadyUsed) Error() string {
  158. return fmt.Sprintf("public key already exists [owner_id: %d, name: %s]", err.OwnerID, err.Name)
  159. }
  160. type ErrKeyAccessDenied struct {
  161. UserID int64
  162. KeyID int64
  163. Note string
  164. }
  165. func IsErrKeyAccessDenied(err error) bool {
  166. _, ok := err.(ErrKeyAccessDenied)
  167. return ok
  168. }
  169. func (err ErrKeyAccessDenied) Error() string {
  170. return fmt.Sprintf("user does not have access to the key [user_id: %d, key_id: %d, note: %s]",
  171. err.UserID, err.KeyID, err.Note)
  172. }
  173. type ErrDeployKeyNotExist struct {
  174. ID int64
  175. KeyID int64
  176. RepoID int64
  177. }
  178. func IsErrDeployKeyNotExist(err error) bool {
  179. _, ok := err.(ErrDeployKeyNotExist)
  180. return ok
  181. }
  182. func (err ErrDeployKeyNotExist) Error() string {
  183. return fmt.Sprintf("Deploy key does not exist [id: %d, key_id: %d, repo_id: %d]", err.ID, err.KeyID, err.RepoID)
  184. }
  185. type ErrDeployKeyAlreadyExist struct {
  186. KeyID int64
  187. RepoID int64
  188. }
  189. func IsErrDeployKeyAlreadyExist(err error) bool {
  190. _, ok := err.(ErrDeployKeyAlreadyExist)
  191. return ok
  192. }
  193. func (err ErrDeployKeyAlreadyExist) Error() string {
  194. return fmt.Sprintf("public key already exists [key_id: %d, repo_id: %d]", err.KeyID, err.RepoID)
  195. }
  196. type ErrDeployKeyNameAlreadyUsed struct {
  197. RepoID int64
  198. Name string
  199. }
  200. func IsErrDeployKeyNameAlreadyUsed(err error) bool {
  201. _, ok := err.(ErrDeployKeyNameAlreadyUsed)
  202. return ok
  203. }
  204. func (err ErrDeployKeyNameAlreadyUsed) Error() string {
  205. return fmt.Sprintf("public key already exists [repo_id: %d, name: %s]", err.RepoID, err.Name)
  206. }
  207. // _____ ___________ __
  208. // / _ \ ____ ____ ____ ______ _____\__ ___/___ | | __ ____ ____
  209. // / /_\ \_/ ___\/ ___\/ __ \ / ___// ___/ | | / _ \| |/ // __ \ / \
  210. // / | \ \__\ \__\ ___/ \___ \ \___ \ | |( <_> ) <\ ___/| | \
  211. // \____|__ /\___ >___ >___ >____ >____ > |____| \____/|__|_ \\___ >___| /
  212. // \/ \/ \/ \/ \/ \/ \/ \/ \/
  213. type ErrAccessTokenNotExist struct {
  214. SHA string
  215. }
  216. func IsErrAccessTokenNotExist(err error) bool {
  217. _, ok := err.(ErrAccessTokenNotExist)
  218. return ok
  219. }
  220. func (err ErrAccessTokenNotExist) Error() string {
  221. return fmt.Sprintf("access token does not exist [sha: %s]", err.SHA)
  222. }
  223. type ErrAccessTokenEmpty struct {
  224. }
  225. func IsErrAccessTokenEmpty(err error) bool {
  226. _, ok := err.(ErrAccessTokenEmpty)
  227. return ok
  228. }
  229. func (err ErrAccessTokenEmpty) Error() string {
  230. return fmt.Sprintf("access token is empty")
  231. }
  232. // ________ .__ __ .__
  233. // \_____ \_______ _________ ____ |__|____________ _/ |_|__| ____ ____
  234. // / | \_ __ \/ ___\__ \ / \| \___ /\__ \\ __\ |/ _ \ / \
  235. // / | \ | \/ /_/ > __ \| | \ |/ / / __ \| | | ( <_> ) | \
  236. // \_______ /__| \___ (____ /___| /__/_____ \(____ /__| |__|\____/|___| /
  237. // \/ /_____/ \/ \/ \/ \/ \/
  238. type ErrLastOrgOwner struct {
  239. UID int64
  240. }
  241. func IsErrLastOrgOwner(err error) bool {
  242. _, ok := err.(ErrLastOrgOwner)
  243. return ok
  244. }
  245. func (err ErrLastOrgOwner) Error() string {
  246. return fmt.Sprintf("user is the last member of owner team [uid: %d]", err.UID)
  247. }
  248. // __________ .__ __
  249. // \______ \ ____ ______ ____ _____|__|/ |_ ___________ ___.__.
  250. // | _// __ \\____ \ / _ \/ ___/ \ __\/ _ \_ __ < | |
  251. // | | \ ___/| |_> > <_> )___ \| || | ( <_> ) | \/\___ |
  252. // |____|_ /\___ > __/ \____/____ >__||__| \____/|__| / ____|
  253. // \/ \/|__| \/ \/
  254. type ErrRepoNotExist struct {
  255. ID int64
  256. UID int64
  257. Name string
  258. }
  259. func IsErrRepoNotExist(err error) bool {
  260. _, ok := err.(ErrRepoNotExist)
  261. return ok
  262. }
  263. func (err ErrRepoNotExist) Error() string {
  264. return fmt.Sprintf("repository does not exist [id: %d, uid: %d, name: %s]", err.ID, err.UID, err.Name)
  265. }
  266. type ErrRepoAlreadyExist struct {
  267. Uname string
  268. Name string
  269. }
  270. func IsErrRepoAlreadyExist(err error) bool {
  271. _, ok := err.(ErrRepoAlreadyExist)
  272. return ok
  273. }
  274. func (err ErrRepoAlreadyExist) Error() string {
  275. return fmt.Sprintf("repository already exists [uname: %s, name: %s]", err.Uname, err.Name)
  276. }
  277. type ErrInvalidCloneAddr struct {
  278. IsURLError bool
  279. IsInvalidPath bool
  280. IsPermissionDenied bool
  281. }
  282. func IsErrInvalidCloneAddr(err error) bool {
  283. _, ok := err.(ErrInvalidCloneAddr)
  284. return ok
  285. }
  286. func (err ErrInvalidCloneAddr) Error() string {
  287. return fmt.Sprintf("invalid clone address [is_url_error: %v, is_invalid_path: %v, is_permission_denied: %v]",
  288. err.IsURLError, err.IsInvalidPath, err.IsPermissionDenied)
  289. }
  290. type ErrUpdateTaskNotExist struct {
  291. UUID string
  292. }
  293. func IsErrUpdateTaskNotExist(err error) bool {
  294. _, ok := err.(ErrUpdateTaskNotExist)
  295. return ok
  296. }
  297. func (err ErrUpdateTaskNotExist) Error() string {
  298. return fmt.Sprintf("update task does not exist [uuid: %s]", err.UUID)
  299. }
  300. type ErrReleaseAlreadyExist struct {
  301. TagName string
  302. }
  303. func IsErrReleaseAlreadyExist(err error) bool {
  304. _, ok := err.(ErrReleaseAlreadyExist)
  305. return ok
  306. }
  307. func (err ErrReleaseAlreadyExist) Error() string {
  308. return fmt.Sprintf("release tag already exist [tag_name: %s]", err.TagName)
  309. }
  310. type ErrReleaseNotExist struct {
  311. ID int64
  312. TagName string
  313. }
  314. func IsErrReleaseNotExist(err error) bool {
  315. _, ok := err.(ErrReleaseNotExist)
  316. return ok
  317. }
  318. func (err ErrReleaseNotExist) Error() string {
  319. return fmt.Sprintf("release tag does not exist [id: %d, tag_name: %s]", err.ID, err.TagName)
  320. }
  321. type ErrInvalidTagName struct {
  322. TagName string
  323. }
  324. func IsErrInvalidTagName(err error) bool {
  325. _, ok := err.(ErrInvalidTagName)
  326. return ok
  327. }
  328. func (err ErrInvalidTagName) Error() string {
  329. return fmt.Sprintf("release tag name is not valid [tag_name: %s]", err.TagName)
  330. }
  331. type ErrRepoFileAlreadyExist struct {
  332. FileName string
  333. }
  334. func IsErrRepoFileAlreadyExist(err error) bool {
  335. _, ok := err.(ErrRepoFileAlreadyExist)
  336. return ok
  337. }
  338. func (err ErrRepoFileAlreadyExist) Error() string {
  339. return fmt.Sprintf("repository file already exists [file_name: %s]", err.FileName)
  340. }
  341. // __________ .__
  342. // \______ \____________ ____ ____ | |__
  343. // | | _/\_ __ \__ \ / \_/ ___\| | \
  344. // | | \ | | \// __ \| | \ \___| Y \
  345. // |______ / |__| (____ /___| /\___ >___| /
  346. // \/ \/ \/ \/ \/
  347. type ErrBranchNotExist struct {
  348. Name string
  349. }
  350. func IsErrBranchNotExist(err error) bool {
  351. _, ok := err.(ErrBranchNotExist)
  352. return ok
  353. }
  354. func (err ErrBranchNotExist) Error() string {
  355. return fmt.Sprintf("branch does not exist [name: %s]", err.Name)
  356. }
  357. // __ __ ___. .__ __
  358. // / \ / \ ____\_ |__ | |__ ____ ____ | | __
  359. // \ \/\/ // __ \| __ \| | \ / _ \ / _ \| |/ /
  360. // \ /\ ___/| \_\ \ Y ( <_> | <_> ) <
  361. // \__/\ / \___ >___ /___| /\____/ \____/|__|_ \
  362. // \/ \/ \/ \/ \/
  363. type ErrWebhookNotExist struct {
  364. ID int64
  365. }
  366. func IsErrWebhookNotExist(err error) bool {
  367. _, ok := err.(ErrWebhookNotExist)
  368. return ok
  369. }
  370. func (err ErrWebhookNotExist) Error() string {
  371. return fmt.Sprintf("webhook does not exist [id: %d]", err.ID)
  372. }
  373. // .___
  374. // | | ______ ________ __ ____
  375. // | |/ ___// ___/ | \_/ __ \
  376. // | |\___ \ \___ \| | /\ ___/
  377. // |___/____ >____ >____/ \___ >
  378. // \/ \/ \/
  379. type ErrIssueNotExist struct {
  380. ID int64
  381. RepoID int64
  382. Index int64
  383. }
  384. func IsErrIssueNotExist(err error) bool {
  385. _, ok := err.(ErrIssueNotExist)
  386. return ok
  387. }
  388. func (err ErrIssueNotExist) Error() string {
  389. return fmt.Sprintf("issue does not exist [id: %d, repo_id: %d, index: %d]", err.ID, err.RepoID, err.Index)
  390. }
  391. // __________ .__ .__ __________ __
  392. // \______ \__ __| | | |\______ \ ____ ________ __ ____ _______/ |_
  393. // | ___/ | \ | | | | _// __ \/ ____/ | \_/ __ \ / ___/\ __\
  394. // | | | | / |_| |_| | \ ___< <_| | | /\ ___/ \___ \ | |
  395. // |____| |____/|____/____/____|_ /\___ >__ |____/ \___ >____ > |__|
  396. // \/ \/ |__| \/ \/
  397. type ErrPullRequestNotExist struct {
  398. ID int64
  399. IssueID int64
  400. HeadRepoID int64
  401. BaseRepoID int64
  402. HeadBarcnh string
  403. BaseBranch string
  404. }
  405. func IsErrPullRequestNotExist(err error) bool {
  406. _, ok := err.(ErrPullRequestNotExist)
  407. return ok
  408. }
  409. func (err ErrPullRequestNotExist) Error() string {
  410. return fmt.Sprintf("pull request does not exist [id: %d, issue_id: %d, head_repo_id: %d, base_repo_id: %d, head_branch: %s, base_branch: %s]",
  411. err.ID, err.IssueID, err.HeadRepoID, err.BaseRepoID, err.HeadBarcnh, err.BaseBranch)
  412. }
  413. // _________ __
  414. // \_ ___ \ ____ _____ _____ ____ _____/ |_
  415. // / \ \/ / _ \ / \ / \_/ __ \ / \ __\
  416. // \ \___( <_> ) Y Y \ Y Y \ ___/| | \ |
  417. // \______ /\____/|__|_| /__|_| /\___ >___| /__|
  418. // \/ \/ \/ \/ \/
  419. type ErrCommentNotExist struct {
  420. ID int64
  421. IssueID int64
  422. }
  423. func IsErrCommentNotExist(err error) bool {
  424. _, ok := err.(ErrCommentNotExist)
  425. return ok
  426. }
  427. func (err ErrCommentNotExist) Error() string {
  428. return fmt.Sprintf("comment does not exist [id: %d, issue_id: %d]", err.ID, err.IssueID)
  429. }
  430. // .____ ___. .__
  431. // | | _____ \_ |__ ____ | |
  432. // | | \__ \ | __ \_/ __ \| |
  433. // | |___ / __ \| \_\ \ ___/| |__
  434. // |_______ (____ /___ /\___ >____/
  435. // \/ \/ \/ \/
  436. type ErrLabelNotExist struct {
  437. LabelID int64
  438. RepoID int64
  439. }
  440. func IsErrLabelNotExist(err error) bool {
  441. _, ok := err.(ErrLabelNotExist)
  442. return ok
  443. }
  444. func (err ErrLabelNotExist) Error() string {
  445. return fmt.Sprintf("label does not exist [label_id: %d, repo_id: %d]", err.LabelID, err.RepoID)
  446. }
  447. // _____ .__.__ __
  448. // / \ |__| | ____ _______/ |_ ____ ____ ____
  449. // / \ / \| | | _/ __ \ / ___/\ __\/ _ \ / \_/ __ \
  450. // / Y \ | |_\ ___/ \___ \ | | ( <_> ) | \ ___/
  451. // \____|__ /__|____/\___ >____ > |__| \____/|___| /\___ >
  452. // \/ \/ \/ \/ \/
  453. type ErrMilestoneNotExist struct {
  454. ID int64
  455. RepoID int64
  456. }
  457. func IsErrMilestoneNotExist(err error) bool {
  458. _, ok := err.(ErrMilestoneNotExist)
  459. return ok
  460. }
  461. func (err ErrMilestoneNotExist) Error() string {
  462. return fmt.Sprintf("milestone does not exist [id: %d, repo_id: %d]", err.ID, err.RepoID)
  463. }
  464. // _____ __ __ .__ __
  465. // / _ \_/ |__/ |______ ____ | |__ _____ ____ _____/ |_
  466. // / /_\ \ __\ __\__ \ _/ ___\| | \ / \_/ __ \ / \ __\
  467. // / | \ | | | / __ \\ \___| Y \ Y Y \ ___/| | \ |
  468. // \____|__ /__| |__| (____ /\___ >___| /__|_| /\___ >___| /__|
  469. // \/ \/ \/ \/ \/ \/ \/
  470. type ErrAttachmentNotExist struct {
  471. ID int64
  472. UUID string
  473. }
  474. func IsErrAttachmentNotExist(err error) bool {
  475. _, ok := err.(ErrAttachmentNotExist)
  476. return ok
  477. }
  478. func (err ErrAttachmentNotExist) Error() string {
  479. return fmt.Sprintf("attachment does not exist [id: %d, uuid: %s]", err.ID, err.UUID)
  480. }
  481. // .____ .__ _________
  482. // | | ____ ____ |__| ____ / _____/ ____ __ _________ ____ ____
  483. // | | / _ \ / ___\| |/ \ \_____ \ / _ \| | \_ __ \_/ ___\/ __ \
  484. // | |__( <_> ) /_/ > | | \ / ( <_> ) | /| | \/\ \__\ ___/
  485. // |_______ \____/\___ /|__|___| / /_______ /\____/|____/ |__| \___ >___ >
  486. // \/ /_____/ \/ \/ \/ \/
  487. type ErrLoginSourceNotExist struct {
  488. ID int64
  489. }
  490. func IsErrLoginSourceNotExist(err error) bool {
  491. _, ok := err.(ErrLoginSourceNotExist)
  492. return ok
  493. }
  494. func (err ErrLoginSourceNotExist) Error() string {
  495. return fmt.Sprintf("login source does not exist [id: %d]", err.ID)
  496. }
  497. type ErrLoginSourceAlreadyExist struct {
  498. Name string
  499. }
  500. func IsErrLoginSourceAlreadyExist(err error) bool {
  501. _, ok := err.(ErrLoginSourceAlreadyExist)
  502. return ok
  503. }
  504. func (err ErrLoginSourceAlreadyExist) Error() string {
  505. return fmt.Sprintf("login source already exists [name: %s]", err.Name)
  506. }
  507. type ErrLoginSourceInUse struct {
  508. ID int64
  509. }
  510. func IsErrLoginSourceInUse(err error) bool {
  511. _, ok := err.(ErrLoginSourceInUse)
  512. return ok
  513. }
  514. func (err ErrLoginSourceInUse) Error() string {
  515. return fmt.Sprintf("login source is still used by some users [id: %d]", err.ID)
  516. }
  517. // ___________
  518. // \__ ___/___ _____ _____
  519. // | |_/ __ \\__ \ / \
  520. // | |\ ___/ / __ \| Y Y \
  521. // |____| \___ >____ /__|_| /
  522. // \/ \/ \/
  523. type ErrTeamAlreadyExist struct {
  524. OrgID int64
  525. Name string
  526. }
  527. func IsErrTeamAlreadyExist(err error) bool {
  528. _, ok := err.(ErrTeamAlreadyExist)
  529. return ok
  530. }
  531. func (err ErrTeamAlreadyExist) Error() string {
  532. return fmt.Sprintf("team already exists [org_id: %d, name: %s]", err.OrgID, err.Name)
  533. }
  534. // ____ ___ .__ .___
  535. // | | \______ | | _________ __| _/
  536. // | | /\____ \| | / _ \__ \ / __ |
  537. // | | / | |_> > |_( <_> ) __ \_/ /_/ |
  538. // |______/ | __/|____/\____(____ /\____ |
  539. // |__| \/ \/
  540. //
  541. type ErrUploadNotExist struct {
  542. ID int64
  543. UUID string
  544. }
  545. func IsErrUploadNotExist(err error) bool {
  546. _, ok := err.(ErrAttachmentNotExist)
  547. return ok
  548. }
  549. func (err ErrUploadNotExist) Error() string {
  550. return fmt.Sprintf("attachment does not exist [id: %d, uuid: %s]", err.ID, err.UUID)
  551. }