tools

package
Version: v1.2.12 Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(param Param) error

func GenerateTables

func GenerateTables(outputPath string, tables []string, packageName string) 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"`
	HideNewButton    bool          `json:"hide_new_button"`
	HideExportButton bool          `json:"hide_export_button"`
	HideEditButton   bool          `json:"hide_edit_button"`
	HideDeleteButton bool          `json:"hide_delete_button"`
	HideDetailButton bool          `json:"hide_detail_button"`
	HideFilterButton bool          `json:"hide_filter_button"`
	HideRowSelector  bool          `json:"hide_row_selector"`
	HidePagination   bool          `json:"hide_pagination"`
	HideQueryInfo    bool          `json:"hide_query_info"`
	FilterFormLayout form.Layout   `json:"filter_form_layout"`

	HideContinueEditCheckBox bool `json:"hide_continue_edit_check_box"`
	HideContinueNewCheckBox  bool `json:"hide_continue_new_check_box"`
	HideResetButton          bool `json:"hide_reset_button"`
	HideBackButton           bool `json:"hide_back_button"`
}

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"`
	Editable    bool   `json:"editable"`
	CanAdd      bool   `json:"can_add"`
}

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"`
	HideNewButton    bool        `json:"hide_new_button"`
	HideExportButton bool        `json:"hide_export_button"`
	HideEditButton   bool        `json:"hide_edit_button"`
	HideDeleteButton bool        `json:"hide_delete_button"`
	HideDetailButton bool        `json:"hide_detail_button"`
	HideFilterButton bool        `json:"hide_filter_button"`
	HideRowSelector  bool        `json:"hide_row_selector"`
	HidePagination   bool        `json:"hide_pagination"`
	HideQueryInfo    bool        `json:"hide_query_info"`
	FilterFormLayout form.Layout `json:"filter_form_layout"`

	HideContinueEditCheckBox bool `json:"hide_continue_edit_check_box"`
	HideContinueNewCheckBox  bool `json:"hide_continue_new_check_box"`
	HideResetButton          bool `json:"hide_reset_button"`
	HideBackButton           bool `json:"hide_back_button"`

	Fields Fields

	FormFields 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