module

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(path string, fs afero.Fs, p out.Printer, modules ...Module)

Execute runs modules over path specified

Types

type Context

type Context struct {
	// contains filtered or unexported fields
}

Context defines modules context

func NewContext

func NewContext(top int, rr bool, root string) *Context

NewContext creates new module's context that needed to create new modules

type Module

type Module interface {
	// contains filtered or unexported methods
}

Module defines working modules interface

func NewAggregateFileModule

func NewAggregateFileModule(ctx *Context, order int) Module

NewAggregateFileModule creates new total file statistic module

func NewBenfordFileModule

func NewBenfordFileModule(ctx *Context, order int) Module

NewBenfordFileModule creates new file size bendford statistic

func NewDetailFileModule

func NewDetailFileModule(ctx *Context, order int, enabledRanges []int) Module

NewDetailFileModule creates new file statistic by file size range module

func NewExtensionModule

func NewExtensionModule(ctx *Context, order int) Module

NewExtensionModule creates new file extensions statistic module

func NewFoldersModule

func NewFoldersModule(ctx *Context, order int) Module

NewFoldersModule creates new folders module

func NewTopFilesModule

func NewTopFilesModule(ctx *Context, order int) Module

NewTopFilesModule creates new top files statistic module

func NewTotalModule

func NewTotalModule(ctx *Context, order int) Module

NewTotalModule creates new total statistic module

type Range

type Range struct {
	// Min value
	Min int64

	// Max value
	Max int64
	// contains filtered or unexported fields
}

Range defined integer value range

func NewRange added in v1.0.0

func NewRange(min int64, max int64) *Range

NewRange creates new *Range

func (*Range) Contains

func (r *Range) Contains(num int64) bool

Contains defines whether the number specified within range

func (*Range) Count added in v1.0.0

func (r *Range) Count() int64

Count gets the number of files that match the Range

func (*Range) Equal added in v1.0.0

func (r *Range) Equal(y rbtree.Comparable) bool

Equal gets whether value specified equal current value

func (*Range) Less added in v1.0.0

func (r *Range) Less(y rbtree.Comparable) bool

Less gets whether value specified less then current value

func (*Range) Size added in v1.0.0

func (r *Range) Size() int64

Size gets total size of all files that match the Range

func (*Range) String added in v1.0.0

func (r *Range) String() string

Jump to

Keyboard shortcuts

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