generator

package
v0.0.0-...-262cbe7 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	Name    string
	Fields  map[string]string
	Project *prj.Project
}

Model holds the model information

func NewModel

func NewModel(name string, fields map[string]string) (*Model, error)

NewModel creates a new model struct

func (*Model) Create

func (m *Model) Create() error

Create generates the model files

type Route

type Route struct {
	Router     string
	Controller string
	URL        string
	Method     string
	Project    *prj.Project
}

Route holds the route information

func NewRoute

func NewRoute(router string, method string, url string, controller string) (*Route, error)

NewRoute creates a new route struct

func (*Route) Create

func (r *Route) Create() error

Create generates the route files

type Router

type Router struct {
	Name    string
	Project *prj.Project
}

Router holds the router information

func NewRouter

func NewRouter(name string) (*Router, error)

NewRouter creates a new router struct

func (*Router) Create

func (r *Router) Create() error

Create generates the router files

Jump to

Keyboard shortcuts

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