executor

package
v0.2.0-beta8 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActionExecutorList

func ActionExecutorList() []string

func QueryExecutorList

func QueryExecutorList() []string

func RegActionExecutor

func RegActionExecutor(name string, e ActionExecutor)

func RegQueryExecutor

func RegQueryExecutor(name string, e queryExecutorBuilder)

Types

type ActionExecutor

type ActionExecutor interface {
	Do(ctx context.Context, req ActionExecutorReq) (ret model.Map, err error)
}

func GetActionExecutor

func GetActionExecutor(name string) ActionExecutor

type ActionExecutorReq

type ActionExecutorReq struct {
	Method string
	Table  string
	Data   []model.Map
	Where  []model.Map
	Access *config.AccessConfig
	Config *config.ActionConfig
}

type QueryExecutor

type QueryExecutor interface {
	ParseCondition(conditions model.MapStrAny, accessVerify bool) error
	ParseCtrl(ctrl model.Map) error
	List(page int, count int) (list []model.Map, err error)
	Count() (total int64, err error)
	One() (model.Map, error)
	SetEmptyResult()
}

func NewQueryExecutor

func NewQueryExecutor(name string, ctx context.Context, config *config.ExecutorConfig) (QueryExecutor, error)

Jump to

Keyboard shortcuts

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