snapshot of https://github.com/ory/keto.git (master, 2026-09-16; blobs > 131072B omitted)
Some checks failed
CI / Run lints and checks (push) Failing after 47s
CI / Run tests (push) Failing after 1s
CI / Run race tests (push) Failing after 5s
CI / Build CLI docs (push) Has been skipped
CI / Run buf actions (push) Failing after 5s
CodeQL / Analyze (go) (push) Failing after 3s
CodeQL / Analyze (javascript) (push) Failing after 2s
Docker Image Scanners / scanners (push) Failing after 3s
Format / format (push) Failing after 3s
Synchronize Issue Labels / Synchronize Issue Labels (push) Has been skipped
CI / Generate release (push) Has been skipped
CI / Draft newsletter (push) Has been skipped
CI / Pending approval Slack notification (push) Has been skipped
CI / Send newsletter (push) Has been skipped
Some checks failed
CI / Run lints and checks (push) Failing after 47s
CI / Run tests (push) Failing after 1s
CI / Run race tests (push) Failing after 5s
CI / Build CLI docs (push) Has been skipped
CI / Run buf actions (push) Failing after 5s
CodeQL / Analyze (go) (push) Failing after 3s
CodeQL / Analyze (javascript) (push) Failing after 2s
Docker Image Scanners / scanners (push) Failing after 3s
Format / format (push) Failing after 3s
Synchronize Issue Labels / Synchronize Issue Labels (push) Has been skipped
CI / Generate release (push) Has been skipped
CI / Draft newsletter (push) Has been skipped
CI / Pending approval Slack notification (push) Has been skipped
CI / Send newsletter (push) Has been skipped
This commit is contained in:
@@ -0,0 +1,113 @@
|
||||
// Copyright © 2026 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Code generated by protoc-gen-connect-go. DO NOT EDIT.
|
||||
//
|
||||
// Source: ory/keto/opl/v1alpha1/syntax_service.proto
|
||||
|
||||
package oplconnect
|
||||
|
||||
import (
|
||||
connect "connectrpc.com/connect"
|
||||
context "context"
|
||||
errors "errors"
|
||||
v1alpha1 "github.com/ory/keto/gen/go/ory/keto/opl/v1alpha1"
|
||||
http "net/http"
|
||||
strings "strings"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file and the connect package are
|
||||
// compatible. If you get a compiler error that this constant is not defined, this code was
|
||||
// generated with a version of connect newer than the one compiled into your binary. You can fix the
|
||||
// problem by either regenerating this code with an older version of connect or updating the connect
|
||||
// version compiled into your binary.
|
||||
const _ = connect.IsAtLeastVersion1_13_0
|
||||
|
||||
const (
|
||||
// SyntaxServiceName is the fully-qualified name of the SyntaxService service.
|
||||
SyntaxServiceName = "ory.keto.opl.v1alpha1.SyntaxService"
|
||||
)
|
||||
|
||||
// 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.
|
||||
const (
|
||||
// SyntaxServiceCheckProcedure is the fully-qualified name of the SyntaxService's Check RPC.
|
||||
SyntaxServiceCheckProcedure = "/ory.keto.opl.v1alpha1.SyntaxService/Check"
|
||||
)
|
||||
|
||||
// SyntaxServiceClient is a client for the ory.keto.opl.v1alpha1.SyntaxService service.
|
||||
type SyntaxServiceClient interface {
|
||||
// Performs a syntax check request.
|
||||
Check(context.Context, *connect.Request[v1alpha1.CheckRequest]) (*connect.Response[v1alpha1.CheckResponse], error)
|
||||
}
|
||||
|
||||
// NewSyntaxServiceClient constructs a client for the ory.keto.opl.v1alpha1.SyntaxService 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).
|
||||
func NewSyntaxServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) SyntaxServiceClient {
|
||||
baseURL = strings.TrimRight(baseURL, "/")
|
||||
syntaxServiceMethods := v1alpha1.File_ory_keto_opl_v1alpha1_syntax_service_proto.Services().ByName("SyntaxService").Methods()
|
||||
return &syntaxServiceClient{
|
||||
check: connect.NewClient[v1alpha1.CheckRequest, v1alpha1.CheckResponse](
|
||||
httpClient,
|
||||
baseURL+SyntaxServiceCheckProcedure,
|
||||
connect.WithSchema(syntaxServiceMethods.ByName("Check")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
// syntaxServiceClient implements SyntaxServiceClient.
|
||||
type syntaxServiceClient struct {
|
||||
check *connect.Client[v1alpha1.CheckRequest, v1alpha1.CheckResponse]
|
||||
}
|
||||
|
||||
// Check calls ory.keto.opl.v1alpha1.SyntaxService.Check.
|
||||
func (c *syntaxServiceClient) Check(ctx context.Context, req *connect.Request[v1alpha1.CheckRequest]) (*connect.Response[v1alpha1.CheckResponse], error) {
|
||||
return c.check.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// SyntaxServiceHandler is an implementation of the ory.keto.opl.v1alpha1.SyntaxService service.
|
||||
type SyntaxServiceHandler interface {
|
||||
// Performs a syntax check request.
|
||||
Check(context.Context, *connect.Request[v1alpha1.CheckRequest]) (*connect.Response[v1alpha1.CheckResponse], error)
|
||||
}
|
||||
|
||||
// NewSyntaxServiceHandler 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.
|
||||
func NewSyntaxServiceHandler(svc SyntaxServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {
|
||||
syntaxServiceMethods := v1alpha1.File_ory_keto_opl_v1alpha1_syntax_service_proto.Services().ByName("SyntaxService").Methods()
|
||||
syntaxServiceCheckHandler := connect.NewUnaryHandler(
|
||||
SyntaxServiceCheckProcedure,
|
||||
svc.Check,
|
||||
connect.WithSchema(syntaxServiceMethods.ByName("Check")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
return "/ory.keto.opl.v1alpha1.SyntaxService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
switch r.URL.Path {
|
||||
case SyntaxServiceCheckProcedure:
|
||||
syntaxServiceCheckHandler.ServeHTTP(w, r)
|
||||
default:
|
||||
http.NotFound(w, r)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// UnimplementedSyntaxServiceHandler returns CodeUnimplemented from all methods.
|
||||
type UnimplementedSyntaxServiceHandler struct{}
|
||||
|
||||
func (UnimplementedSyntaxServiceHandler) Check(context.Context, *connect.Request[v1alpha1.CheckRequest]) (*connect.Response[v1alpha1.CheckResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ory.keto.opl.v1alpha1.SyntaxService.Check is not implemented"))
|
||||
}
|
||||
Reference in New Issue
Block a user