config

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Runtime    *Runtime
	Columns    csv.Headers `yaml:"columns"`
	Metadata   Metadata    `yaml:"metadata"`
	Corruption Corruption  `yaml:"corruption"`
}

func New

func New(runtime *Runtime) (*Config, error)

func (*Config) Validate

func (c *Config) Validate() error

type Corruption

type Corruption struct {
	Method  string  `yaml:"method"`
	Chance  float64 `yaml:"chance"`
	Min     int     `yaml:"min"`
	Max     int     `yaml:"max"`
	Enabled bool    `yaml:"enabled"`
}

type Metadata

type Metadata struct {
	Delimiter     string `yaml:"delimiter"`
	DelimiterRune rune
	RowCount      int `yaml:"rowCount"`
}

func (*Metadata) Validate

func (m *Metadata) Validate() error

type Runtime

type Runtime struct {
	LogLevel string
	Input    string
	Output   string
}

Jump to

Keyboard shortcuts

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