sheet

package
v0.0.0-...-5302b4d Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2021 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SkipPrefix    = "__"
	ListSeparator = ","

	ProtoFileName = "conf.proto"

	GenDataFileName = "gendata"
)
View Source
const (
	KRowStart = 1
	KColStart = 1

	KDataRowStart = 3
)
View Source
const ShellToUse = "bash"

Variables

This section is empty.

Functions

func CellName

func CellName(row, col int32) string

func GenCode

func GenCode()

Types

type Col

type Col struct {
	Name      string
	CamelName string

	ProtoType string

	PureName      string
	CamelPureName string

	Decorate string
}

type Sheet

type Sheet struct {
	Id      string
	CamelId string

	ColAry []*Col
	ColMap map[int]*Col

	// default, (go and so on...)
	DefaultIdColType string
	CSharpIdColType  string
	IdColIndex       int

	CamelName string
	Name      string
	Xs        *xlsx.Sheet
}

func CreateSheets

func CreateSheets(inputPath string) []*Sheet

func NewSheet

func NewSheet(xs *xlsx.Sheet) (s *Sheet)

func (*Sheet) GenerateCSharpCode

func (s *Sheet) GenerateCSharpCode() string

func (*Sheet) GenerateGoCode

func (s *Sheet) GenerateGoCode() string

func (*Sheet) ParseRecordData

func (s *Sheet) ParseRecordData(rowIndex int, rowData *xlsx.Row, record interface{})

unmarshal row data to record

type TempData

type TempData struct {
	Sheets []*Sheet
}

Jump to

Keyboard shortcuts

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