Add SFTP backend
This commit is contained in:
parent
bfd99a9be6
commit
f848afed27
6 changed files with 456 additions and 37 deletions
|
@ -186,7 +186,12 @@ func (b *Local) Create(t Type, data []byte) (ID, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
// close tempfile, return id
|
||||
err = file.Close()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// return id
|
||||
id := IDFromData(data)
|
||||
err = b.renameFile(file, t, id)
|
||||
if err != nil {
|
||||
|
@ -276,3 +281,8 @@ func (b *Local) List(t Type) (IDs, error) {
|
|||
func (b *Local) Version() uint {
|
||||
return b.ver
|
||||
}
|
||||
|
||||
// Close closes the repository
|
||||
func (b *Local) Close() error {
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue