generator

package
v0.0.0-...-847604a Latest Latest
Warning

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

Go to latest
Published: May 8, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(filePath, targetD string) error

Types

type App

type App struct {
	Name   string  `yaml:"app_name"`
	GoPath string  `yaml:"go_path"`
	Models []Model `yaml:"models"`
}

type Field

type Field struct {
	Name string `yaml:"name"`
	Type string `yaml:"type"`
}

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

type Model

type Model struct {
	Name       string  `yaml:"name"`
	Fields     []Field `yaml:"fields"`
	GoPath     string
	Type       string   `yaml:"type"`
	References []string `yaml:"references"`

	// Generated fields
	StructName string `yaml:"-"`
	VarName    string `yaml:"-"`

	Prepare       string `yaml:"-"`
	GetHandler    string `yaml:"-"`
	PostHandler   string `yaml:"-"`
	PutHandler    string `yaml:"-"`
	DeleteHandler string `yaml:"-"`

	GetRouter    string `yaml:"-"`
	PostRouter   string `yaml:"-"`
	PutRouter    string `yaml:"-"`
	DeleteRouter string `yaml:"-"`
}

Jump to

Keyboard shortcuts

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