lient

package
v0.0.0-...-19e0465 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FuncMap = template.FuncMap{
		"valast":    valast.String,
		"title":     title,
		"contains":  contains,
		"listfield": listfield,
		"joinx":     gstr.JoinAny,
	}
	Templates = gen.MustParse(gen.NewTemplate("lient").Funcs(FuncMap).ParseFS(templateDir, "template/*tmpl"))
)

Functions

func NewID

func NewID() int64

func NewXid

func NewXid() string

Types

type Annotation

type Annotation struct {
	ViewSchema    *ui.Schema   `json:"ViewSchema,omitempty"`
	ColumnProps   *ColumnProps `json:"ColumnProps,omitempty"`
	ValidateRule  string       `json:"ValidateRule,omitempty"`
	DisableCreate bool         `json:"DisableCreate,omitempty"`
	DisableRead   bool         `json:"DisableRead,omitempty"`
	DisableUpdate bool         `json:"DisableUpdate,omitempty"`
	Queryable     bool         `json:"Queryable,omitempty"`
	Edge          *Edge        `json:"Edge,omitempty"` // 解耦的 Edge 关联查询
}

func (Annotation) Name

func (Annotation) Name() string

type ColumnProps

type ColumnProps struct {
	Width       int    `json:"Width,omitempty"`
	Align       string `json:"Align,omitempty"`
	Ellipsis    bool   `json:"Ellipsis,omitempty"`
	Filterable  bool   `json:"Filterable,omitempty"`
	Sortable    bool   `json:"Sortable,omitempty"`
	HideInTable bool   `json:"HideInTable,omitempty"`
	Order       int    `json:"Order,omitempty"`
}

type Edge

type Edge struct {
	Type        string `json:"Type,omitempty"`
	Package     string `json:"Package,omitempty"`
	Name        string `json:"Name,omitempty"`
	StructField string `json:"StructField,omitempty"`
}

func XEdge

func XEdge(name string, t interface{}) *Edge

type Extension

type Extension struct {
	entc.DefaultExtension
}

func (Extension) Templates

func (Extension) Templates() []*gen.Template

Directories

Path Synopsis
ent

Jump to

Keyboard shortcuts

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