rules

package
v0.0.0-...-7607e3a Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DropRowRule

type DropRowRule struct {
	Substring string `yaml:"substring"`
}

type RenameColumnRule

type RenameColumnRule struct {
	Index int    `yaml:"index"`
	Name  string `yaml:"name"`
}

type Rules

type Rules struct {
	Fs           afero.Fs
	SwapColumn   []SwapColumnRule   `yaml:"swapColumn,omitempty"`
	RenameColumn []RenameColumnRule `yaml:"renameColumn,omitempty"`
	DropRow      []DropRowRule      `yaml:"dropRow,omitempty"`
}

func Parse

func Parse(cfg *config.Config) (*Rules, error)

func (*Rules) Apply

func (r *Rules) Apply(input csv.Reader, output csv.Writer) error

type SwapColumnRule

type SwapColumnRule struct {
	OriginIndex int `yaml:"originIndex"`
	TargetIndex int `yaml:"targetIndex"`
}

Jump to

Keyboard shortcuts

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