arg

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventArgPrefix        = "$."
	EventDataArgPrefix    = EventArgPrefix + "data"
	EventDataSubArgPrefix = "@."
)

Variables

View Source
var (
	ErrOperationNotSupport = fmt.Errorf("operation not support")
	ErrArgValueNil         = fmt.Errorf("arg value is nil")
)

Functions

This section is empty.

Types

type Arg

type Arg interface {
	Type() Type
	Name() string
	Original() string
	// Evaluate arg value
	Evaluate(ceCtx *context.EventContext) (interface{}, error)
	SetValue(ceCtx *context.EventContext, v interface{}) error
	DeleteValue(ceCtx *context.EventContext) error
}

func NewArg

func NewArg(arg interface{}) (Arg, error)

type Type

type Type uint8
const (
	Constant Type = iota
	EventAttribute
	EventData
	Define
	Any
)

func (Type) String

func (t Type) String() string

type TypeList

type TypeList []Type

func (TypeList) Contains

func (list TypeList) Contains(arg Arg) bool

Jump to

Keyboard shortcuts

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