component

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Concat

func Concat(args ...interface{}) (interface{}, error)

Concat string

func Download

func Download(args ...interface{}) (interface{}, error)

Download return the file download path

func Export

func Export() error

Export processes

func Get

func Get(args ...interface{}) (interface{}, error)

Get value

func Hide

func Hide(args ...interface{}) (interface{}, error)

Hide value

func Trim

func Trim(args ...interface{}) (interface{}, error)

Trim string

func Upload

func Upload(args ...interface{}) (interface{}, error)

Upload return the file download path

Types

type ActionDSL

type ActionDSL struct {
	Title   string               `json:"title,omitempty"`
	Width   int                  `json:"width,omitempty"`
	Icon    string               `json:"icon,omitempty"`
	Style   string               `json:"style,omitempty"`
	Props   PropsDSL             `json:"props,omitempty"`
	Confirm *ConfirmActionDSL    `json:"confirm,omitempty"`
	Action  map[string]ParamsDSL `json:"action,omitempty"`
}

ActionDSL the component action DSL

type Actions

type Actions []ActionDSL

Actions the actions

type CArg

type CArg struct {
	IsExp bool
	// contains filtered or unexported fields
}

CArg compute interface{}

func NewExp

func NewExp(key string) CArg

NewExp create a new exp CArg

func (CArg) MarshalJSON

func (arg CArg) MarshalJSON() ([]byte, error)

MarshalJSON for JSON parse

func (*CArg) UnmarshalJSON

func (arg *CArg) UnmarshalJSON(data []byte) error

UnmarshalJSON for JSON parse

func (CArg) Value

func (arg CArg) Value(data maps.MapStr) interface{}

Value compute arg value

type CloudPropsDSL

type CloudPropsDSL struct {
	Xpath   string                 `json:"xpath,omitempty"`
	Type    string                 `json:"type,omitempty"`
	Name    string                 `json:"name,omitempty"`
	Process string                 `json:"process,omitempty"`
	Query   map[string]interface{} `json:"query,omitempty"`
}

CloudPropsDSL the cloud props

func (CloudPropsDSL) ExecQuery

func (cProp CloudPropsDSL) ExecQuery(process *gou.Process, query map[string]interface{}) (interface{}, error)

ExecQuery execute query

func (CloudPropsDSL) ExecUpload

func (cProp CloudPropsDSL) ExecUpload(process *gou.Process, upload gou.UploadFile) (interface{}, error)

ExecUpload execute upload

func (*CloudPropsDSL) Parse

func (cProp *CloudPropsDSL) Parse(v interface{}) error

Parse parse cloud props

func (CloudPropsDSL) Path

func (cProp CloudPropsDSL) Path() string

Path api path

func (CloudPropsDSL) Replace

func (cProp CloudPropsDSL) Replace(data interface{}, replace func(cProp CloudPropsDSL) interface{}) error

Replace xpath

func (CloudPropsDSL) UploadPath

func (cProp CloudPropsDSL) UploadPath() string

UploadPath api UploadPath

type Compute

type Compute struct {
	Process string `json:"process"`
	Args    []CArg `json:"args,omitempty"`
}

Compute process

func (*Compute) GetArgs

func (compute *Compute) GetArgs(data maps.MapStr) []interface{}

GetArgs return args

func (Compute) MarshalJSON

func (compute Compute) MarshalJSON() ([]byte, error)

MarshalJSON Custom JSON parse

func (*Compute) UnmarshalJSON

func (compute *Compute) UnmarshalJSON(data []byte) error

UnmarshalJSON Custom JSON parse

func (*Compute) Value

func (compute *Compute) Value(data maps.MapStr, sid string, global map[string]interface{}) (interface{}, error)

Value compute value

type ComputeHanlder

type ComputeHanlder func(args ...interface{}) (interface{}, error)

ComputeHanlder computeHanlder

type ConfirmActionDSL

type ConfirmActionDSL struct {
	Title string `json:"title,omitempty"`
	Desc  string `json:"desc,omitempty"`
}

ConfirmActionDSL action.confirm

type DSL

type DSL struct {
	Bind    string   `json:"bind,omitempty"`
	Type    string   `json:"type,omitempty"`
	Compute *Compute `json:"compute,omitempty"`
	Props   PropsDSL `json:"props,omitempty"`
}

DSL the component DSL

func (*DSL) Clone

func (dsl *DSL) Clone() *DSL

Clone Component

func (DSL) Map

func (dsl DSL) Map() map[string]interface{}

Map cast to map[string]interface{}

func (DSL) MarshalJSON

func (dsl DSL) MarshalJSON() ([]byte, error)

MarshalJSON Custom JSON parse

type InstanceDSL

type InstanceDSL struct {
	Name   string      `json:"name,omitempty"`
	Width  interface{} `json:"width,omitempty"`
	Height interface{} `json:"height,omitempty"`
}

InstanceDSL the component instance DSL

type Instances

type Instances []InstanceDSL

Instances the Instances

type ParamsDSL

type ParamsDSL map[string]interface{}

ParamsDSL action params

type PropsDSL

type PropsDSL map[string]interface{}

PropsDSL component props

func (PropsDSL) CloudProps

func (p PropsDSL) CloudProps(xpath, component string) (map[string]CloudPropsDSL, error)

CloudProps parse CloudProps

Jump to

Keyboard shortcuts

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