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

375 lines
14 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"
schema "github.com/pulumi/pulumi/sdk/v3/proto/go/codegen/schema"
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)
GetPackageInfo(ctx context.Context, in *GetSchemaRequest, opts ...grpc.CallOption) (*schema.PackageInfo, error)
GetResources(ctx context.Context, in *GetSchemaRequest, opts ...grpc.CallOption) (*schema.List, error)
GetResource(ctx context.Context, in *GetSchemaPartRequest, opts ...grpc.CallOption) (*schema.Resource, 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
}
func (c *loaderClient) GetPackageInfo(ctx context.Context, in *GetSchemaRequest, opts ...grpc.CallOption) (*schema.PackageInfo, error) {
out := new(schema.PackageInfo)
err := c.cc.Invoke(ctx, "/codegen.Loader/GetPackageInfo", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *loaderClient) GetResources(ctx context.Context, in *GetSchemaRequest, opts ...grpc.CallOption) (*schema.List, error) {
out := new(schema.List)
err := c.cc.Invoke(ctx, "/codegen.Loader/GetResources", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *loaderClient) GetResource(ctx context.Context, in *GetSchemaPartRequest, opts ...grpc.CallOption) (*schema.Resource, error) {
out := new(schema.Resource)
err := c.cc.Invoke(ctx, "/codegen.Loader/GetResource", 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)
GetPackageInfo(context.Context, *GetSchemaRequest) (*schema.PackageInfo, error)
GetResources(context.Context, *GetSchemaRequest) (*schema.List, error)
GetResource(context.Context, *GetSchemaPartRequest) (*schema.Resource, 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) GetPackageInfo(context.Context, *GetSchemaRequest) (*schema.PackageInfo, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPackageInfo not implemented")
}
func (UnimplementedLoaderServer) GetResources(context.Context, *GetSchemaRequest) (*schema.List, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetResources not implemented")
}
func (UnimplementedLoaderServer) GetResource(context.Context, *GetSchemaPartRequest) (*schema.Resource, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetResource 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)
}
func _Loader_GetPackageInfo_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).GetPackageInfo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/codegen.Loader/GetPackageInfo",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LoaderServer).GetPackageInfo(ctx, req.(*GetSchemaRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Loader_GetResources_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).GetResources(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/codegen.Loader/GetResources",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LoaderServer).GetResources(ctx, req.(*GetSchemaRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Loader_GetResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetSchemaPartRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LoaderServer).GetResource(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/codegen.Loader/GetResource",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LoaderServer).GetResource(ctx, req.(*GetSchemaPartRequest))
}
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,
},
{
MethodName: "GetPackageInfo",
Handler: _Loader_GetPackageInfo_Handler,
},
{
MethodName: "GetResources",
Handler: _Loader_GetResources_Handler,
},
{
MethodName: "GetResource",
Handler: _Loader_GetResource_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "pulumi/codegen/loader.proto",
}
// PartialLoaderClient is the client API for PartialLoader 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 PartialLoaderClient interface {
GetPackageInfo(ctx context.Context, in *GetPartialSchemaRequest, opts ...grpc.CallOption) (*schema.PackageInfo, error)
GetResources(ctx context.Context, in *GetPartialSchemaRequest, opts ...grpc.CallOption) (*schema.List, error)
GetResource(ctx context.Context, in *GetPartialSchemaPartRequest, opts ...grpc.CallOption) (*schema.Resource, error)
}
type partialLoaderClient struct {
cc grpc.ClientConnInterface
}
func NewPartialLoaderClient(cc grpc.ClientConnInterface) PartialLoaderClient {
return &partialLoaderClient{cc}
}
func (c *partialLoaderClient) GetPackageInfo(ctx context.Context, in *GetPartialSchemaRequest, opts ...grpc.CallOption) (*schema.PackageInfo, error) {
out := new(schema.PackageInfo)
err := c.cc.Invoke(ctx, "/codegen.PartialLoader/GetPackageInfo", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *partialLoaderClient) GetResources(ctx context.Context, in *GetPartialSchemaRequest, opts ...grpc.CallOption) (*schema.List, error) {
out := new(schema.List)
err := c.cc.Invoke(ctx, "/codegen.PartialLoader/GetResources", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *partialLoaderClient) GetResource(ctx context.Context, in *GetPartialSchemaPartRequest, opts ...grpc.CallOption) (*schema.Resource, error) {
out := new(schema.Resource)
err := c.cc.Invoke(ctx, "/codegen.PartialLoader/GetResource", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// PartialLoaderServer is the server API for PartialLoader service.
// All implementations must embed UnimplementedPartialLoaderServer
// for forward compatibility
type PartialLoaderServer interface {
GetPackageInfo(context.Context, *GetPartialSchemaRequest) (*schema.PackageInfo, error)
GetResources(context.Context, *GetPartialSchemaRequest) (*schema.List, error)
GetResource(context.Context, *GetPartialSchemaPartRequest) (*schema.Resource, error)
mustEmbedUnimplementedPartialLoaderServer()
}
// UnimplementedPartialLoaderServer must be embedded to have forward compatible implementations.
type UnimplementedPartialLoaderServer struct {
}
func (UnimplementedPartialLoaderServer) GetPackageInfo(context.Context, *GetPartialSchemaRequest) (*schema.PackageInfo, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPackageInfo not implemented")
}
func (UnimplementedPartialLoaderServer) GetResources(context.Context, *GetPartialSchemaRequest) (*schema.List, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetResources not implemented")
}
func (UnimplementedPartialLoaderServer) GetResource(context.Context, *GetPartialSchemaPartRequest) (*schema.Resource, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetResource not implemented")
}
func (UnimplementedPartialLoaderServer) mustEmbedUnimplementedPartialLoaderServer() {}
// UnsafePartialLoaderServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PartialLoaderServer will
// result in compilation errors.
type UnsafePartialLoaderServer interface {
mustEmbedUnimplementedPartialLoaderServer()
}
func RegisterPartialLoaderServer(s grpc.ServiceRegistrar, srv PartialLoaderServer) {
s.RegisterService(&PartialLoader_ServiceDesc, srv)
}
func _PartialLoader_GetPackageInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPartialSchemaRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PartialLoaderServer).GetPackageInfo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/codegen.PartialLoader/GetPackageInfo",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PartialLoaderServer).GetPackageInfo(ctx, req.(*GetPartialSchemaRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PartialLoader_GetResources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPartialSchemaRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PartialLoaderServer).GetResources(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/codegen.PartialLoader/GetResources",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PartialLoaderServer).GetResources(ctx, req.(*GetPartialSchemaRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PartialLoader_GetResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPartialSchemaPartRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PartialLoaderServer).GetResource(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/codegen.PartialLoader/GetResource",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PartialLoaderServer).GetResource(ctx, req.(*GetPartialSchemaPartRequest))
}
return interceptor(ctx, in, info, handler)
}
// PartialLoader_ServiceDesc is the grpc.ServiceDesc for PartialLoader service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PartialLoader_ServiceDesc = grpc.ServiceDesc{
ServiceName: "codegen.PartialLoader",
HandlerType: (*PartialLoaderServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetPackageInfo",
Handler: _PartialLoader_GetPackageInfo_Handler,
},
{
MethodName: "GetResources",
Handler: _PartialLoader_GetResources_Handler,
},
{
MethodName: "GetResource",
Handler: _PartialLoader_GetResource_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "pulumi/codegen/loader.proto",
}