generators

package
v4.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const ModuleImport = "@modules:import"
View Source
const ModuleRegister = "@modules:register"

Variables

This section is empty.

Functions

This section is empty.

Types

type Dic

type Dic struct {
}

func (*Dic) Generate

func (g *Dic) Generate(template *Template, modulePath string, packagePath string, templatePath string)

type Factory

type Factory struct {
	ApiVersion string
	Driver     string
	Pluralizer *pluralize.Client
	Template   *Template
	Generators []Generator
}

func (*Factory) Generate

func (f *Factory) Generate(module ModuleTemplate)

type FieldTemplate

type FieldTemplate struct {
	Name           string
	NameUnderScore string
	ProtobufType   string
	GolangType     string
	Index          int
	IsRequired     bool
}

type Generator

type Generator interface {
	Generate(template *Template, modulePath string, packagePath string, templatePath string)
}

type Model

type Model struct {
}

func (*Model) Generate

func (g *Model) Generate(template *Template, modulePath string, packagePath string, templatePath string)

type Module

type Module struct {
	Config []string `yaml:"modules"`
}

func (*Module) Generate

func (g *Module) Generate(template *Template, modulePath string, packagePath string, templatePath string)

type ModuleJson

type ModuleJson struct {
	Name string `json:"name"`
	Url  string `json:"url"`
}

type ModuleTemplate

type ModuleTemplate struct {
	Name   string
	Fields []*FieldTemplate
}

type Proto

type Proto struct {
}

func (*Proto) Generate

func (g *Proto) Generate(template *Template, modulePath string, packagePath string, templatePath string)

type Provider

type Provider struct {
}

func (*Provider) Generate

func (p *Provider) Generate(template *Template, modulePath string, packagePath string, templatePath string)

type Server

type Server struct {
}

func (*Server) Generate

func (g *Server) Generate(template *Template, modulePath string, packagePath string, templatePath string)

type Swagger

type Swagger struct {
}

func (*Swagger) Generate

func (g *Swagger) Generate(template *Template, modulePath string, packagePath string, templatePath string)

type Template

type Template struct {
	ApiVersion            string
	PackageName           string
	Module                string
	ModuleLowercase       string
	ModulePlural          string
	ModulePluralLowercase string
	Columns               []*FieldTemplate
}

Jump to

Keyboard shortcuts

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