Compare commits

...

8 Commits

Author SHA1 Message Date
Richard Anthony dddc73c4c1
Merge ac10f62295 into 228b35f074 2024-04-21 13:50:53 +07:00
Richard Anthony ac10f62295 fixup! Revert "feat: HTTP API" 2023-01-28 19:48:20 +11:00
Richard Anthony ad1f844cea Revert "feat: HTTP API"
This reverts commit 1b4d6e2777.
2023-01-28 06:49:31 +11:00
Richard Anthony bd25620880 cleanup 2023-01-27 19:09:03 +11:00
Richard Anthony 1b4d6e2777 feat: HTTP API
Expose internal functions to allow for http api and or SDK
2023-01-27 19:07:28 +11:00
Richard Anthony 619e243e60 wip: attempt to build for wasm 2022-12-28 10:56:35 +11:00
Richard Anthony 73c7780a03 wip: build with tinygo 2022-12-28 10:56:35 +11:00
Richard Anthony 7ca98f6cd8
Create wasi.yml 2022-12-25 13:29:59 +11:00
4 changed files with 69 additions and 0 deletions

32
activ.go Normal file
View File

@ -0,0 +1,32 @@
package restic
import (
"context"
"time"
"github.com/restic/restic/internal/restic"
)
type Snapshot struct {
paths, tags []string
hostname string
time time.Time
}
type Filter struct {
ctx context.Context
be restic.Lister
loader restic.LoaderUnpacked
hosts, snapshotIDs []string
tags restic.TagList
paths []restic.TagList
cb restic.SnapshotFindCb
}
func New(s *Snapshot) (*restic.Snapshot, error) {
return restic.NewSnapshot(s.paths, s.tags, s.hostname, s.time)
}
func Find(f *Filter) {
restic.FindFilteredSnapshots(f.ctx, f.be, f.loader, f.hosts, f.paths, f.tags, f.snapshotIDs, f.cb)
}

19
internal/fs/const_js.go Normal file
View File

@ -0,0 +1,19 @@
//go:build js
// +build js
package fs
// Flags to OpenFile wrapping those of the underlying system. Not all flags may
// be implemented on a given system.
const (
O_RDONLY int = 0
O_WRONLY int = 0
O_RDWR int = 0
O_APPEND int = 0
O_CREATE int = 0
O_EXCL int = 0
O_SYNC int = 0
O_TRUNC int = 0
O_NONBLOCK int = 0
O_NOFOLLOW int = 0
)

15
internal/fs/stat_js.go Normal file
View File

@ -0,0 +1,15 @@
//go:build js
// +build js
package fs
import (
"os"
// "syscall"
// "time"
)
// extendedStat extracts info into an ExtendedFileInfo for unix based operating systems.
func extendedStat(fi os.FileInfo) ExtendedFileInfo {
return ExtendedFileInfo{}
}

View File

@ -0,0 +1,3 @@
package signals
func setupSignals() {}