Documentation
¶
Index ¶
- type Gen
- func (g *Gen) CleanGoDALs(dir string, database *lib.Database) (e error)
- func (g *Gen) CleanGoModels(dir string, database *lib.Database) (e error)
- func (g *Gen) CleanGoRepos(dir string, database *lib.Database) (e error)
- func (g *Gen) EnsureDir(dir string) (e error)
- func (g *Gen) FmtGoCode(filePath string)
- func (g *Gen) GenerateAPIRoutes(apiDir string)
- func (g *Gen) GenerateCacheBootstrapFile(dir string, database *lib.Database) (e error)
- func (g *Gen) GenerateCacheBootstrapGoCodeFromDatabase(database *lib.Database) (goCode string, e error)
- func (g *Gen) GenerateDALInterfaces(database *lib.Database, dir string) (e error)
- func (g *Gen) GenerateDALsBootstrapFile(dir string, database *lib.Database) (e error)
- func (g *Gen) GenerateDefaultConfigJsonFile(dir string)
- func (g *Gen) GenerateDefaultConfigModelFile(dir string)
- func (g *Gen) GenerateGoAPI(dir string)
- func (g *Gen) GenerateGoApp(dir string) (e error)
- func (g *Gen) GenerateGoCLI(dir string) (e error)
- func (g *Gen) GenerateGoCache(table *lib.Table, fileFoot string, imports []string) (goCode string, e error)
- func (g *Gen) GenerateGoCacheFile(dir string, table *lib.Table) (e error)
- func (g *Gen) GenerateGoCacheFiles(reposDir string, database *lib.Database) (e error)
- func (g *Gen) GenerateGoDAL(table *lib.Table, dir string) (e error)
- func (g *Gen) GenerateGoModel(dir string, table *lib.Table) (e error)
- func (g *Gen) GenerateGoRepo(table *lib.Table, fileHead string, fileFoot string, imports []string, ...) (e error)
- func (g *Gen) GenerateGoRepoFile(dir string, table *lib.Table) (e error)
- func (g *Gen) GenerateGoRepoFiles(dir string, database *lib.Database) (e error)
- func (g *Gen) GenerateGoSchema(database *lib.Database) (goCode string, e error)
- func (g *Gen) GenerateGoSchemaFile(dir string, database *lib.Database) (e error)
- func (g *Gen) GenerateRepoInterfaces(database *lib.Database, dir string) (e error)
- func (g *Gen) GenerateReposBootstrapFile(dir string, database *lib.Database) (e error)
- func (g *Gen) GenerateReposBootstrapGoCodeFromDatabase(database *lib.Database, dir string) (e error)
- func (g *Gen) GenerateServiceBootstrapFile(servicesDir string) (e error)
- func (g *Gen) GenerateServiceInterfaces(definitionsDir string, servicesDir string) (e error)
- func (g *Gen) GenerateTypescriptType(table *lib.Table) (goCode string, e error)
- func (g *Gen) GenerateTypescriptTypes(database *lib.Database) (goCode string, e error)
- func (g *Gen) GenerateTypescriptTypesFile(dir string, database *lib.Database) (e error)
- func (g *Gen) GetOrphanedDals(dir string, database *lib.Database) []string
- func (g *Gen) GetOrphanedRepos(dir string, database *lib.Database) []string
- func (g *Gen) WriteGoCodeToFile(goCode string, filePath string) (e error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Gen ¶
Gen conntains all of the generator functionality
func (*Gen) CleanGoDALs ¶ added in v1.4.0
CleanGoDALs removes any repo files that aren't in the database.Tables map
func (*Gen) CleanGoModels ¶ added in v1.4.0
CleanGoModels removes model files that are not found in the database.Tables map
func (*Gen) CleanGoRepos ¶ added in v1.4.0
CleanGoServices removes service files not found in the database.Tables map
func (*Gen) GenerateAPIRoutes ¶ added in v1.4.0
func (*Gen) GenerateCacheBootstrapFile ¶
GenerateCacheBootstrapFile generates a repos bootstrap file in golang
func (*Gen) GenerateCacheBootstrapGoCodeFromDatabase ¶
func (g *Gen) GenerateCacheBootstrapGoCodeFromDatabase(database *lib.Database) (goCode string, e error)
GenerateCacheBootstrapGoCodeFromDatabase generates golang code for a Repo Bootstrap file from a database object
func (*Gen) GenerateDALInterfaces ¶ added in v1.4.0
func (*Gen) GenerateDALsBootstrapFile ¶ added in v1.4.0
GenerateDALsBootstrapFile generates a dal bootstrap file in golang
func (*Gen) GenerateDefaultConfigJsonFile ¶ added in v1.4.0
GenerateDefaultConfigJsonFile generates a default json configuration file in the root of the project directory
func (*Gen) GenerateDefaultConfigModelFile ¶ added in v1.4.0
GenerateDefaultConfigModelFile generates a default config model file
func (*Gen) GenerateGoAPI ¶ added in v1.4.0
func (*Gen) GenerateGoApp ¶ added in v1.4.0
GenerateGoApp generates the base app code
func (*Gen) GenerateGoCLI ¶ added in v1.4.0
GenerateGoCLI generates a boilerplate cli app
func (*Gen) GenerateGoCache ¶
func (g *Gen) GenerateGoCache(table *lib.Table, fileFoot string, imports []string) (goCode string, e error)
GenerateGoCache returns a string for a repo in golang
func (*Gen) GenerateGoCacheFile ¶
GenerateGoCacheFile generates a repo file in golang
func (*Gen) GenerateGoCacheFiles ¶
GenerateGoCacheFiles generates go repository files based on the database schema
func (*Gen) GenerateGoDAL ¶ added in v1.4.0
GenerateGoDAL returns a string for a repo in golang
func (*Gen) GenerateGoModel ¶
GenerateGoModel returns a string for a model in golang
func (*Gen) GenerateGoRepo ¶
func (g *Gen) GenerateGoRepo(table *lib.Table, fileHead string, fileFoot string, imports []string, dir string) (e error)
GenerateGoRepo returns a string for a repo in golang
func (*Gen) GenerateGoRepoFile ¶
GenerateGoRepoFile generates a repo file in golang
func (*Gen) GenerateGoRepoFiles ¶
GenerateGoRepoFiles generates go repository files based on the database schema
func (*Gen) GenerateGoSchema ¶
GenerateGoSchema generates golang code for a schema file
func (*Gen) GenerateGoSchemaFile ¶
GenerateGoSchemaFile generates a schema file in golang
func (*Gen) GenerateRepoInterfaces ¶ added in v1.4.0
GenerateRepoInterfaces generates a go interfaces file for use by the services directory
func (*Gen) GenerateReposBootstrapFile ¶
GenerateReposBootstrapFile generates a repos bootstrap file in golang
func (*Gen) GenerateReposBootstrapGoCodeFromDatabase ¶
func (g *Gen) GenerateReposBootstrapGoCodeFromDatabase(database *lib.Database, dir string) (e error)
GenerateReposBootstrapGoCodeFromDatabase generates golang code for a Repo Bootstrap file from a database object
func (*Gen) GenerateServiceBootstrapFile ¶ added in v1.4.0
func (*Gen) GenerateServiceInterfaces ¶ added in v1.4.0
GenerateServiceInterfaces scans the services directory and outputs 2 files
- A services bootstrap file in the services directory
- A services definition file in the definitions directory
func (*Gen) GenerateTypescriptType ¶
GenerateTypescriptType returns a string for a type in typescript
func (*Gen) GenerateTypescriptTypes ¶
GenerateTypescriptTypes returns a string for a typscript types file
func (*Gen) GenerateTypescriptTypesFile ¶
GenerateTypescriptTypesFile generates a typescript type file
func (*Gen) GetOrphanedDals ¶ added in v1.4.0
GetOrphanedDals gets repo files that aren't in the database.Tables map
func (*Gen) GetOrphanedRepos ¶ added in v1.4.0
GetOrphanedRepos returns a slice of service files that are not in the database.Tables map