parser

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 License: MIT Imports: 1 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"`
}

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"`
	// 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) *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