filter

package
v1.0.6-beta.1 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomData

type CustomData interface {
	CustomDataPtr() interface{}
	EncodeFromCustomData(customDataPtr interface{}, stdDataPtr *Data)
	DecodeToCustomData(stdDataPtr *Data, customDataPtr interface{})
}

CustomData is filter's custom data handler.

type CustomInParams

type CustomInParams interface {
	CustomInParamsPtr() interface{}
	EncodeFromCustomInParams(customInParamsPtr interface{}, stdInParamsPtr *cptype.ExtraMap)
	DecodeToCustomInParams(stdInParamsPtr *cptype.ExtraMap, customInParamsPtr interface{})
}

CustomInParams is filter's custom inParams handler.

type CustomState

type CustomState interface {
	CustomStatePtr() interface{}
	EncodeFromCustomState(customStatePtr interface{}, stdStatePtr *cptype.ExtraMap)
	DecodeToCustomState(stdStatePtr *cptype.ExtraMap, customStatePtr interface{})
}

CustomState is filter's custom state handler.

type Data

type Data struct {
	// models/condition.go define constructors of condition type
	// SelectCondition, DateRangeCondition, etc
	Conditions []interface{}                            `json:"conditions,omitempty"`
	FilterSet  []SetItem                                `json:"filterSet,omitempty"`
	Operations map[cptype.OperationKey]cptype.Operation `json:"operations,omitempty"`
	// HideSave hide saveFilterSet
	HideSave bool `json:"hideSave,omitempty"`
}

Data filter std data

type ICondition

type ICondition interface {
	Type() model.ConditionType
}

ICondition get type ICondition

type IFilter

type IFilter interface {
	cptype.IComponent
	IFilterStdOps
}

IFilter .

type IFilterStdOps

type IFilterStdOps interface {
	RegisterFilterOp(opData OpFilter) (opFunc cptype.OperationFunc)
	RegisterFilterItemSaveOp(opData OpFilterItemSave) (opFunc cptype.OperationFunc)
	RegisterFilterItemDeleteOp(opData OpFilterItemDelete) (opFunc cptype.OperationFunc)
}

IFilterStdOps .

type OpFilter

type OpFilter struct {
	cptype.Operation
	ClientData OpFilterClientData `json:"clientData,omitempty"`
}

OpFilter .

func (OpFilter) OpKey

func (o OpFilter) OpKey() cptype.OperationKey

OpKey .

type OpFilterClientData

type OpFilterClientData struct {
	Values cptype.ExtraMap `json:"values,omitempty"`
}

OpFilterClientData .

type OpFilterItemDelete

type OpFilterItemDelete struct {
	cptype.Operation
	ClientData OpFilterItemDeleteClientData `json:"clientData,omitempty"`
}

OpFilterItemDelete .

func (OpFilterItemDelete) OpKey

OpKey .

type OpFilterItemDeleteClientData

type OpFilterItemDeleteClientData struct {
	DataRef *SetItem `json:"dataRef,omitempty"`
}

OpFilterItemDeleteClientData .

type OpFilterItemSave

type OpFilterItemSave struct {
	cptype.Operation
	ClientData OpFilterItemSaveClientData `json:"clientData,omitempty"`
}

OpFilterItemSave .

func (OpFilterItemSave) OpKey

OpKey .

type OpFilterItemSaveClientData

type OpFilterItemSaveClientData struct {
	Values cptype.ExtraMap `json:"values,omitempty"`
	Label  string          `json:"label,omitempty"`
}

OpFilterItemSaveClientData .

type SetItem

type SetItem struct {
	ID       string          `json:"id,omitempty"`
	Values   cptype.ExtraMap `json:"values,omitempty"`
	Label    string          `json:"label,omitempty"`
	IsPreset bool            `json:"isPreset,omitempty"`
}

SetItem custom filter conditions

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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