generator

package
v0.0.0-...-81ee819 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2018 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(input []byte, srcPath, destFilename string) ([]byte, error)

func ConvertFile

func ConvertFile(srcPath string, op Options) error

func ParseDBTag

func ParseDBTag(s string) (string, bool)

Types

type Column

type Column struct {
	Omit         bool
	GoName       string
	GoRefPkgName string
	GoRefName    string
	DBName       string
}

func ParseColumn

func ParseColumn(fset *token.FileSet, info *types.Info, field *ast.Field, scanner *types.Interface) *Column

type Comment

type Comment struct {
	Position  token.Position
	TableName string
}

type Comments

type Comments []Comment

func (Comments) Find

func (cs Comments) Find(from, to int) (Comment, bool)

type Options

type Options struct {
	Suffix string
}

type Package

type Package struct {
	Name   string
	Tables []Table
}

func ParsePackage

func ParsePackage(fset *token.FileSet, info *types.Info, file *ast.File, scanner *types.Interface) Package

type Table

type Table struct {
	GoName   string
	DBName   string
	Columns  []Column
	Reciever string
	// contains filtered or unexported fields
}

func ParseTable

func ParseTable(fset *token.FileSet, info *types.Info, typ *ast.TypeSpec, scanner *types.Interface) Table

Jump to

Keyboard shortcuts

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