csv

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 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 CSVParser

type CSVParser struct {
	helper.ParserOperator
	// contains filtered or unexported fields
}

CSVParser is an operator that parses csv in an entry.

func (*CSVParser) Process

func (r *CSVParser) Process(ctx context.Context, e *entry.Entry) error

Process will parse an entry for csv.

type CSVParserConfig

type CSVParserConfig struct {
	helper.ParserConfig `yaml:",inline"`

	Header          string `json:"header" yaml:"header"`
	HeaderLabel     string `json:"header_label" yaml:"header_label"`
	HeaderDelimiter string `json:"header_delimiter,omitempty" yaml:"header_delimiter,omitempty"`
	FieldDelimiter  string `json:"delimiter,omitempty" yaml:"delimiter,omitempty"`
	LazyQuotes      bool   `json:"lazy_quotes,omitempty" yaml:"lazy_quotes,omitempty"`
}

CSVParserConfig is the configuration of a csv parser operator.

func NewCSVParserConfig

func NewCSVParserConfig(operatorID string) *CSVParserConfig

NewCSVParserConfig creates a new csv parser config with default values

func (CSVParserConfig) Build

Build will build a csv parser operator.

type ParseFunc added in v1.2.0

type ParseFunc func(interface{}) (interface{}, error)

ParseFunc is the function that will parse the log entry by CSV

Jump to

Keyboard shortcuts

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