| 1 |
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. |
| 2 |
// versions: |
| 3 |
// - protoc-gen-go-grpc v1.3.0 |
| 4 |
// - protoc v5.29.1 |
| 5 |
// source: envoy/service/redis_auth/v3/redis_external_auth.proto |
| 6 |
|
| 7 |
package redis_authv3 |
| 8 |
|
| 9 |
import ( |
| 10 |
context "context" |
| 11 |
grpc "google.golang.org/grpc" |
| 12 |
codes "google.golang.org/grpc/codes" |
| 13 |
status "google.golang.org/grpc/status" |
| 14 |
) |
| 15 |
|
| 16 |
// This is a compile-time assertion to ensure that this generated file |
| 17 |
// is compatible with the grpc package it is being compiled against. |
| 18 |
// Requires gRPC-Go v1.32.0 or later. |
| 19 |
const _ = grpc.SupportPackageIsVersion7 |
| 20 |
|
| 21 |
const ( |
| 22 |
RedisProxyExternalAuth_Authenticate_FullMethodName = "/envoy.service.redis_auth.v3.RedisProxyExternalAuth/Authenticate" |
| 23 |
) |
| 24 |
|
| 25 |
// RedisProxyExternalAuthClient is the client API for RedisProxyExternalAuth service. |
| 26 |
// |
| 27 |
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. |
| 28 |
type RedisProxyExternalAuthClient interface { |
| 29 |
// Performs authentication check based on the data sent with the AUTH request. |
| 30 |
// Returns either an OK status or an error status. |
| 31 |
Authenticate(ctx context.Context, in *RedisProxyExternalAuthRequest, opts ...grpc.CallOption) (*RedisProxyExternalAuthResponse, error) |
| 32 |
} |
| 33 |
|
| 34 |
type redisProxyExternalAuthClient struct { |
| 35 |
cc grpc.ClientConnInterface |
| 36 |
} |
| 37 |
|
| 38 |
func NewRedisProxyExternalAuthClient(cc grpc.ClientConnInterface) RedisProxyExternalAuthClient { |
| 39 |
return &redisProxyExternalAuthClient{cc} |
| 40 |
} |
| 41 |
|
| 42 |
func (c *redisProxyExternalAuthClient) Authenticate(ctx context.Context, in *RedisProxyExternalAuthRequest, opts ...grpc.CallOption) (*RedisProxyExternalAuthResponse, error) { |
| 43 |
out := new(RedisProxyExternalAuthResponse) |
| 44 |
err := c.cc.Invoke(ctx, RedisProxyExternalAuth_Authenticate_FullMethodName, in, out, opts...) |
| 45 |
if err != nil { |
| 46 |
return nil, err |
| 47 |
} |
| 48 |
return out, nil |
| 49 |
} |
| 50 |
|
| 51 |
// RedisProxyExternalAuthServer is the server API for RedisProxyExternalAuth service. |
| 52 |
// All implementations should embed UnimplementedRedisProxyExternalAuthServer |
| 53 |
// for forward compatibility |
| 54 |
type RedisProxyExternalAuthServer interface { |
| 55 |
// Performs authentication check based on the data sent with the AUTH request. |
| 56 |
// Returns either an OK status or an error status. |
| 57 |
Authenticate(context.Context, *RedisProxyExternalAuthRequest) (*RedisProxyExternalAuthResponse, error) |
| 58 |
} |
| 59 |
|
| 60 |
// UnimplementedRedisProxyExternalAuthServer should be embedded to have forward compatible implementations. |
| 61 |
type UnimplementedRedisProxyExternalAuthServer struct { |
| 62 |
} |
| 63 |
|
| 64 |
func (UnimplementedRedisProxyExternalAuthServer) Authenticate(context.Context, *RedisProxyExternalAuthRequest) (*RedisProxyExternalAuthResponse, error) { |
| 65 |
return nil, status.Errorf(codes.Unimplemented, "method Authenticate not implemented") |
| 66 |
} |
| 67 |
|
| 68 |
// UnsafeRedisProxyExternalAuthServer may be embedded to opt out of forward compatibility for this service. |
| 69 |
// Use of this interface is not recommended, as added methods to RedisProxyExternalAuthServer will |
| 70 |
// result in compilation errors. |
| 71 |
type UnsafeRedisProxyExternalAuthServer interface { |
| 72 |
mustEmbedUnimplementedRedisProxyExternalAuthServer() |
| 73 |
} |
| 74 |
|
| 75 |
func RegisterRedisProxyExternalAuthServer(s grpc.ServiceRegistrar, srv RedisProxyExternalAuthServer) { |
| 76 |
s.RegisterService(&RedisProxyExternalAuth_ServiceDesc, srv) |
| 77 |
} |
| 78 |
|
| 79 |
func _RedisProxyExternalAuth_Authenticate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 80 |
in := new(RedisProxyExternalAuthRequest) |
| 81 |
if err := dec(in); err != nil { |
| 82 |
return nil, err |
| 83 |
} |
| 84 |
if interceptor == nil { |
| 85 |
return srv.(RedisProxyExternalAuthServer).Authenticate(ctx, in) |
| 86 |
} |
| 87 |
info := &grpc.UnaryServerInfo{ |
| 88 |
Server: srv, |
| 89 |
FullMethod: RedisProxyExternalAuth_Authenticate_FullMethodName, |
| 90 |
} |
| 91 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 92 |
return srv.(RedisProxyExternalAuthServer).Authenticate(ctx, req.(*RedisProxyExternalAuthRequest)) |
| 93 |
} |
| 94 |
return interceptor(ctx, in, info, handler) |
| 95 |
} |
| 96 |
|
| 97 |
// RedisProxyExternalAuth_ServiceDesc is the grpc.ServiceDesc for RedisProxyExternalAuth service. |
| 98 |
// It's only intended for direct use with grpc.RegisterService, |
| 99 |
// and not to be introspected or modified (even as a copy) |
| 100 |
var RedisProxyExternalAuth_ServiceDesc = grpc.ServiceDesc{ |
| 101 |
ServiceName: "envoy.service.redis_auth.v3.RedisProxyExternalAuth", |
| 102 |
HandlerType: (*RedisProxyExternalAuthServer)(nil), |
| 103 |
Methods: []grpc.MethodDesc{ |
| 104 |
{ |
| 105 |
MethodName: "Authenticate", |
| 106 |
Handler: _RedisProxyExternalAuth_Authenticate_Handler, |
| 107 |
}, |
| 108 |
}, |
| 109 |
Streams: []grpc.StreamDesc{}, |
| 110 |
Metadata: "envoy/service/redis_auth/v3/redis_external_auth.proto", |
| 111 |
} |