Alexander Neumann
8c34eaad15
Improve error message
2017-02-11 14:28:15 +01:00
Alexander Neumann
0492eabff1
Improve error messages
2017-02-11 14:24:11 +01:00
Alexander Neumann
b9bddeff39
Normalise the backend API
...
This makes the following changes, before:
type backend interface {
// Test a boolean value whether a File with the name and type exists.
Test(t FileType, name string) (bool, error)
// Remove removes a File with type t and name.
Remove(t FileType, name string) error
}
After:
type backend interface {
// Test a boolean value whether a File with the name and type exists.
Test(h Handle) (bool, error)
// Remove removes a File with type t and name.
Remove(h Handle) error
}
2017-01-26 22:02:22 +01:00
Alexander Neumann
2de7e03698
repository.LoadBlob: Read correct number of bytes
2017-01-24 11:42:50 +01:00
Alexander Neumann
31055d88a5
Add debug messages
2017-01-24 11:42:42 +01:00
Alexander Neumann
f382696ccf
repository: Use ReadAt() instead of Load()
2017-01-23 17:54:12 +01:00
Alexander Neumann
212936eb52
Make backend.LoadAll() similar to ioutil.ReadAll()
2017-01-23 17:54:12 +01:00
Alexander Neumann
a36c01372d
Use streaming functions for saving data in repo
2017-01-23 17:54:11 +01:00
Alexander Neumann
9b48da5b4e
Change backend Save() function signature
2017-01-23 17:54:11 +01:00
Alexander Neumann
e571b6a656
Use the same buffer for decryption
2017-01-17 10:40:57 +01:00
Alexander Neumann
32a5c2c1f6
Add a few functions to calculate Blob buffer len
2017-01-17 10:40:57 +01:00
Alexander Neumann
9a5b9253c4
LoadBlob: use buffer as scratch space
...
benchmark old bytes new bytes delta
BenchmarkLoadBlob-4 1010128 2256 -99.78%
2017-01-17 10:40:57 +01:00
Alexander Neumann
4eddcb344e
Update calls to debug.Log()
2016-09-28 19:56:03 +02:00
Alexander Neumann
04d6b5da2f
Remove more unused bits
2016-09-21 20:45:18 +02:00
Alexander Neumann
1dfd3b8aa3
Remove unused bits and pieces
...
Reported by https://github.com/dominikh/go-unused
2016-09-21 20:22:32 +02:00
Alexander Neumann
b5b3c0eaf8
Add repository.SaveTree
2016-09-03 21:10:25 +02:00
Alexander Neumann
1fb80bf0e2
Fix fuse mount
2016-09-03 21:10:25 +02:00
Alexander Neumann
436332d5f2
LoadDataBlob -> LoadBlob
2016-09-03 21:10:25 +02:00
Alexander Neumann
fe8c12c798
Replace repolitoy.SaveAndEncrypt to SaveBlob()
2016-09-03 21:10:25 +02:00
Alexander Neumann
1cc59010f5
Remove LoadJSONPack, un-export loadBlob
2016-09-03 21:10:25 +02:00
Alexander Neumann
ffbe05af9b
Rework crypto, use restic.Repository everywhere
2016-09-03 21:10:25 +02:00
Alexander Neumann
84f95a09d7
Introduce LoadTreeBlob and LoadDataBlob
2016-09-03 21:10:25 +02:00
Alexander Neumann
bc42dbdf87
Create package restic/errors
2016-09-03 21:10:24 +02:00
Alexander Neumann
5e3a41dbd2
Rename struct member FileType -> Type
2016-09-03 21:10:24 +02:00
Alexander Neumann
4c95d2cfdc
wip
2016-09-03 21:10:24 +02:00
Alexander Neumann
cc6a8b6e15
wip
2016-09-03 21:10:24 +02:00
Alexander Neumann
51d8e6aa28
wip
2016-09-03 21:10:24 +02:00
Alexander Neumann
f0600c1d5f
wip
2016-09-03 21:10:24 +02:00
Alexander Neumann
9cf63c99cf
Wrap errors #3
2016-08-29 22:16:58 +02:00
Alexander Neumann
b06845c545
Always use errors.Cause() for testing error values
2016-08-29 19:52:03 +02:00
Alexander Neumann
045f545085
repository: Handle errors correctly
2016-08-29 19:23:50 +02:00
Alexander Neumann
72aa6be38d
Replace fmt.Errorf() by errors.Errorf()
2016-08-29 19:23:50 +02:00
Alexander Neumann
444a268ce0
Replace stdlib errors with github.com/pkg/errors
2016-08-29 19:23:50 +02:00
Alexander Neumann
de88fb2022
Simplify pack.List
2016-08-25 22:25:55 +02:00
Alexander Neumann
9f752b8306
Rework function for listing packs
2016-08-25 21:08:16 +02:00
Alexander Neumann
d8107f77aa
Limit the number of key files checked on SearchKey
2016-08-21 13:10:16 +02:00
Alexander Neumann
f5daf33322
Add pack size to ListAllPacks
2016-08-16 21:30:14 +02:00
Alexander Neumann
94d157d97a
Introduce interface pack.Loader
2016-08-16 21:30:14 +02:00
Alexander Neumann
17e1872544
Switch order of parameters to repo.LoadBlob()
2016-08-16 21:28:54 +02:00
Alexander Neumann
246302375d
Index: Add multiple packs per blob, pack.Type
...
Change the index so that a blob can be contained in multiple packs.
Require passing the blob type to all lookup functions.
2016-08-16 21:28:54 +02:00
Alexander Neumann
d5323223f4
Change repository Init() function to allow better testing
2016-08-16 21:28:54 +02:00
Alexander Neumann
173940cbdf
Add repository.ListPack
2016-05-08 13:51:21 +02:00
Alexander Neumann
6fc3590838
Remove repository.SaveFrom()
2016-05-08 13:13:29 +02:00
Alexander Neumann
18c3024171
Unexport NewPackerManager
2016-03-06 14:20:48 +01:00
Alexander Neumann
cda7616c82
Remove tempdir for packerManager
2016-03-06 13:14:06 +01:00
Alexander Neumann
f956f60f9f
PackerManager: use tempfiles instead of memory buffers
2016-03-06 12:26:25 +01:00
Alexander Neumann
4ae16d7661
repository: Use backend.ID to load index
...
This commit uses ParallelWorkFuncParseID() to load all indexes and
ignores file names with invalid format.
This fixes #475 .
2016-02-24 22:41:32 +01:00
Alexander Neumann
c0bd660a9e
Rename package
...
* github.com/restic/restic -> restic
2016-02-20 17:31:21 +01:00