Documentation ¶
Index ¶
- func BuildRootAppPath(appRepository string) (string, error)
- func CreatePathAndFileFromTemplateString(path []string, content string, templateVar TemplateVar) error
- func CreateRootAppPath(rootAppPath string) error
- func FmtNewContent(content string) (string, error)
- func GenerateAuthorizeNewCode(content string, templateVar TemplateVar) (string, error)
- func GenerateCertificates(rootAppPath string) error
- func GenerateFromTemplateFile(templatePath string, templateVar TemplateVar) (string, error)
- func GenerateFromTemplateString(content string, templateVar TemplateVar) (string, error)
- func GenerateMigrateNewCode(content string, templateVar TemplateVar) (string, error)
- func GeneratePathAndFileFromTemplateString(path []string, content string, templateVar TemplateVar) error
- func GenerateRoutesNewCode(content string, templateVar TemplateVar) (string, error)
- func HandlePathInfo(path []string) (string, string)
- func NotifyNewApp(rootAppPath string)
- func SecureRandom(size int) string
- func UpdateMigrate(basePath string, templateVar TemplateVar)
- type AppConfig
- type EntityColumn
- type EntityName
- type MigrationMetadata
- type Pagination
- type TemplateVar
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildRootAppPath ¶
func CreatePathAndFileFromTemplateString ¶
func CreatePathAndFileFromTemplateString(path []string, content string, templateVar TemplateVar) error
func CreateRootAppPath ¶
func FmtNewContent ¶
func GenerateAuthorizeNewCode ¶
func GenerateAuthorizeNewCode(content string, templateVar TemplateVar) (string, error)
func GenerateCertificates ¶
func GenerateFromTemplateFile ¶
func GenerateFromTemplateFile(templatePath string, templateVar TemplateVar) (string, error)
func GenerateFromTemplateString ¶
func GenerateFromTemplateString(content string, templateVar TemplateVar) (string, error)
func GenerateMigrateNewCode ¶
func GenerateMigrateNewCode(content string, templateVar TemplateVar) (string, error)
func GeneratePathAndFileFromTemplateString ¶
func GeneratePathAndFileFromTemplateString(path []string, content string, templateVar TemplateVar) error
func GenerateRoutesNewCode ¶
func GenerateRoutesNewCode(content string, templateVar TemplateVar) (string, error)
func HandlePathInfo ¶
func NotifyNewApp ¶
func NotifyNewApp(rootAppPath string)
func SecureRandom ¶
func UpdateMigrate ¶
func UpdateMigrate(basePath string, templateVar TemplateVar)
Types ¶
type AppConfig ¶
type AppConfig struct { AppName string `yaml:"app_name"` AppRepository string `yaml:"app_repository"` SecretKey string `yaml:"secret_key"` ResetPasswordExpirationSeconds int `yaml:"reset_password_expiration_seconds"` ResetPasswordUrl string `yaml:"reset_password_url"` TokenExpirationSeconds int `yaml:"token_expiration_seconds"` Pagination Pagination `yaml:"pagination"` Locales []string `yaml:"locales"` }
func GetAppConfig ¶
type EntityColumn ¶
type EntityColumn struct { Name string NameSnakeCase string NameSnakeCasePlural string Type string Extras string IsRelation bool IsForeignKey bool MigrateType string MigrateExtra string }
func GetColumnInfo ¶
func GetColumnInfo(columnName string, columnType string, extra string) EntityColumn
type EntityName ¶
type EntityName struct { CamelCase string CamelCasePlural string LowerCamelCase string LowerCamelCasePlural string SnakeCase string SnakeCasePlural string LowerCase string }
func SetEntityName ¶
func SetEntityName(name string) EntityName
type MigrationMetadata ¶
type MigrationMetadata struct { Type string Name string Version string FileNameSufix string Entity string }
func SetMigrationMetadata ¶
func SetMigrationMetadata(name string) MigrationMetadata
type Pagination ¶
type TemplateVar ¶
type TemplateVar struct { AppRepository string AppName string SecretKey string Database string EntityName EntityName EntityColumns []EntityColumn MigrationMetadata MigrationMetadata }
Click to show internal directories.
Click to hide internal directories.