Documentation
¶
Index ¶
- Constants
- Variables
- type ListEntry
- type Manager
- func (s *Manager) DeleteSnapshot(ctx context.Context, timestamp time.Time) error
- func (s *Manager) LatestSnapshot(ctx context.Context) (*Snapshot, time.Time, error)
- func (s *Manager) ListSnapshots(ctx context.Context, cb func(ctx context.Context, timestamp time.Time) error) error
- func (s *Manager) NewSession(ctx context.Context) (*Session, error)
- func (s *Manager) OpenSnapshot(ctx context.Context, timestamp time.Time) (*Snapshot, error)
- func (s *Manager) RevertTo(ctx context.Context, timestamp time.Time) (*Session, error)
- type ReadSeekCloser
- type Session
- func (s *Session) Close() error
- func (s *Session) Commit(ctx context.Context) (err error)
- func (s *Session) Delete(ctx context.Context, path string) (removed bool, err error)
- func (s *Session) DeleteAll(ctx context.Context, matcher func(string) bool) (removed int, err error)
- func (s *Session) Flush(ctx context.Context) error
- func (s *Session) List(ctx context.Context, prefix string, recursive bool, ...) error
- func (s *Session) PutFile(ctx context.Context, path string, creation, modified time.Time, mode uint32, ...) (state pathdb.PutState, err error)
- func (s *Session) PutSymlink(ctx context.Context, path string, creation, modified time.Time, mode uint32, ...) (state pathdb.PutState, err error)
- func (s *Session) Rename(ctx context.Context, re *regexp.Regexp, replacement string) (renamed int, err error)
- type Snapshot
- func (s *Snapshot) Close() error
- func (s *Snapshot) HasPrefix(ctx context.Context, prefix string) (exists bool, err error)
- func (s *Snapshot) List(ctx context.Context, prefix string, recursive bool, ...) error
- func (s *Snapshot) Open(ctx context.Context, path string) (*manifest.Metadata, *streams.Stream, error)
Constants ¶
View Source
const (
ManifestPrefix = "manifests/"
)
Variables ¶
View Source
var ErrNotFound = fmt.Errorf("file not found")
Functions ¶
This section is empty.
Types ¶
type ListEntry ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) DeleteSnapshot ¶
func (*Manager) LatestSnapshot ¶
func (*Manager) ListSnapshots ¶
func (s *Manager) ListSnapshots(ctx context.Context, cb func(ctx context.Context, timestamp time.Time) error) error
ListSnapshots returns snapshots newest to oldest
func (*Manager) OpenSnapshot ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func (*Session) PutFile ¶
func (s *Session) PutFile(ctx context.Context, path string, creation, modified time.Time, mode uint32, data ReadSeekCloser) (state pathdb.PutState, err error)
PutFile causes the Session to take ownership of the data io.ReadCloser and will close it when the Session either uses the data or closes itself.
func (*Session) PutSymlink ¶
Click to show internal directories.
Click to hide internal directories.