Documentation ¶
Index ¶
- func BigQ(s string) string
- func Generate(ctx context.Context, settings Settings, parser Parser) <-chan error
- func GeneratePackageMembers(settings Settings, info TableInfo, dbToPath DBToPathType) (string, error)
- func GenerateSchema(schema string) (string, error)
- func GenerateTable(settings Settings, info TableInfo, dbToPath DBToPathType) (string, error)
- func LittleQ(s string) string
- func Render(jenFile *File) (string, error)
- func ToExported(s string) string
- func ToNonExported(s string) string
- func ToPackageName(s string) string
- func ToTableStruct(tableName string) string
- type Column
- type DBToPathType
- type ForeignKey
- type Parser
- type Settings
- type TableInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GeneratePackageMembers ¶
func GeneratePackageMembers(settings Settings, info TableInfo, dbToPath DBToPathType) (string, error)
func GenerateSchema ¶
func GenerateTable ¶
func GenerateTable(settings Settings, info TableInfo, dbToPath DBToPathType) (string, error)
func ToExported ¶
func ToNonExported ¶
func ToPackageName ¶
func ToTableStruct ¶
Types ¶
type DBToPathType ¶
DBToPathType is a map of database data/column type names to an array of [import package path, path type]
type ForeignKey ¶
type ForeignKey interface {
Name() string
}
type Parser ¶
type Parser interface { Tables(ctx context.Context, schema string) (<-chan string, <-chan error) Columns(ctx context.Context, schema, table string) (<-chan Column, <-chan error) ForeignKeys(ctx context.Context, schema, table string) (<-chan ForeignKey, <-chan error) DBTypesToPaths() map[string][2]string }
Click to show internal directories.
Click to hide internal directories.