cmd

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2022 License: Apache-2.0 Imports: 35 Imported by: 0

README

Command line datly executor

./datly -h
Generate rule with endpoint for a table
 ./datly  -C=dev  -N=MyViewName -T=MyTableName
Generate rule with endpoint for a table and SQL
 ./datly  -C=dev  -N=MyViewName -T=MyTableName -S=view.sql
 ./datly  -C=dev  -N=MyViewName -T=MyTableName
Generate rule with endpoint for a table and relations
 ./datly  -C=dev  -N=MyViewName -T=MyTableName  -R=MyRelName:RelTable 

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(args []string)

Types

type Connector

type Connector struct {
	DbName string `short:"C" long:"dbname" description:"db/connector name" `
	Driver string `short:"D" long:"driver" description:"driver" `
	DSN    string `short:"A" long:"dsn" description:"DSN" `
	Secret string `short:"E" long:"secret" description:"database secret" `
	Output string `short:"O" long:"output" description:"output style" choice:"c" choice:"b" `
}

func (*Connector) Init

func (c *Connector) Init()

func (*Connector) New

func (c *Connector) New() *view.Connector

func (*Connector) ResponseField

func (c *Connector) ResponseField() string

type Generate

type Generate struct {
	Name        string   `short:"N" long:"name" description:"view DbName/route URI" `
	Parameters  []string `short:"P" long:"params" description:"parameters in form name[:type:location]" `
	Table       string   `short:"T" long:"table" description:"table" `
	SQLLocation string   `short:"S" long:"sql" description:"SQL location" `
	Relations   []string `short:"R" long:"relation" description:"relation in form of viewName:tableName" `
}

func (*Generate) Namespace

func (g *Generate) Namespace() string

type Options

type Options struct {
	Port          int    `short:"p" long:"port" description:"port"  `
	RouteURL      string `short:"r" long:"mode" description:"route URL"  `
	DependencyURL string `short:"d" long:"deps" description:"dependencies URL" `
	ConfigURL     string `short:"c" long:"config" description:"configuration URL" `
	Generate
	Connector
}

func (*Options) Init

func (o *Options) Init()

func (*Options) RouterURI

func (o *Options) RouterURI() string

func (*Options) RouterURL

func (o *Options) RouterURL() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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