Documentation ¶
Index ¶
- Variables
- func Generate(rootPath string, s *schema.Schema) error
- func GenerateFunctions(s *schema.Schema) ([]byte, error)
- func GenerateModel(s *schema.Schema) ([]byte, error)
- func GeneratePackage(s *schema.Schema) ([]byte, error)
- func GenerateSchema(s *schema.Schema) ([]byte, error)
- func GenerateValidators(s *schema.Schema) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var FunctionsTemplate = `{{$Name := .Name}}
{{range .Funcs}}
func ({{Pointerize $Name}} *{{$Name}}){{.}}() {
}
{{end}}
`
View Source
var PackageTemplate = `// Generated struct for {{.}}.
package {{.}}
`
View Source
var StructTemplate = `
{{AsComment .Definition.Description}}
type {{ToUpperFirst .Name}} {{goType .Definition}}
`
View Source
var ValidatorsTemplate = `` /* 128-byte string literal not displayed */
Functions ¶
func GenerateFunctions ¶
Generate functions according to the schema.
func GeneratePackage ¶
Generate imports according to the schema.
func GenerateSchema ¶
Generate schema according to the schema.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.