tools

package
v1.2.11 Latest Latest
Warning

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

Go to latest
Published: May 17, 2020 License: Apache-2.0 Imports: 8 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(param Param) error

Types

type Config

type Config struct {
	Connection     string        `json:"connection"`
	Driver         string        `json:"driver"`
	Package        string        `json:"package"`
	Table          string        `json:"table"`
	Schema         string        `json:"schema"`
	Output         string        `json:"output"`
	Conn           db.Connection `json:"conn"`
	HideFilterArea bool          `json:"hide_filter_area"`
}

type Field

type Field struct {
	Head        string `json:"head"`
	Name        string `json:"name"`
	DBType      string `json:"db_type"`
	FormType    string `json:"form_type"`
	NotAllowAdd bool   `json:"not_allow_add"`
	Filterable  bool   `json:"filterable"`
	Sortable    bool   `json:"sortable"`
}

type Fields

type Fields []Field

type Param

type Param struct {
	Connection string `json:"connection"`
	Driver     string `json:"driver"`
	Package    string `json:"package"`

	Table      string `json:"table"`
	RowTable   string `json:"row_table"`
	TableTitle string `json:"table_title"`
	TableName  string `json:"table_name"`

	HideFilterArea bool `json:"hide_filter_area"`

	Fields Fields

	Output string `json:"output"`
}

func NewParam

func NewParam(cfg Config) Param

func NewParamWithFields

func NewParamWithFields(cfg Config, fields Fields) Param

Jump to

Keyboard shortcuts

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