mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-30 21:38:48 +01:00
🎨 Support downloading cloud data snapshots to local on demand https://github.com/siyuan-note/siyuan/issues/8057
This commit is contained in:
parent
83318d6246
commit
c2dafe4899
10 changed files with 59 additions and 3 deletions
|
|
@ -672,6 +672,29 @@ func GetCloudRepoTagSnapshots() (ret []*dejavu.Log, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func GetCloudRepoSnapshots(marker string) (ret []*dejavu.Log, nextMarker string, err error) {
|
||||
ret = []*dejavu.Log{}
|
||||
if 1 > len(Conf.Repo.Key) {
|
||||
err = errors.New(Conf.Language(26))
|
||||
return
|
||||
}
|
||||
|
||||
repo, err := newRepository()
|
||||
if nil != err {
|
||||
return
|
||||
}
|
||||
|
||||
logs, nextMarker, err := repo.GetCloudRepoLogs(marker)
|
||||
if nil != err {
|
||||
return
|
||||
}
|
||||
ret = logs
|
||||
if 1 > len(ret) {
|
||||
ret = []*dejavu.Log{}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func GetTagSnapshots() (ret []*Snapshot, err error) {
|
||||
ret = []*Snapshot{}
|
||||
if 1 > len(Conf.Repo.Key) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue