std

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

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

Reader represents an stdin reader.

func NewReader

func NewReader(ctx context.Context, bufferSize int) (*Reader, error)

NewReader creates a new stdin reader.

func (*Reader) GetNumber

func (r *Reader) GetNumber() int64

GetNumber returns -1 for stdin, indicating that estimates should not be calculated.

func (*Reader) GetSize

func (r *Reader) GetSize() int64

GetSize returns -1 for stdin, indicating that estimates should not be calculated.

func (*Reader) GetSkipped added in v0.8.0

func (r *Reader) GetSkipped() []string

GetSkipped returns a list of file paths that were skipped during the `StreamFlies` with skipPrefix. no-op func to satisfy interface.

func (*Reader) GetType

func (r *Reader) GetType() string

GetType returns the `stdType` type of storage. Used in logging.

func (*Reader) ListObjects

func (r *Reader) ListObjects(ctx context.Context, _ string) ([]string, error)

ListObjects returns a list of objects in the path. Always returns one element "stdin".

func (*Reader) StreamFile

func (r *Reader) StreamFile(
	ctx context.Context, filename string, readersCh chan<- models.File, errorsCh chan<- error,
)

StreamFile opens stdin as a file and sends io.Readers to the `readersCh`

func (*Reader) StreamFiles

func (r *Reader) StreamFiles(
	ctx context.Context, readersCh chan<- models.File, errorsCh chan<- error, _ []string,
)

StreamFiles opens stdin as files and sends io.Readers to the `readersCh`

type Writer

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

Writer represents an stdout writer.

func NewWriter

func NewWriter(ctx context.Context, bufferSize int) (*Writer, error)

NewWriter creates a new stdout writer.

func (*Writer) GetType

func (w *Writer) GetType() string

GetType returns the `stdType` type of storage. Used in logging.

func (*Writer) NewWriter

func (w *Writer) NewWriter(ctx context.Context, _ string) (io.WriteCloser, error)

NewWriter creates a new stdout writer closer. The file name is ignored for stdout.

func (*Writer) Remove

func (w *Writer) Remove(_ context.Context, _ string) error

Remove no-op for stdout.

func (*Writer) RemoveFiles

func (w *Writer) RemoveFiles(_ context.Context) error

RemoveFiles is a no-op for stdout.

Jump to

Keyboard shortcuts

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