lib

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	Excel           *excelize.File
	Config          map[string]Sheet
	ConfigSheet     string
	TemplateSheet   string
	Templates       map[string]Template
	GeneratorsSheet string
	Generators      []GeneratorItem
}

func NewAgent

func NewAgent(config Config) (*Agent, error)

func (*Agent) AddItem

func (a *Agent) AddItem(item GeneratorItem)

func (*Agent) CloseExcel

func (a *Agent) CloseExcel()

func (*Agent) GeneratorParse

func (a *Agent) GeneratorParse() ([]GeneratorItem, error)

func (*Agent) GetTemplate

func (a *Agent) GetTemplate(templateIdentifier string) (*Template, error)

func (*Agent) OpenExcel

func (a *Agent) OpenExcel(filePath string) error

func (*Agent) ProcessExcelFile

func (a *Agent) ProcessExcelFile(outputFile string) error

func (*Agent) SetTemplate

func (a *Agent) SetTemplate(template Template)

func (*Agent) SheetConfigParse

func (a *Agent) SheetConfigParse() (map[string]Sheet, error)

func (*Agent) TemplateParse

func (a *Agent) TemplateParse() (map[string]Template, error)

type Config

type Config struct {
	File            string
	ConfigSheet     string
	TemplateSheet   string
	GeneratorsSheet string
}

type GeneratorItem

type GeneratorItem struct {
	Template    string
	OutputSheet string
	Variables   map[string]string
}

type Sheet

type Sheet struct {
	Name     string
	WriteRow int
}

type Template

type Template struct {
	Identifier string
	Content    [][]string
}

Jump to

Keyboard shortcuts

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