Documentation ¶
Index ¶
- Constants
- func CreateCommand(logger *zap.Logger) *cobra.Command
- type Options
- type Search
- func (g *Search) AddFlags(command *cobra.Command)
- func (g *Search) Generate() error
- func (g *Search) Logger() *zap.Logger
- func (g *Search) Options() *Options
- func (g *Search) Packer() base.Packer
- func (g *Search) ReadFlags(command *cobra.Command) error
- func (g *Search) Repack(packer base.Packer) error
- func (g *Search) SetOptions(options Options)
- type TemplateColumn
- type TemplateEntity
- type TemplatePackage
Constants ¶
View Source
const Template = `` /* 1827-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct { base.Options // Package sets package name for model // Works only with SchemaPackage = false Package string // Do not replace primary key name to ID KeepPK bool // Do not generate alias tag NoAlias bool // Strict types in filters Relaxed bool }
Options for generator
type Search ¶
type Search struct {
// contains filtered or unexported fields
}
Search represents search generator
type TemplateColumn ¶
type TemplateColumn struct { model.Column Relaxed bool UseCustomRender bool CustomRender template.HTML }
TemplateColumn stores column info
func NewTemplateColumn ¶
NewTemplateColumn creates a column for template
type TemplateEntity ¶
type TemplateEntity struct { model.Entity NoAlias bool Alias string Columns []TemplateColumn Imports []string }
TemplateEntity stores struct info
func NewTemplateEntity ¶
func NewTemplateEntity(entity model.Entity, options Options) TemplateEntity
NewTemplateEntity creates an entity for template
type TemplatePackage ¶
type TemplatePackage struct { Package string HasImports bool Imports []string Entities []TemplateEntity }
TemplatePackage stores package info
func NewTemplatePackage ¶
func NewTemplatePackage(entities []model.Entity, options Options) TemplatePackage
NewTemplatePackage creates a package for template
Click to show internal directories.
Click to hide internal directories.