conformanceconnect

package
v1.10.0-20241209200829... Latest Latest
Warning

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

Go to latest
Published: unknown License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ConformanceServiceParseProcedure is the fully-qualified name of the ConformanceService's Parse
	// RPC.
	ConformanceServiceParseProcedure = "/cel.expr.conformance.ConformanceService/Parse"
	// ConformanceServiceCheckProcedure is the fully-qualified name of the ConformanceService's Check
	// RPC.
	ConformanceServiceCheckProcedure = "/cel.expr.conformance.ConformanceService/Check"
	// ConformanceServiceEvalProcedure is the fully-qualified name of the ConformanceService's Eval RPC.
	ConformanceServiceEvalProcedure = "/cel.expr.conformance.ConformanceService/Eval"
)

These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.

Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.

View Source
const (
	// ConformanceServiceName is the fully-qualified name of the ConformanceService service.
	ConformanceServiceName = "cel.expr.conformance.ConformanceService"
)

Variables

This section is empty.

Functions

func NewConformanceServiceHandler

func NewConformanceServiceHandler(svc ConformanceServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler)

NewConformanceServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

Types

type ConformanceServiceClient

type ConformanceServiceClient interface {
	// Transforms CEL source text into a parsed representation.
	Parse(context.Context, *connect_go.Request[conformance.ParseRequest]) (*connect_go.Response[conformance.ParseResponse], error)
	// Runs static checks on a parsed CEL representation and return
	// an annotated representation, or a set of issues.
	Check(context.Context, *connect_go.Request[conformance.CheckRequest]) (*connect_go.Response[conformance.CheckResponse], error)
	// Evaluates a parsed or annotation CEL representation given
	// values of external bindings.
	Eval(context.Context, *connect_go.Request[conformance.EvalRequest]) (*connect_go.Response[conformance.EvalResponse], error)
}

ConformanceServiceClient is a client for the cel.expr.conformance.ConformanceService service.

func NewConformanceServiceClient

func NewConformanceServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) ConformanceServiceClient

NewConformanceServiceClient constructs a client for the cel.expr.conformance.ConformanceService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type ConformanceServiceHandler

type ConformanceServiceHandler interface {
	// Transforms CEL source text into a parsed representation.
	Parse(context.Context, *connect_go.Request[conformance.ParseRequest]) (*connect_go.Response[conformance.ParseResponse], error)
	// Runs static checks on a parsed CEL representation and return
	// an annotated representation, or a set of issues.
	Check(context.Context, *connect_go.Request[conformance.CheckRequest]) (*connect_go.Response[conformance.CheckResponse], error)
	// Evaluates a parsed or annotation CEL representation given
	// values of external bindings.
	Eval(context.Context, *connect_go.Request[conformance.EvalRequest]) (*connect_go.Response[conformance.EvalResponse], error)
}

ConformanceServiceHandler is an implementation of the cel.expr.conformance.ConformanceService service.

type UnimplementedConformanceServiceHandler

type UnimplementedConformanceServiceHandler struct{}

UnimplementedConformanceServiceHandler returns CodeUnimplemented from all methods.

Jump to

Keyboard shortcuts

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