Documentation ¶
Index ¶
- func RegisterLanguage(l Language)
- type GoLanguage
- func (g *GoLanguage) BindTarget(target *conf.ReverseTarget)
- func (g *GoLanguage) FormatGo(src string) (string, error)
- func (g *GoLanguage) GenGoImports(tables []*schemas.Table) []string
- func (g *GoLanguage) GetExtName() string
- func (g *GoLanguage) GetFormatter() func(string) (string, error)
- func (g *GoLanguage) GetFuncs() template.FuncMap
- func (g *GoLanguage) GetImportter() func([]*schemas.Table) []string
- func (g *GoLanguage) GetName() string
- func (g *GoLanguage) GetTemplate() string
- func (g *GoLanguage) GetTypes() map[string]string
- func (g *GoLanguage) Tag(table *schemas.Table, col *schemas.Column) template.HTML
- func (g *GoLanguage) TypeString(col *schemas.Column) string
- type Language
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GoLanguage ¶
type GoLanguage struct {
// contains filtered or unexported fields
}
Golang represents a golang language
func NewGoLanguage ¶
func NewGoLanguage() *GoLanguage
func (*GoLanguage) BindTarget ¶
func (g *GoLanguage) BindTarget(target *conf.ReverseTarget)
func (*GoLanguage) GenGoImports ¶
func (g *GoLanguage) GenGoImports(tables []*schemas.Table) []string
func (*GoLanguage) GetExtName ¶
func (g *GoLanguage) GetExtName() string
func (*GoLanguage) GetFormatter ¶
func (g *GoLanguage) GetFormatter() func(string) (string, error)
func (*GoLanguage) GetFuncs ¶
func (g *GoLanguage) GetFuncs() template.FuncMap
func (*GoLanguage) GetImportter ¶
func (g *GoLanguage) GetImportter() func([]*schemas.Table) []string
func (*GoLanguage) GetName ¶
func (g *GoLanguage) GetName() string
func (*GoLanguage) GetTemplate ¶
func (g *GoLanguage) GetTemplate() string
func (*GoLanguage) GetTypes ¶
func (g *GoLanguage) GetTypes() map[string]string
func (*GoLanguage) TypeString ¶
func (g *GoLanguage) TypeString(col *schemas.Column) string
type Language ¶
type Language interface { GetName() string GetTemplate() string GetTypes() map[string]string GetFuncs() template.FuncMap GetFormatter() func(string) (string, error) GetImportter() func([]*schemas.Table) []string GetExtName() string BindTarget(*conf.ReverseTarget) }
Language represents a languages supported when reverse codes
func GetLanguage ¶
GetLanguage returns a language if exists
Click to show internal directories.
Click to hide internal directories.