models

package
v0.0.0-...-50a6135 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 2, 2015 License: MIT Imports: 7 Imported by: 0

Documentation

Index

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 Generate

func Generate(rootPath string, s *schema.Schema) error

func GenerateFunctions

func GenerateFunctions(s *schema.Schema) ([]byte, error)

Generate functions according to the schema.

func GenerateModel

func GenerateModel(s *schema.Schema) ([]byte, error)

func GeneratePackage

func GeneratePackage(s *schema.Schema) ([]byte, error)

Generate imports according to the schema.

func GenerateSchema

func GenerateSchema(s *schema.Schema) ([]byte, error)

Generate schema according to the schema.

func GenerateValidators

func GenerateValidators(s *schema.Schema) ([]byte, error)

Generate functions according to the schema.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL