internal

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(m *StructMapping, goPackage string, goFile string, w io.Writer) (outputFilename string, err error)

Types

type FieldMapping

type FieldMapping struct {
	Name        string
	ReadColDef  *ReadColDef
	WriteColDef *WriteColDef
	FieldType   types.Type
}

type ReadColDef

type ReadColDef struct {
	Col      string
	Sortable bool
}

type StructMapping

type StructMapping struct {
	// TargetName is the exported record name (e.g. "MyRecord")
	TargetName         string
	MappingTypePackage string
	MappingTypeName    string
	FieldMappings      []FieldMapping
}

func BuildStructMapping

func BuildStructMapping(mappingTypePackage string, mappingTypeName string, targetTypeName string) (*StructMapping, error)

type WriteColDef

type WriteColDef struct {
	Col string
}

Directories

Path Synopsis
repository
Code generated by construct, DO NOT EDIT.
Code generated by construct, DO NOT EDIT.

Jump to

Keyboard shortcuts

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