api

package
v0.0.0-...-13800ec Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CmdAPIApp = &commands.Command{

	UsageLine: "api [appname]",
	Short:     "Create a gql Api application",
	Long: `
	The command 'api' creates a gql API application.

  {{"Example:"|bold}}
      $ gql api [appname] [-tables=""] [-driver=postgres] [-conn="root:@tcp(127.0.0.1:3306)/test"]

  If 'conn' argument is empty, the command will generate an example API application. Otherwise the command
  will connect to your database and generate models based on the existing tables.

  The command 'api' creates a folder named [appname] with the following structure:

	    ├── main.go
	    ├── {{"conf"|foldername}}
	    │     └── app.yaml
	    ├── {{"mutations"| foldername}}
	    │     └── object.go
	    │     └── user.go
	    ├── {{"routers"|foldername}}
	    │     └── router.go
	    ├── {{"queries"|foldername}}
	    │     └── queries.go
	    └── {{"types"|foldername}}
	          └── object.go
			  └── user.go
			  └── db.go
`,
	PreRun: func(cmd *commands.Command, args []string) {},
}

CmdAPIApp init Api commande

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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