parser

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Column

type Column struct {
	// Name of the column
	Name string `yaml:"name"`
	// Type of the column will be generated
	Type string `yaml:"type"`
	// Option
	Option []string `yaml:"options,flow"`
	// Kwargs extra configs
	Kwargs map[string]interface{} `yaml:"kwargs"`
}

Column struct to keep config to generate column

type Config

type Config struct {
	Documents []Documents `yaml:"documents"`
}

type Documents

type Documents struct {
	// Name of the output file
	Name string `yaml:"name"`
	// Column configs should be generated
	Columns []Column `yaml:"columns"`
	// WithHeader variable to generate headers
	WithHeader bool `yaml:"with_header"`
	// Count is total row
	Count int `yaml:"rows"`
}

Documents struct to keep config to generate document

type Parser

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

Parser uses to parse yaml document

func NewParser

func NewParser(config Config, logger *logrus.Entry) *Parser

NewParser construct instance of Parser

func (Parser) PreparedDocument

func (p Parser) PreparedDocument() []generator.Document

PreparedDocument are all documents will generate

Jump to

Keyboard shortcuts

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