Versions in this module Expand all Collapse all v0 v0.1.0 Aug 13, 2026 Changes in this version + var ErrNoSnapshots = errors.New("remote/restic: repository holds no snapshots yet") + var ErrUnknownRemote = errUnknownRemote("") + var ErrUnsafePath = errors.New("remote: unsafe path") + func CheckPath(p string) error + func IsBlockContainer(p string) bool + func IsStoreContent(p string) bool + func IsTombContainer(p string) bool + func RelativeTo(root, absPath string) string + type Caps struct + Atomic bool + History bool + Locking bool + Rename bool + Watch bool + WeakAtomic bool + type File struct + ModTime time.Time + Path string + Rev string + Size int64 + type GitOptions struct + Dir string + GitPath string + Name string + URL string + type GitRemote struct + func NewGitRemote(opts GitOptions) (*GitRemote, error) + func (g *GitRemote) Caps() Caps + func (g *GitRemote) Close() error + func (g *GitRemote) Delete(ctx context.Context, path string, expectRev string) error + func (g *GitRemote) Get(ctx context.Context, path string) (io.ReadCloser, string, error) + func (g *GitRemote) List(ctx context.Context) ([]File, error) + func (g *GitRemote) Lock(_ context.Context) (Unlock, error) + func (g *GitRemote) Name() string + func (g *GitRemote) Pull(ctx context.Context) error + func (g *GitRemote) Push(ctx context.Context) error + func (g *GitRemote) Put(ctx context.Context, path string, content io.Reader, expectRev string) (string, error) + func (g *GitRemote) Rename(ctx context.Context, from, to string) error + type MemOptions struct + Caps Caps + Name string + type MemRemote struct + func NewMemRemote(opts MemOptions) *MemRemote + func (m *MemRemote) Caps() Caps + func (m *MemRemote) Close() error + func (m *MemRemote) Delete(_ context.Context, path string, expectRev string) error + func (m *MemRemote) Get(_ context.Context, path string) (io.ReadCloser, string, error) + func (m *MemRemote) List(_ context.Context) ([]File, error) + func (m *MemRemote) Lock(_ context.Context) (Unlock, error) + func (m *MemRemote) Name() string + func (m *MemRemote) Put(_ context.Context, path string, content io.Reader, expectRev string) (string, error) + func (m *MemRemote) Rename(_ context.Context, from, to string) error + type NoopUnlock struct + func (NoopUnlock) Unlock(_ context.Context) error + type RcloneOptions struct + Name string + Remote string + type RcloneRemote struct + func NewRcloneRemote(opts RcloneOptions) (*RcloneRemote, error) + func (r *RcloneRemote) Caps() Caps + func (r *RcloneRemote) Close() error + func (r *RcloneRemote) Delete(ctx context.Context, path string, expectRev string) error + func (r *RcloneRemote) Get(ctx context.Context, path string) (io.ReadCloser, string, error) + func (r *RcloneRemote) List(ctx context.Context) ([]File, error) + func (r *RcloneRemote) Lock(_ context.Context) (Unlock, error) + func (r *RcloneRemote) Name() string + func (r *RcloneRemote) Put(ctx context.Context, path string, content io.Reader, expectRev string) (string, error) + func (r *RcloneRemote) Rename(ctx context.Context, from, to string) error + type Remote interface + Caps func() Caps + Close func() error + Delete func(ctx context.Context, path string, expectRev string) error + Get func(ctx context.Context, path string) (content io.ReadCloser, rev string, err error) + List func(ctx context.Context) ([]File, error) + Lock func(ctx context.Context) (Unlock, error) + Name func() string + Put func(ctx context.Context, path string, content io.Reader, expectRev string) (rev string, err error) + Rename func(ctx context.Context, from, to string) error + func FromConfig(remoteType string, opts map[string]string) (Remote, error) + type ResticOptions struct + ExtraArgs []string + ExtraEnv []string + Name string + Password string + PasswordCommand string + Repo string + ResticPath string + StoreDir string + type ResticRemote struct + func NewResticRemote(opts ResticOptions) (*ResticRemote, error) + func (r *ResticRemote) Caps() Caps + func (r *ResticRemote) Close() error + func (r *ResticRemote) Delete(ctx context.Context, path string, expectRev string) error + func (r *ResticRemote) Forget(ctx context.Context, policyArgs ...string) error + func (r *ResticRemote) Get(ctx context.Context, path string) (io.ReadCloser, string, error) + func (r *ResticRemote) List(ctx context.Context) ([]File, error) + func (r *ResticRemote) Lock(_ context.Context) (Unlock, error) + func (r *ResticRemote) Name() string + func (r *ResticRemote) Pull(_ context.Context) error + func (r *ResticRemote) Push(ctx context.Context) error + func (r *ResticRemote) Put(ctx context.Context, path string, content io.Reader, expectRev string) (string, error) + func (r *ResticRemote) Rename(_ context.Context, from, to string) error + func (r *ResticRemote) Restore(ctx context.Context, snapshotID, targetDir string) error + func (r *ResticRemote) Snapshots(ctx context.Context) ([]ResticSnapshot, error) + type ResticSnapshot struct + Hostname string + ID string + Paths []string + ShortID string + Tags []string + Time string + Username string + type Unlock interface + Unlock func(ctx context.Context) error