log

package
v0.0.0-...-094e3b7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package log provides methods for extracting the log of changes for a snapshot.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SummarizeLog

func SummarizeLog(ctx context.Context, s *storage.LocalFiles, entries []*LogEntry) (map[snapshot.Hash][]string, error)

Types

type LogEntry

type LogEntry struct {
	// Hash is the hash of the file snapshot
	Hash *snapshot.Hash

	// File is the file snapshot
	File *snapshot.File
	// contains filtered or unexported fields
}

func ReadLog

func ReadLog(ctx context.Context, s *storage.LocalFiles, h *snapshot.Hash, maxDepth int) ([]*LogEntry, error)

func (*LogEntry) NestedContents

func (e *LogEntry) NestedContents(ctx context.Context, s *storage.LocalFiles, includeDirectories bool) ([]string, map[string]*snapshot.Hash, error)

NestedContents returns a map from subpaths of the log entry's file to the corresponding (hashes of the) file snapshots for the nested files.

This is only defined for snapshots of directories, and for all other cases the return value will be nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL