files

package
v1.5.50 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists

func Exists(name string) (bool, error)

Types

type DryRun

type DryRun[T string | []byte] struct {
	// contains filtered or unexported fields
}

func (*DryRun) Name

func (w *DryRun) Name() string

func (*DryRun[T]) Process

func (sp *DryRun[T]) Process(cxt context.Context, inputs []*pipeline.Data[T]) (outputs []*pipeline.Data[struct{}], err error)

func (*DryRun) SetName

func (w *DryRun) SetName(name string)

func (*DryRun[T]) Write

func (sp *DryRun[T]) Write(cxt context.Context, data pipeline.Map[string, *pipeline.Data[T]], pipelineOptions pipeline.ProcessingOptions) (err error)

type FileWriter

type FileWriter[T string | []byte] struct {
	// contains filtered or unexported fields
}

func (*FileWriter[T]) Name

func (sp *FileWriter[T]) Name() string

func (*FileWriter[T]) Process

func (sp *FileWriter[T]) Process(cxt context.Context, input *pipeline.Data[T], index int32, total int32) (outputs []*pipeline.Data[struct{}], extras []*pipeline.Data[T], err error)

func (*FileWriter) SetName

func (w *FileWriter) SetName(name string)

func (*FileWriter[T]) Write

func (sp *FileWriter[T]) Write(cxt context.Context, data pipeline.Map[string, *pipeline.Data[T]], pipelineOptions pipeline.ProcessingOptions) (err error)

type OutputOptions

type OutputOptions struct {
	DryRun bool `default:"false" short:"d" aliases:"dryrun" help:"whether or not to actually output files" group:"Output:"`
	Patch  bool `default:"false" short:"p" help:"generate patch file" group:"Output:"`
}

type Patcher

type Patcher[T string | []byte] struct {
	Root string
	// contains filtered or unexported fields
}

func NewPatcher

func NewPatcher[T string | []byte](name string, out io.Writer) *Patcher[T]

func (*Patcher) Name

func (w *Patcher) Name() string

func (*Patcher[T]) Process

func (sp *Patcher[T]) Process(cxt context.Context, inputs []*pipeline.Data[T]) (outputs []*pipeline.Data[struct{}], err error)

func (*Patcher) SetName

func (w *Patcher) SetName(name string)

func (*Patcher[T]) Write

func (sp *Patcher[T]) Write(cxt context.Context, data pipeline.Map[string, *pipeline.Data[T]], pipelineOptions pipeline.ProcessingOptions) (err error)

type Reader

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

func NewReader

func NewReader(name string) *Reader

func (*Reader) Name

func (sp *Reader) Name() string

func (*Reader) Process

func (sp *Reader) Process(cxt context.Context, input *pipeline.Data[struct{}], index int32, total int32) (outputs []*pipeline.Data[[]byte], extras []*pipeline.Data[struct{}], err error)

type Writer

type Writer[T string | []byte] interface {
	pipeline.Processor
	SetName(name string)
	Write(cxt context.Context, data pipeline.Map[string, *pipeline.Data[T]], pipelineOptions pipeline.ProcessingOptions) (err error)
}

func NewWriter

func NewWriter[T string | []byte](name string, options OutputOptions) Writer[T]

Jump to

Keyboard shortcuts

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