internal

package
v0.0.0-...-9823ec8 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PreKey  = "req"
	PostKey = "resp"
	JwtKey  = "JWT"
	NowKey  = "now"
)
View Source
const Namespace = "github.com/starvn/sonic/validation/explang"

Variables

View Source
var (
	ErrParsing  = errors.New("cel: error parsing the expression")
	ErrChecking = errors.New("cel: error checking the expression and its param definition")
	ErrNoExpr   = errors.New("cel: no expression")
)

Functions

This section is empty.

Types

type ErrorChecking

type ErrorChecking struct {
	// contains filtered or unexported fields
}

func (ErrorChecking) Error

func (e ErrorChecking) Error() string

type InterpretableDefinition

type InterpretableDefinition struct {
	CheckExpression string `json:"check_expr"`
	ModExpression   string `json:"mod_expr"`
}

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

func NewCheckExpressionParser

func NewCheckExpressionParser(l log.Logger) Parser

func NewModExpressionParser

func NewModExpressionParser(l log.Logger) Parser

func (Parser) Parse

func (p Parser) Parse(definition InterpretableDefinition) (cel.Program, error)

func (Parser) ParseJWT

func (p Parser) ParseJWT(definitions []InterpretableDefinition) ([]cel.Program, error)

func (Parser) ParsePost

func (p Parser) ParsePost(definitions []InterpretableDefinition) ([]cel.Program, error)

func (Parser) ParsePre

func (p Parser) ParsePre(definitions []InterpretableDefinition) ([]cel.Program, error)

Jump to

Keyboard shortcuts

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