ls

package
v3.0.0-beta.4 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Delimiter     = "delimiter"
	DelimiterHelp = `field delimiter`

	Strict     = "strict"
	StrictHelp = `strict parsing`

	Fields     = "fields"
	FieldsHelp = `` /* 687-byte string literal not displayed */

)

Variables

This section is empty.

Functions

func NewCmdList

func NewCmdList() *cobra.Command

NewCmdList creates the ls command

Types

type JSONWriter

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

func NewJSONWriter

func NewJSONWriter(w io.Writer, format string) *JSONWriter

func (*JSONWriter) WriteRecord

func (recordWriter *JSONWriter) WriteRecord(record warc.Record, fileName string) error

type ListFlags

type ListFlags struct {
	FileWalkerFlags       flag.FileWalkerFlags
	FilterFlags           flag.FilterFlags
	WarcIteratorFlags     flag.WarcIteratorFlags
	WarcRecordOptionFlags flag.WarcRecordOptionFlags
	ConcurrencyFlags      flag.ConcurrencyFlags
}

func (ListFlags) AddFlags

func (f ListFlags) AddFlags(cmd *cobra.Command)

func (ListFlags) Delimiter

func (f ListFlags) Delimiter() string

func (ListFlags) Fields

func (f ListFlags) Fields() string

func (ListFlags) JSON

func (f ListFlags) JSON() bool

func (ListFlags) Strict

func (f ListFlags) Strict() bool

func (ListFlags) ToListOptions

func (f ListFlags) ToListOptions() (*ListOptions, error)

type ListOptions

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

func (*ListOptions) Complete

func (o *ListOptions) Complete(cmd *cobra.Command, args []string) error

Complete completes the options

func (*ListOptions) Run

func (o *ListOptions) Run() error

Run runs the ls command

func (*ListOptions) Validate

func (o *ListOptions) Validate() error

Validate validates the options

type RecordWriter

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

func NewRecordWriter

func NewRecordWriter(w io.Writer, format, separator string) (*RecordWriter, error)

func (*RecordWriter) FormatRecord

func (recordWriter *RecordWriter) FormatRecord(record warc.Record, fileName string) string

FormatRecord writes the configured fields for the record to a string. Size is written with a place holder since it is not available until the next record is read.

func (*RecordWriter) Write

func (recordWriter *RecordWriter) Write(line string, size int64) error

Write takes a string produced by FormatRecord, replaces eventual size place holders with actual values and writes it to stdout.

func (*RecordWriter) WriteRecord

func (recordWriter *RecordWriter) WriteRecord(record warc.Record, fileName string) error

type Writer

type Writer interface {
	WriteRecord(record warc.Record, fileName string) error
}

Jump to

Keyboard shortcuts

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