Documentation ¶
Index ¶
- Constants
- func BuildPermissionsGoFile(permissionMap map[string]string)
- func BuildTypescriptPermissions(permissionMap map[string]string) string
- func CleanGoDALs(dir string, database *schema.Schema) (e error)
- func CleanGoModels(dir string, database *schema.Schema) (e error)
- func GenDALs(dalsDir string, config *lib.Config, force, clean bool) error
- func GenGoPerms(config *lib.Config) (e error)
- func GenInterface(comment, pkgName, ifaceName, ifaceComment string, methods []string, ...) ([]byte, error)
- func GenInterfaces(srcDir, destDir string) error
- func GenModels(config *lib.Config, force bool, clean bool) error
- func GenServicesBootstrap(config *lib.Config) error
- func GenTSPerms(config *lib.Config) (e error)
- func GenerateDALsBootstrapFile(config *lib.Config, dir string, schemaList *schema.SchemaList) (e error)
- func GenerateGoDAL(config *lib.Config, table *schema.Table, dir string) (e error)
- func GenerateGoModel(packageName, dir string, schemaName string, table *schema.Table) (e error)
- func GenerateTypescriptType(table *schema.Table) (string, error)
- func GenerateTypescriptTypes(database *schema.Schema) (string, error)
- func InspectFile(filePath string) (s *lib.GoStruct, e error)
- func LoadPermissionsFromJSON() map[string]string
- type Gen
- func (g *Gen) GenAPITests() (e error)
- func (g *Gen) GenMeta(dir string, database *schema.Schema) (e error)
- func (g *Gen) GenerateAPIRoutes(apiDir string) error
- func (g *Gen) GenerateDALSQL(dir string, database *schema.Schema) (e error)
- func (g *Gen) GenerateGoAPI(dir string) error
- func (g *Gen) GenerateGoApp(dir string) error
- func (g *Gen) GenerateServiceBootstrapFile(servicesDir string) (e error)
- func (g *Gen) GenerateServiceInterfaces(definitionsDir string, servicesDir string) error
- func (g *Gen) GetOrphanedDals(dir string, database *schema.Schema) []string
Constants ¶
const NullPackage = "\"gopkg.in/guregu/null.v3\""
NullPackage is the package name used for handling nulls
Variables ¶
This section is empty.
Functions ¶
func BuildPermissionsGoFile ¶ added in v1.8.20
func BuildTypescriptPermissions ¶ added in v1.8.11
BuildTypescriptPermissions returns a formatted typescript file of permission constants
func CleanGoDALs ¶
CleanGoDALs removes any repo files that aren't in the database.Tables map
func CleanGoModels ¶
CleanGoModels removes model files that are not found in the database.Tables map
func GenGoPerms ¶ added in v1.8.20
func GenInterface ¶
func GenInterface(comment, pkgName, ifaceName, ifaceComment string, methods []string, imports []string) ([]byte, error)
GenInterface takes makes the interface into a byte array
func GenInterfaces ¶
func GenServicesBootstrap ¶ added in v1.8.34
services/services.go
func GenTSPerms ¶ added in v1.8.20
func GenerateDALsBootstrapFile ¶
func GenerateDALsBootstrapFile(config *lib.Config, dir string, schemaList *schema.SchemaList) (e error)
GenerateDALsBootstrapFile generates a dal bootstrap file in golang
func GenerateGoDAL ¶
GenerateGoDAL returns a string for a repo in golang
func GenerateGoModel ¶
GenerateGoModel returns a string for a model in golang
func GenerateTypescriptType ¶ added in v1.8.23
GenerateTypescriptType returns a string for a type in typescript
func GenerateTypescriptTypes ¶ added in v1.8.23
GenerateTypescriptTypes returns a string for a typscript types file
func InspectFile ¶
InspectFile inspects a file
func LoadPermissionsFromJSON ¶ added in v1.8.34
LoadPermissionsFromJSON loads a set of permissions from a JSON file
Types ¶
type Gen ¶
Gen conntains all of the generator functionality
func (*Gen) GenerateAPIRoutes ¶
func (*Gen) GenerateDALSQL ¶
GenerateDALSQL generates a constants file filled with sql statements
func (*Gen) GenerateGoAPI ¶
func (*Gen) GenerateGoApp ¶
GenerateGoApp generates the base app code
func (*Gen) GenerateServiceBootstrapFile ¶
@deprecated
func (*Gen) GenerateServiceInterfaces ¶
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