Documentation
¶
Index ¶
- Variables
- type File
- type FileSystem
- type Spool
- func (spool *Spool) ForEach(ctx context.Context, dir string, f Writer) error
- func (spool *Spool) ForEachPath(ctx context.Context, paths []string, f Writer) error
- func (spool *Spool) Partition(ctx context.Context, dir string, ...) error
- func (spool *Spool) Write(path string, r io.Reader) error
- func (spool *Spool) WriteFile(path string, b []byte) error
- type Writer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // spool is immutable, consumed tasks remains in spool. IsImmutable = withMutability(immutable) // spool is mutable, consumed tasks are removed IsMutable = withMutability(mutable) // spool fails on error WithStrict = withStrict(strict) // spool skips error, continue as warning WithSkipError = withStrict(skiperror) // spool files matching the pattern WithPattern = opts.ForName[Spool, string]("pattern") // output files with new extension WithFileExt = opts.ForName[Spool, string]("ext") )
Functions ¶
This section is empty.
Types ¶
type FileSystem ¶
type FileSystem interface {
fs.FS
Create(path string, attr *struct{}) (File, error)
Remove(path string) error
}
A FileSystem provides access to a hierarchical file system. The abstraction support I/O to local file system or AWS S3. Use it with https://github.com/fogfish/stream
type Spool ¶
type Spool struct {
// contains filtered or unexported fields
}
func (*Spool) ForEach ¶
Apply the spool function over each file in the reader filesystem, producing results to writer file system.
func (*Spool) ForEachPath ¶ added in v1.2.7
Apply the spool function over all file in the reader filesystem, producing results to writer file system.
func (*Spool) Partition ¶ added in v1.2.5
func (spool *Spool) Partition( ctx context.Context, dir string, f func(context.Context, string, io.Reader) (string, error), ) error
Apply the parition function over each file in the reader filesystem, producing results to writer file system.
Click to show internal directories.
Click to hide internal directories.