Documentation ¶
Index ¶
- Constants
- Variables
- func AppendColumnTest(name, goType, dbType string, justPut bool)
- func BuildStorage(project *m.Project)
- func InitializeColumnTests()
- func PopulateConfig(projectFile *m.ProjectFile)
- func StartTemplating(project *m.Project)
- func TranslateType(columnName, columnType, dbType string, length int, valid bool) string
- func UpdateModFiles(projectName string)
Constants ¶
View Source
const ( GET_DELETE_INT = `if %s.%s < 1 { return ae.MissingParamError("%s") }` GET_DELETE_STRING = `if %s.%s == "" { return ae.MissingParamError("%s") }` POST_STRING = `if %s.%s == "" { return ae.MissingParamError("%s") }` POST_NULL = `if !%s.%s.Valid { return ae.MissingParamError("%s") }` POST_NULL_LEN = `if %s.%s.Valid && len(%s.%s.ValueOrZero()) > %d { return ae.StringLengthError("%s", %d) }` POST_STRING_LEN = `if len(%s.%s) > %d { return ae.StringLengthError("%s", %d) }` // Abbr, columnCamel, ColumnCamel, Abbr, ColumnCamel, ColumnCamel POST_JSON_NULL = `` /* 142-byte string literal not displayed */ PATCH_STRING_ASSIGN = `// %s if %sIn.%s != "" { %s.%s = %sIn.%s }` PATCH_DEFAULT_ASSIGN = `// %s if %sIn.%s.Valid {%s existingValues["%s"] = %s.%s%s %s.%s = %sIn.%s }` PATCH_JSON_NULL_ASSIGN = `` /* 169-byte string literal not displayed */ PATCH_TIME_NULL_ASSIGN = `// %s if %sIn.%s.Valid { existingValues["%s"] = %s.%s.Time.Format(time.RFC3339) %s.%s = %sIn.%s }` PATCH_VARCHAR_LEN = ` if %sIn.%s.Valid && len(%sIn.%s.ValueOrZero()) > %d { return ae.StringLengthError("%s", %d) }` )
View Source
const ( COLUMN_W_GORM = "\t\t%s\t%s\t`db:\"%s\" json:\"%s\" gorm:\"column:%s\"`" COLUMN_WO_GORM = "\t\t%s\t%s\t`db:\"%s\" json:\"%s\"`" )
Variables ¶
View Source
var ( PostTests map[string]m.ColumnTest PutTests map[string]m.ColumnTest )
const down at the bottom
Functions ¶
func AppendColumnTest ¶
func BuildStorage ¶
func InitializeColumnTests ¶
func InitializeColumnTests()
func PopulateConfig ¶
func PopulateConfig(projectFile *m.ProjectFile)
func StartTemplating ¶
func TranslateType ¶
func UpdateModFiles ¶
func UpdateModFiles(projectName string)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.