field

package
v0.10.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Transforms = map[string]*Transform{}

Transforms opend transform

Functions

func IsNotFound

func IsNotFound(err error) bool

IsNotFound check if the given error is not found

func LoadAndExport

func LoadAndExport(cfg config.Config) error

LoadAndExport load table

Types

type CloudProps

type CloudProps map[string]component.CloudPropsDSL

CloudProps the cloud props

type ColumnDSL

type ColumnDSL struct {
	ID   string                   `json:"id,omitempty"`
	Data *component.CloudPropsDSL `json:"$data,omitempty"`
	Key  string                   `json:"key,omitempty"`
	Bind string                   `json:"bind,omitempty"`
	Link string                   `json:"link,omitempty"`
	View *component.DSL           `json:"view,omitempty"`
	Edit *component.DSL           `json:"edit,omitempty"`
}

ColumnDSL the field column dsl

func (*ColumnDSL) Clone

func (column *ColumnDSL) Clone() *ColumnDSL

Clone column

func (ColumnDSL) EditBind

func (column ColumnDSL) EditBind() string

EditBind get the bind field name of edit

func (ColumnDSL) Hash added in v0.10.3

func (column ColumnDSL) Hash() (string, error)

Hash hash value

func (ColumnDSL) Map

func (column ColumnDSL) Map() map[string]interface{}

Map cast to map[string]inteface{}

func (ColumnDSL) Replace

func (column ColumnDSL) Replace(data map[string]interface{}) (*ColumnDSL, error)

Replace replace with data

func (*ColumnDSL) UnmarshalJSON added in v0.10.3

func (column *ColumnDSL) UnmarshalJSON(data []byte) error

UnmarshalJSON for json UnmarshalJSON

func (ColumnDSL) ViewBind

func (column ColumnDSL) ViewBind() string

ViewBind get the bind field name of view

type Columns

type Columns map[string]ColumnDSL

Columns the columns DSL

func (Columns) CPropsMerge

func (columns Columns) CPropsMerge(cloudProps map[string]component.CloudPropsDSL, getXpath func(name string, kind string, column ColumnDSL) (xpath string)) error

CPropsMerge merge the Columns cloud props

type Compute

type Compute string

Compute the compute filed

type ComputeFields

type ComputeFields map[string]string

ComputeFields the Compute filelds

type FilterDSL

type FilterDSL struct {
	ID   string         `json:"id,omitempty"`
	Key  string         `json:"key,omitempty"`
	Bind string         `json:"bind,omitempty"`
	Edit *component.DSL `json:"edit,omitempty"`
}

FilterDSL the field filter dsl

func (*FilterDSL) Clone

func (filter *FilterDSL) Clone() *FilterDSL

Clone column

func (FilterDSL) FilterBind

func (filter FilterDSL) FilterBind() string

FilterBind get the bind field name of filter

func (FilterDSL) Hash added in v0.10.3

func (filter FilterDSL) Hash() (string, error)

Hash hash value

func (FilterDSL) Map

func (filter FilterDSL) Map() map[string]interface{}

Map cast to map[string]inteface{}

func (FilterDSL) Replace

func (filter FilterDSL) Replace(data map[string]interface{}) (*FilterDSL, error)

Replace replace with data

func (*FilterDSL) UnmarshalJSON added in v0.10.3

func (filter *FilterDSL) UnmarshalJSON(data []byte) error

UnmarshalJSON for json UnmarshalJSON

type Filters

type Filters map[string]FilterDSL

Filters the filters DSL

func (Filters) CPropsMerge

func (filters Filters) CPropsMerge(cloudProps map[string]component.CloudPropsDSL, getXpath func(name string, filter FilterDSL) (xpath string)) error

CPropsMerge merge the Filters cloud props

type Transform

type Transform struct {
	Variables map[string]interface{}    `json:"variables,omitempty"`
	Aliases   map[string]string         `json:"aliases,omitempty"`
	Fields    map[string]TransformField `json:"fields,omitempty"`
}

Transform the field transform

func ModelTransform

func ModelTransform() (*Transform, error)

ModelTransform select model transform via name

func OpenTransform

func OpenTransform(data []byte, name string) (*Transform, error)

OpenTransform open the transform from source

func SelectTransform

func SelectTransform(name string) (*Transform, error)

SelectTransform select a transform via name

func (*Transform) Filter

func (t *Transform) Filter(typeName string, data map[string]interface{}) (*FilterDSL, error)

Filter transform to filter

func (*Transform) Form

func (t *Transform) Form(typeName string, data map[string]interface{}) (*ColumnDSL, error)

Form transform to form

func (*Transform) Table

func (t *Transform) Table(typeName string, data map[string]interface{}) (*ColumnDSL, error)

Table transform to table

type TransformField

type TransformField struct {
	Filter *FilterDSL `json:"filter,omitempty"`
	Form   *ColumnDSL `json:"form,omitempty"`
	Table  *ColumnDSL `json:"table,omitempty"`
}

TransformField the transform.types[*]

Jump to

Keyboard shortcuts

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