fswalker

package
v0.9.8 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package fswalker provides the checker.Comparer interface using FSWalker walker and reporter.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WalkCompare

type WalkCompare struct {
	GlobalFilterFuncs []func(string, fswalker.ActionData) bool
}

WalkCompare is a checker.Comparer that utilizes the fswalker libraries to perform the data consistency check.

func NewWalkCompare

func NewWalkCompare() *WalkCompare

NewWalkCompare instantiates a new WalkCompare and returns its pointer.

func (*WalkCompare) Compare

func (chk *WalkCompare) Compare(ctx context.Context, path string, data []byte, reportOut io.Writer, opts map[string]string) error

Compare meets the checker.Comparer interface. It performs a fswalker Walk on the provided file path, unmarshals the comparison data as a fswalker Walk, and generates a fswalker report comparing the two Walks. If there are any differences an error is returned, and the full report will be written to the provided writer as JSON.

func (*WalkCompare) Gather

func (chk *WalkCompare) Gather(ctx context.Context, path string, opts map[string]string) ([]byte, error)

Gather meets the checker.Comparer interface. It performs a fswalker Walk and returns the resulting Walk as a protobuf Marshaled buffer.

Directories

Path Synopsis
Package protofile contains helper functions common across multiple fswalker tool wrappers
Package protofile contains helper functions common across multiple fswalker tool wrappers
Package reporter wraps calls to the the fswalker Reporter
Package reporter wraps calls to the the fswalker Reporter
Package walker wraps calls to the the fswalker Walker
Package walker wraps calls to the the fswalker Walker

Jump to

Keyboard shortcuts

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