pulumi/sdk/proto/go/codegen/loader_grpc.pb.go

108 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.20.1
// source: pulumi/codegen/loader.proto
package codegen
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
// LoaderClient is the client API for Loader 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 LoaderClient interface {
// GetSchema tries to find a schema for the given package and version.
GetSchema(ctx context.Context, in *GetSchemaRequest, opts ...grpc.CallOption) (*GetSchemaResponse, error)
}
type loaderClient struct {
cc grpc.ClientConnInterface
}
func NewLoaderClient(cc grpc.ClientConnInterface) LoaderClient {
return &loaderClient{cc}
}
func (c *loaderClient) GetSchema(ctx context.Context, in *GetSchemaRequest, opts ...grpc.CallOption) (*GetSchemaResponse, error) {
out := new(GetSchemaResponse)
err := c.cc.Invoke(ctx, "/codegen.Loader/GetSchema", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// LoaderServer is the server API for Loader service.
// All implementations must embed UnimplementedLoaderServer
// for forward compatibility
type LoaderServer interface {
// GetSchema tries to find a schema for the given package and version.
GetSchema(context.Context, *GetSchemaRequest) (*GetSchemaResponse, error)
mustEmbedUnimplementedLoaderServer()
}
// UnimplementedLoaderServer must be embedded to have forward compatible implementations.
type UnimplementedLoaderServer struct {
}
func (UnimplementedLoaderServer) GetSchema(context.Context, *GetSchemaRequest) (*GetSchemaResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetSchema not implemented")
}
func (UnimplementedLoaderServer) mustEmbedUnimplementedLoaderServer() {}
// UnsafeLoaderServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to LoaderServer will
// result in compilation errors.
type UnsafeLoaderServer interface {
mustEmbedUnimplementedLoaderServer()
}
func RegisterLoaderServer(s grpc.ServiceRegistrar, srv LoaderServer) {
s.RegisterService(&Loader_ServiceDesc, srv)
}
func _Loader_GetSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetSchemaRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LoaderServer).GetSchema(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/codegen.Loader/GetSchema",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LoaderServer).GetSchema(ctx, req.(*GetSchemaRequest))
}
return interceptor(ctx, in, info, handler)
}
// Loader_ServiceDesc is the grpc.ServiceDesc for Loader service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Loader_ServiceDesc = grpc.ServiceDesc{
ServiceName: "codegen.Loader",
HandlerType: (*LoaderServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetSchema",
Handler: _Loader_GetSchema_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "pulumi/codegen/loader.proto",
}