Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultModes = Modes{Dir: 0700, File: 0600}
DefaultModes defines the default permissions to apply to new repository files and directories stored on file-based backends.
Functions ¶
func DefaultDelete ¶
DefaultDelete removes all restic keys in the bucket. It will not remove the bucket itself.
func DefaultLoad ¶
func DefaultLoad(ctx context.Context, h backend.Handle, length int, offset int64, openReader func(ctx context.Context, h backend.Handle, length int, offset int64) (io.ReadCloser, error), fn func(rd io.Reader) error) error
DefaultLoad implements Backend.Load using lower-level openReader func
func StartForeground ¶
StartForeground runs cmd in the foreground, by temporarily switching to the new process group created for cmd. The returned function `bg` switches back to the previous process group.
The command's environment has all RESTIC_* variables removed.
Types ¶
type LimitedReadCloser ¶
type LimitedReadCloser struct { io.Closer io.LimitedReader }
LimitedReadCloser wraps io.LimitedReader and exposes the Close() method.
func LimitReadCloser ¶
func LimitReadCloser(r io.ReadCloser, n int64) *LimitedReadCloser
LimitReadCloser returns a new reader wraps r in an io.LimitedReader, but also exposes the Close() method.