filepath_summary

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: May 24, 2016 License: MIT Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DirSummary

type DirSummary struct {
	BaseDir                string
	FlattenedFileSummaries []*FileSummary
}

DirSummary holds the summary used for synchronizing across

func NewDirSummary added in v0.0.9

func NewDirSummary(baseDir string, flattenedFileSummaries []*FileSummary) *DirSummary

NewDirSummary will create a new instance of DirSummary

type FileSummary

type FileSummary struct {
	RelativePath string
	ModTime      time.Time
	Checksum     *checksums.ChecksumResult
}

FileSummary holds the info for a single file

func NewFileSummary

func NewFileSummary(relativePath string, modTime time.Time, checksum *checksums.ChecksumResult) *FileSummary

NewFileSummary will create a new instance of FileSummary

func (*FileSummary) HaveSamePath

func (f *FileSummary) HaveSamePath(other *FileSummary) bool

HaveSamePath compares it to the path of another

type Service

type Service interface {
	GetFileSummary(dirPath, relPath string) (*FileSummary, error)
	GetDirSummary(dirPath string) (*DirSummary, error)
}

Service is the filepath summary service

func New

func New(checksumsSvc checksums.Service) Service

New creates a new service instance

Jump to

Keyboard shortcuts

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