package server
import "github.com/google/cel-go/server"
Package server defines the gRPC conformance test server for CEL Go.
Index ¶
- func ErrToStatus(e common.Error, severity exprpb.IssueDetails_Severity) *rpc.Status
- func ExprValueToRefValue(adapter ref.TypeAdapter, ev *exprpb.ExprValue) (ref.Val, error)
- func RefValueToExprValue(res ref.Val, err error) (*exprpb.ExprValue, error)
- func RefValueToValue(res ref.Val) (*exprpb.Value, error)
- func ValueToRefValue(adapter ref.TypeAdapter, v *exprpb.Value) (ref.Val, error)
- type ConformanceServer
- func (s *ConformanceServer) Check(ctx context.Context, in *exprpb.CheckRequest) (*exprpb.CheckResponse, error)
- func (s *ConformanceServer) Eval(ctx context.Context, in *exprpb.EvalRequest) (*exprpb.EvalResponse, error)
- func (s *ConformanceServer) Parse(ctx context.Context, in *exprpb.ParseRequest) (*exprpb.ParseResponse, error)
Functions ¶
func ErrToStatus ¶
ErrToStatus converts an Error to a Status message with the given severity.
func ExprValueToRefValue ¶
ExprValueToRefValue converts between exprpb.ExprValue and ref.Val.
func RefValueToExprValue ¶
RefValueToExprValue converts between ref.Val and exprpb.ExprValue.
func RefValueToValue ¶
RefValueToValue converts between ref.Val and Value. The ref.Val must not be error or unknown.
func ValueToRefValue ¶
ValueToRefValue converts between exprpb.Value and ref.Val.
Types ¶
type ConformanceServer ¶
type ConformanceServer struct{}
ConformanceServer contains the server state.
func (*ConformanceServer) Check ¶
func (s *ConformanceServer) Check(ctx context.Context, in *exprpb.CheckRequest) (*exprpb.CheckResponse, error)
Check implements ConformanceService.Check.
func (*ConformanceServer) Eval ¶
func (s *ConformanceServer) Eval(ctx context.Context, in *exprpb.EvalRequest) (*exprpb.EvalResponse, error)
Eval implements ConformanceService.Eval.
func (*ConformanceServer) Parse ¶
func (s *ConformanceServer) Parse(ctx context.Context, in *exprpb.ParseRequest) (*exprpb.ParseResponse, error)
Parse implements ConformanceService.Parse.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
server/main | Package main declares the executable entry point for the CEL server. |
- Version
- v0.6.0
- Published
- Sep 2, 2020
- Platform
- js/wasm
- Imports
- 15 packages
- Last checked
- 9 seconds ago –
Tools for package owners.