Files
go-grpc/dev/dev_grpc.pb.go

106 lines
3.6 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.21.12
// source: dev.proto
package dev
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// DevServiceClient is the client API for DevService service.
//
// 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.
type DevServiceClient interface {
Validate(ctx context.Context, in *APIValidationRequest, opts ...grpc.CallOption) (*APIValidationResponse, error)
}
type devServiceClient struct {
cc grpc.ClientConnInterface
}
func NewDevServiceClient(cc grpc.ClientConnInterface) DevServiceClient {
return &devServiceClient{cc}
}
func (c *devServiceClient) Validate(ctx context.Context, in *APIValidationRequest, opts ...grpc.CallOption) (*APIValidationResponse, error) {
out := new(APIValidationResponse)
err := c.cc.Invoke(ctx, "/dev.DevService/Validate", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// DevServiceServer is the server API for DevService service.
// All implementations must embed UnimplementedDevServiceServer
// for forward compatibility
type DevServiceServer interface {
Validate(context.Context, *APIValidationRequest) (*APIValidationResponse, error)
mustEmbedUnimplementedDevServiceServer()
}
// UnimplementedDevServiceServer must be embedded to have forward compatible implementations.
type UnimplementedDevServiceServer struct {
}
func (UnimplementedDevServiceServer) Validate(context.Context, *APIValidationRequest) (*APIValidationResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Validate not implemented")
}
func (UnimplementedDevServiceServer) mustEmbedUnimplementedDevServiceServer() {}
// UnsafeDevServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to DevServiceServer will
// result in compilation errors.
type UnsafeDevServiceServer interface {
mustEmbedUnimplementedDevServiceServer()
}
func RegisterDevServiceServer(s grpc.ServiceRegistrar, srv DevServiceServer) {
s.RegisterService(&DevService_ServiceDesc, srv)
}
func _DevService_Validate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(APIValidationRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DevServiceServer).Validate(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/dev.DevService/Validate",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DevServiceServer).Validate(ctx, req.(*APIValidationRequest))
}
return interceptor(ctx, in, info, handler)
}
// DevService_ServiceDesc is the grpc.ServiceDesc for DevService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var DevService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "dev.DevService",
HandlerType: (*DevServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Validate",
Handler: _DevService_Validate_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "dev.proto",
}