mirror of https://github.com/pulumi/pulumi.git
1075 lines
52 KiB
Go
1075 lines
52 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/provider.proto
|
|
|
|
package pulumirpc
|
|
|
|
import (
|
|
context "context"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
|
)
|
|
|
|
// 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
|
|
|
|
// ResourceProviderClient is the client API for ResourceProvider 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 ResourceProviderClient interface {
|
|
// `Parameterize` is the primary means of supporting [parameterized providers](parameterized-providers), which allow
|
|
// a caller to change a provider's behavior ahead of its [configuration](pulumirpc.ResourceProvider.Configure) and
|
|
// subsequent use. Where a [](pulumirpc.ResourceProvider.Configure) call allows a caller to influence provider
|
|
// behaviour at a high level (e.g. by specifying the region in which an AWS provider should operate), a
|
|
// `Parameterize` call may change the set of resources and functions that a provider offers (that is, its schema).
|
|
// This is useful in any case where some "set" of providers can be captured by a single implementation that may
|
|
// power fundamentally different schemata -- dynamically bridging Terraform providers, or managing Kubernetes
|
|
// clusters with custom resource definitions, for instance, are good examples. The parameterized package that
|
|
// `Parameterize` yields is known as a *sub-package* of the original (unparameterized) package.
|
|
//
|
|
// `Parameterize` supports two types of parameterization:
|
|
//
|
|
// * *Replacement parameterization*, whereby a `Parameterize` call results in a schema that completely replaces the
|
|
// original provider schema. Bridging a Terraform provider dynamically might be an example of this -- following
|
|
// the call to `Parameterize`, the provider's schema will become that of the Terraform provider that was bridged.
|
|
// Providers that implement replacement parameterization expect a *single* call to `Parameterize`.
|
|
//
|
|
// * *Extension parameterization*, in which a `Parameterize` call results in a schema that is a superset of the
|
|
// original. This is useful in cases where a provider can be extended with additional resources or functions, such
|
|
// as a Kubernetes provider that can be extended with resources representing custom resource definitions.
|
|
// Providers that implement extension parameterization should accept multiple calls to `Parameterize`. Extension
|
|
// packages may even be called multiple times with the same package name, but with different versions. The CRUD
|
|
// operations of extension resources must include the version of which sub-package they correspond to.
|
|
//
|
|
// `Parameterize` should work the same whether it is provided with `ParametersArgs` or `ParametersValue` input. In
|
|
// each case it should return the sub-package name and version (which when a `ParametersValue` is supplied should
|
|
// match the given input).
|
|
Parameterize(ctx context.Context, in *ParameterizeRequest, opts ...grpc.CallOption) (*ParameterizeResponse, error)
|
|
// GetSchema fetches the schema for this resource provider.
|
|
GetSchema(ctx context.Context, in *GetSchemaRequest, opts ...grpc.CallOption) (*GetSchemaResponse, error)
|
|
// `CheckConfig` validates a set of configuration inputs that will be passed to this provider instance.
|
|
// `CheckConfig` is to provider resources what [](pulumirpc.ResourceProvider.Check) is to individual resources, and
|
|
// is the first stage in configuring (that is, eventually executing a [](pulumirpc.ResourceProvider.Configure) call)
|
|
// a provider using user-supplied values. In the case that provider inputs are coming from some source that has been
|
|
// checked previously (e.g. a Pulumi state), it is not necessary to call `CheckConfig`.
|
|
//
|
|
// A `CheckConfig` call returns either a set of checked, known-valid inputs that may subsequently be passed to
|
|
// [](pulumirpc.ResourceProvider.DiffConfig) and/or [](pulumirpc.ResourceProvider.Configure), or a set of errors
|
|
// explaining why the inputs are invalid. In the case that a set of inputs are successfully validated and returned,
|
|
// `CheckConfig` *may also populate default values* for provider configuration, returning them so that they may be
|
|
// passed to a subsequent [](pulumirpc.ResourceProvider.Configure) call and persisted in the Pulumi state. In the
|
|
// case that `CheckConfig` fails and returns a set of errors, it is expected that the caller (typically the Pulumi
|
|
// engine) will fail provider registration.
|
|
//
|
|
// As a rule, the provider inputs returned by a call to `CheckConfig` should preserve the original representation of
|
|
// the properties as present in the program inputs. Though this rule is not required for correctness, violations
|
|
// thereof can negatively impact the end-user experience, as the provider inputs are used for detecting and
|
|
// rendering diffs.
|
|
CheckConfig(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error)
|
|
// `DiffConfig` compares an existing ("old") provider configuration with a new configuration and computes the
|
|
// difference (if any) between them. `DiffConfig` is to provider resources what [](pulumirpc.ResourceProvider.Diff)
|
|
// is to individual resources. `DiffConfig` should only be called with values that have at some point been validated
|
|
// by a [](pulumirpc.ResourceProvider.CheckConfig) call. The [](pulumirpc.DiffResponse) returned by a `DiffConfig`
|
|
// call is used primarily to determine whether or not the newly configured provider is capable of managing resources
|
|
// owned by the old provider. If `DiffConfig` indicates that the provider resource needs to be replaced, for
|
|
// instance, then all resources owned by that provider will *also* need to be replaced. Replacement semantics should
|
|
// thus be reserved for changes to configuration properties that are guaranteed to make old resources unmanageable.
|
|
// Changes to an AWS region, for example, will almost certainly require a provider replacement, but changes to an
|
|
// AWS access key, should almost certainly not.
|
|
DiffConfig(ctx context.Context, in *DiffRequest, opts ...grpc.CallOption) (*DiffResponse, error)
|
|
// `Configure` is the final stage in configuring a provider instance. Callers supply two sets of data:
|
|
//
|
|
// * Provider-specific configuration, which is the set of inputs that have been validated by a previous
|
|
// [](pulumirpc.ResourceProvider.CheckConfig) call.
|
|
// * Provider-agnostic ("protocol") configuration, such as whether or not the caller supports secrets.
|
|
//
|
|
// The provider is expected to return its own set of protocol configuration, indicating which features it supports
|
|
// in turn so that the caller and the provider can interact appropriately.
|
|
//
|
|
// Providers may expect a *single* call to `Configure`. If a call to `Configure` is missing required configuration,
|
|
// the provider may return a set of error details containing [](pulumirpc.ConfigureErrorMissingKeys) values to
|
|
// indicate which keys are missing.
|
|
Configure(ctx context.Context, in *ConfigureRequest, opts ...grpc.CallOption) (*ConfigureResponse, error)
|
|
// Invoke dynamically executes a built-in function in the provider.
|
|
Invoke(ctx context.Context, in *InvokeRequest, opts ...grpc.CallOption) (*InvokeResponse, error)
|
|
// StreamInvoke dynamically executes a built-in function in the provider, which returns a stream
|
|
// of responses.
|
|
StreamInvoke(ctx context.Context, in *InvokeRequest, opts ...grpc.CallOption) (ResourceProvider_StreamInvokeClient, error)
|
|
// Call dynamically executes a method in the provider associated with a component resource.
|
|
Call(ctx context.Context, in *CallRequest, opts ...grpc.CallOption) (*CallResponse, error)
|
|
// `Check` validates a set of input properties against a given resource type. A `Check` call returns either a set of
|
|
// checked, known-valid inputs that may subsequently be passed to [](pulumirpc.ResourceProvider.Diff),
|
|
// [](pulumirpc.ResourceProvider.Create), or [](pulumirpc.ResourceProvider.Update); or a set of errors explaining
|
|
// why the inputs are invalid. In the case that a set of inputs are successfully validated and returned, `Check`
|
|
// *may also populate default values* for resource inputs, returning them so that they may be passed to a subsequent
|
|
// call and persisted in the Pulumi state. In the case that `Check` fails and returns a set of errors, it is
|
|
// expected that the caller (typically the Pulumi engine) will fail resource registration.
|
|
//
|
|
// As a rule, the provider inputs returned by a call to `Check` should preserve the original representation of the
|
|
// properties as present in the program inputs. Though this rule is not required for correctness, violations thereof
|
|
// can negatively impact the end-user experience, as the provider inputs are used for detecting and rendering
|
|
// diffs.
|
|
Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error)
|
|
// `Diff` compares an existing ("old") set of resource properties with a new set of properties and computes the
|
|
// difference (if any) between them. `Diff` should only be called with values that have at some point been validated
|
|
// by a [](pulumirpc.ResourceProvider.Check) call.
|
|
Diff(ctx context.Context, in *DiffRequest, opts ...grpc.CallOption) (*DiffResponse, error)
|
|
// `Create` provisions a new instance of the specified [(custom) resource](custom-resources). It returns a
|
|
// provider-assigned ID for the resource as well as the output properties that arose from the creation properties.
|
|
// Output properties are typically the union of the resource's input properties and any additional values that were
|
|
// computed or made available during creation.
|
|
//
|
|
// If creation fails, `Create` may return an [](pulumirpc.ErrorResourceInitFailed) error detail explaining why.
|
|
// Moreover, if `Create` does return an error, it must be the case that the resource was *not* created (that is,
|
|
// `Create` can be thought of as transactional or atomic).
|
|
Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error)
|
|
// `Read` reads the current live state associated with a resource identified by the supplied state. The given state
|
|
// must be sufficient to uniquely identify the resource. This is typically just the resource ID, but may also
|
|
// include other properties.
|
|
Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadResponse, error)
|
|
// `Update` updates an existing resource according to a new set of inputs, returning a new set of output properties.
|
|
Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error)
|
|
// `Delete` deprovisions an existing resource as specified by its ID. `Delete` should be transactional/atomic -- if
|
|
// a call to `Delete` fails, it must be the case that the resource was *not* deleted and can be assumed to still
|
|
// exist.
|
|
Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
// `Construct` provisions a new [component resource](component-resources). Providers that implement `Construct` are
|
|
// referred to as [component providers](component-providers). `Construct` is to component resources what
|
|
// [](pulumirpc.ResourceProvider.Create) is to [custom resources](custom-resources). Components do not have any
|
|
// lifecycle of their own, and instead embody the lifecycles of the resources that they are composed of. As such,
|
|
// `Construct` is effectively a subprogram whose resources will be persisted in the caller's state. It is
|
|
// consequently passed enough information to manage fully these resources. At a high level, this comprises:
|
|
//
|
|
// * A [](pulumirpc.ResourceMonitor) endpoint which the provider can use to [register](resource-registration) nested
|
|
// custom or component resources that belong to the component.
|
|
//
|
|
// * A set of input properties.
|
|
//
|
|
// * A full set of [resource options](https://www.pulumi.com/docs/iac/concepts/options/) that the component should
|
|
// propagate to resources it registers against the supplied resource monitor.
|
|
Construct(ctx context.Context, in *ConstructRequest, opts ...grpc.CallOption) (*ConstructResponse, error)
|
|
// Cancel signals the provider to gracefully shut down and abort any ongoing resource operations.
|
|
// Operations aborted in this way will return an error (e.g., `Update` and `Create` will either return a
|
|
// creation error or an initialization error). Since Cancel is advisory and non-blocking, it is up
|
|
// to the host to decide how long to wait after Cancel is called before (e.g.)
|
|
// hard-closing any gRPC connection.
|
|
Cancel(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
// GetPluginInfo returns generic information about this plugin, like its version.
|
|
GetPluginInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PluginInfo, error)
|
|
// Attach sends the engine address to an already running plugin.
|
|
Attach(ctx context.Context, in *PluginAttach, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
// GetMapping fetches the mapping for this resource provider, if any. A provider should return an empty
|
|
// response (not an error) if it doesn't have a mapping for the given key.
|
|
GetMapping(ctx context.Context, in *GetMappingRequest, opts ...grpc.CallOption) (*GetMappingResponse, error)
|
|
// GetMappings is an optional method that returns what mappings (if any) a provider supports. If a provider does not
|
|
// implement this method the engine falls back to the old behaviour of just calling GetMapping without a name.
|
|
// If this method is implemented than the engine will then call GetMapping only with the names returned from this method.
|
|
GetMappings(ctx context.Context, in *GetMappingsRequest, opts ...grpc.CallOption) (*GetMappingsResponse, error)
|
|
}
|
|
|
|
type resourceProviderClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewResourceProviderClient(cc grpc.ClientConnInterface) ResourceProviderClient {
|
|
return &resourceProviderClient{cc}
|
|
}
|
|
|
|
func (c *resourceProviderClient) Parameterize(ctx context.Context, in *ParameterizeRequest, opts ...grpc.CallOption) (*ParameterizeResponse, error) {
|
|
out := new(ParameterizeResponse)
|
|
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceProvider/Parameterize", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *resourceProviderClient) GetSchema(ctx context.Context, in *GetSchemaRequest, opts ...grpc.CallOption) (*GetSchemaResponse, error) {
|
|
out := new(GetSchemaResponse)
|
|
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceProvider/GetSchema", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *resourceProviderClient) CheckConfig(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error) {
|
|
out := new(CheckResponse)
|
|
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceProvider/CheckConfig", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *resourceProviderClient) DiffConfig(ctx context.Context, in *DiffRequest, opts ...grpc.CallOption) (*DiffResponse, error) {
|
|
out := new(DiffResponse)
|
|
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceProvider/DiffConfig", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *resourceProviderClient) Configure(ctx context.Context, in *ConfigureRequest, opts ...grpc.CallOption) (*ConfigureResponse, error) {
|
|
out := new(ConfigureResponse)
|
|
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceProvider/Configure", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *resourceProviderClient) Invoke(ctx context.Context, in *InvokeRequest, opts ...grpc.CallOption) (*InvokeResponse, error) {
|
|
out := new(InvokeResponse)
|
|
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceProvider/Invoke", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *resourceProviderClient) StreamInvoke(ctx context.Context, in *InvokeRequest, opts ...grpc.CallOption) (ResourceProvider_StreamInvokeClient, error) {
|
|
stream, err := c.cc.NewStream(ctx, &ResourceProvider_ServiceDesc.Streams[0], "/pulumirpc.ResourceProvider/StreamInvoke", opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
x := &resourceProviderStreamInvokeClient{stream}
|
|
if err := x.ClientStream.SendMsg(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if err := x.ClientStream.CloseSend(); err != nil {
|
|
return nil, err
|
|
}
|
|
return x, nil
|
|
}
|
|
|
|
type ResourceProvider_StreamInvokeClient interface {
|
|
Recv() (*InvokeResponse, error)
|
|
grpc.ClientStream
|
|
}
|
|
|
|
type resourceProviderStreamInvokeClient struct {
|
|
grpc.ClientStream
|
|
}
|
|
|
|
func (x *resourceProviderStreamInvokeClient) Recv() (*InvokeResponse, error) {
|
|
m := new(InvokeResponse)
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
func (c *resourceProviderClient) Call(ctx context.Context, in *CallRequest, opts ...grpc.CallOption) (*CallResponse, error) {
|
|
out := new(CallResponse)
|
|
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceProvider/Call", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *resourceProviderClient) Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error) {
|
|
out := new(CheckResponse)
|
|
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceProvider/Check", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *resourceProviderClient) Diff(ctx context.Context, in *DiffRequest, opts ...grpc.CallOption) (*DiffResponse, error) {
|
|
out := new(DiffResponse)
|
|
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceProvider/Diff", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *resourceProviderClient) Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) {
|
|
out := new(CreateResponse)
|
|
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceProvider/Create", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *resourceProviderClient) Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadResponse, error) {
|
|
out := new(ReadResponse)
|
|
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceProvider/Read", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *resourceProviderClient) Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) {
|
|
out := new(UpdateResponse)
|
|
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceProvider/Update", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *resourceProviderClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceProvider/Delete", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *resourceProviderClient) Construct(ctx context.Context, in *ConstructRequest, opts ...grpc.CallOption) (*ConstructResponse, error) {
|
|
out := new(ConstructResponse)
|
|
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceProvider/Construct", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *resourceProviderClient) Cancel(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceProvider/Cancel", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *resourceProviderClient) GetPluginInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PluginInfo, error) {
|
|
out := new(PluginInfo)
|
|
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceProvider/GetPluginInfo", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *resourceProviderClient) Attach(ctx context.Context, in *PluginAttach, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceProvider/Attach", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *resourceProviderClient) GetMapping(ctx context.Context, in *GetMappingRequest, opts ...grpc.CallOption) (*GetMappingResponse, error) {
|
|
out := new(GetMappingResponse)
|
|
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceProvider/GetMapping", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *resourceProviderClient) GetMappings(ctx context.Context, in *GetMappingsRequest, opts ...grpc.CallOption) (*GetMappingsResponse, error) {
|
|
out := new(GetMappingsResponse)
|
|
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceProvider/GetMappings", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// ResourceProviderServer is the server API for ResourceProvider service.
|
|
// All implementations must embed UnimplementedResourceProviderServer
|
|
// for forward compatibility
|
|
type ResourceProviderServer interface {
|
|
// `Parameterize` is the primary means of supporting [parameterized providers](parameterized-providers), which allow
|
|
// a caller to change a provider's behavior ahead of its [configuration](pulumirpc.ResourceProvider.Configure) and
|
|
// subsequent use. Where a [](pulumirpc.ResourceProvider.Configure) call allows a caller to influence provider
|
|
// behaviour at a high level (e.g. by specifying the region in which an AWS provider should operate), a
|
|
// `Parameterize` call may change the set of resources and functions that a provider offers (that is, its schema).
|
|
// This is useful in any case where some "set" of providers can be captured by a single implementation that may
|
|
// power fundamentally different schemata -- dynamically bridging Terraform providers, or managing Kubernetes
|
|
// clusters with custom resource definitions, for instance, are good examples. The parameterized package that
|
|
// `Parameterize` yields is known as a *sub-package* of the original (unparameterized) package.
|
|
//
|
|
// `Parameterize` supports two types of parameterization:
|
|
//
|
|
// * *Replacement parameterization*, whereby a `Parameterize` call results in a schema that completely replaces the
|
|
// original provider schema. Bridging a Terraform provider dynamically might be an example of this -- following
|
|
// the call to `Parameterize`, the provider's schema will become that of the Terraform provider that was bridged.
|
|
// Providers that implement replacement parameterization expect a *single* call to `Parameterize`.
|
|
//
|
|
// * *Extension parameterization*, in which a `Parameterize` call results in a schema that is a superset of the
|
|
// original. This is useful in cases where a provider can be extended with additional resources or functions, such
|
|
// as a Kubernetes provider that can be extended with resources representing custom resource definitions.
|
|
// Providers that implement extension parameterization should accept multiple calls to `Parameterize`. Extension
|
|
// packages may even be called multiple times with the same package name, but with different versions. The CRUD
|
|
// operations of extension resources must include the version of which sub-package they correspond to.
|
|
//
|
|
// `Parameterize` should work the same whether it is provided with `ParametersArgs` or `ParametersValue` input. In
|
|
// each case it should return the sub-package name and version (which when a `ParametersValue` is supplied should
|
|
// match the given input).
|
|
Parameterize(context.Context, *ParameterizeRequest) (*ParameterizeResponse, error)
|
|
// GetSchema fetches the schema for this resource provider.
|
|
GetSchema(context.Context, *GetSchemaRequest) (*GetSchemaResponse, error)
|
|
// `CheckConfig` validates a set of configuration inputs that will be passed to this provider instance.
|
|
// `CheckConfig` is to provider resources what [](pulumirpc.ResourceProvider.Check) is to individual resources, and
|
|
// is the first stage in configuring (that is, eventually executing a [](pulumirpc.ResourceProvider.Configure) call)
|
|
// a provider using user-supplied values. In the case that provider inputs are coming from some source that has been
|
|
// checked previously (e.g. a Pulumi state), it is not necessary to call `CheckConfig`.
|
|
//
|
|
// A `CheckConfig` call returns either a set of checked, known-valid inputs that may subsequently be passed to
|
|
// [](pulumirpc.ResourceProvider.DiffConfig) and/or [](pulumirpc.ResourceProvider.Configure), or a set of errors
|
|
// explaining why the inputs are invalid. In the case that a set of inputs are successfully validated and returned,
|
|
// `CheckConfig` *may also populate default values* for provider configuration, returning them so that they may be
|
|
// passed to a subsequent [](pulumirpc.ResourceProvider.Configure) call and persisted in the Pulumi state. In the
|
|
// case that `CheckConfig` fails and returns a set of errors, it is expected that the caller (typically the Pulumi
|
|
// engine) will fail provider registration.
|
|
//
|
|
// As a rule, the provider inputs returned by a call to `CheckConfig` should preserve the original representation of
|
|
// the properties as present in the program inputs. Though this rule is not required for correctness, violations
|
|
// thereof can negatively impact the end-user experience, as the provider inputs are used for detecting and
|
|
// rendering diffs.
|
|
CheckConfig(context.Context, *CheckRequest) (*CheckResponse, error)
|
|
// `DiffConfig` compares an existing ("old") provider configuration with a new configuration and computes the
|
|
// difference (if any) between them. `DiffConfig` is to provider resources what [](pulumirpc.ResourceProvider.Diff)
|
|
// is to individual resources. `DiffConfig` should only be called with values that have at some point been validated
|
|
// by a [](pulumirpc.ResourceProvider.CheckConfig) call. The [](pulumirpc.DiffResponse) returned by a `DiffConfig`
|
|
// call is used primarily to determine whether or not the newly configured provider is capable of managing resources
|
|
// owned by the old provider. If `DiffConfig` indicates that the provider resource needs to be replaced, for
|
|
// instance, then all resources owned by that provider will *also* need to be replaced. Replacement semantics should
|
|
// thus be reserved for changes to configuration properties that are guaranteed to make old resources unmanageable.
|
|
// Changes to an AWS region, for example, will almost certainly require a provider replacement, but changes to an
|
|
// AWS access key, should almost certainly not.
|
|
DiffConfig(context.Context, *DiffRequest) (*DiffResponse, error)
|
|
// `Configure` is the final stage in configuring a provider instance. Callers supply two sets of data:
|
|
//
|
|
// * Provider-specific configuration, which is the set of inputs that have been validated by a previous
|
|
// [](pulumirpc.ResourceProvider.CheckConfig) call.
|
|
// * Provider-agnostic ("protocol") configuration, such as whether or not the caller supports secrets.
|
|
//
|
|
// The provider is expected to return its own set of protocol configuration, indicating which features it supports
|
|
// in turn so that the caller and the provider can interact appropriately.
|
|
//
|
|
// Providers may expect a *single* call to `Configure`. If a call to `Configure` is missing required configuration,
|
|
// the provider may return a set of error details containing [](pulumirpc.ConfigureErrorMissingKeys) values to
|
|
// indicate which keys are missing.
|
|
Configure(context.Context, *ConfigureRequest) (*ConfigureResponse, error)
|
|
// Invoke dynamically executes a built-in function in the provider.
|
|
Invoke(context.Context, *InvokeRequest) (*InvokeResponse, error)
|
|
// StreamInvoke dynamically executes a built-in function in the provider, which returns a stream
|
|
// of responses.
|
|
StreamInvoke(*InvokeRequest, ResourceProvider_StreamInvokeServer) error
|
|
// Call dynamically executes a method in the provider associated with a component resource.
|
|
Call(context.Context, *CallRequest) (*CallResponse, error)
|
|
// `Check` validates a set of input properties against a given resource type. A `Check` call returns either a set of
|
|
// checked, known-valid inputs that may subsequently be passed to [](pulumirpc.ResourceProvider.Diff),
|
|
// [](pulumirpc.ResourceProvider.Create), or [](pulumirpc.ResourceProvider.Update); or a set of errors explaining
|
|
// why the inputs are invalid. In the case that a set of inputs are successfully validated and returned, `Check`
|
|
// *may also populate default values* for resource inputs, returning them so that they may be passed to a subsequent
|
|
// call and persisted in the Pulumi state. In the case that `Check` fails and returns a set of errors, it is
|
|
// expected that the caller (typically the Pulumi engine) will fail resource registration.
|
|
//
|
|
// As a rule, the provider inputs returned by a call to `Check` should preserve the original representation of the
|
|
// properties as present in the program inputs. Though this rule is not required for correctness, violations thereof
|
|
// can negatively impact the end-user experience, as the provider inputs are used for detecting and rendering
|
|
// diffs.
|
|
Check(context.Context, *CheckRequest) (*CheckResponse, error)
|
|
// `Diff` compares an existing ("old") set of resource properties with a new set of properties and computes the
|
|
// difference (if any) between them. `Diff` should only be called with values that have at some point been validated
|
|
// by a [](pulumirpc.ResourceProvider.Check) call.
|
|
Diff(context.Context, *DiffRequest) (*DiffResponse, error)
|
|
// `Create` provisions a new instance of the specified [(custom) resource](custom-resources). It returns a
|
|
// provider-assigned ID for the resource as well as the output properties that arose from the creation properties.
|
|
// Output properties are typically the union of the resource's input properties and any additional values that were
|
|
// computed or made available during creation.
|
|
//
|
|
// If creation fails, `Create` may return an [](pulumirpc.ErrorResourceInitFailed) error detail explaining why.
|
|
// Moreover, if `Create` does return an error, it must be the case that the resource was *not* created (that is,
|
|
// `Create` can be thought of as transactional or atomic).
|
|
Create(context.Context, *CreateRequest) (*CreateResponse, error)
|
|
// `Read` reads the current live state associated with a resource identified by the supplied state. The given state
|
|
// must be sufficient to uniquely identify the resource. This is typically just the resource ID, but may also
|
|
// include other properties.
|
|
Read(context.Context, *ReadRequest) (*ReadResponse, error)
|
|
// `Update` updates an existing resource according to a new set of inputs, returning a new set of output properties.
|
|
Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
|
|
// `Delete` deprovisions an existing resource as specified by its ID. `Delete` should be transactional/atomic -- if
|
|
// a call to `Delete` fails, it must be the case that the resource was *not* deleted and can be assumed to still
|
|
// exist.
|
|
Delete(context.Context, *DeleteRequest) (*emptypb.Empty, error)
|
|
// `Construct` provisions a new [component resource](component-resources). Providers that implement `Construct` are
|
|
// referred to as [component providers](component-providers). `Construct` is to component resources what
|
|
// [](pulumirpc.ResourceProvider.Create) is to [custom resources](custom-resources). Components do not have any
|
|
// lifecycle of their own, and instead embody the lifecycles of the resources that they are composed of. As such,
|
|
// `Construct` is effectively a subprogram whose resources will be persisted in the caller's state. It is
|
|
// consequently passed enough information to manage fully these resources. At a high level, this comprises:
|
|
//
|
|
// * A [](pulumirpc.ResourceMonitor) endpoint which the provider can use to [register](resource-registration) nested
|
|
// custom or component resources that belong to the component.
|
|
//
|
|
// * A set of input properties.
|
|
//
|
|
// * A full set of [resource options](https://www.pulumi.com/docs/iac/concepts/options/) that the component should
|
|
// propagate to resources it registers against the supplied resource monitor.
|
|
Construct(context.Context, *ConstructRequest) (*ConstructResponse, error)
|
|
// Cancel signals the provider to gracefully shut down and abort any ongoing resource operations.
|
|
// Operations aborted in this way will return an error (e.g., `Update` and `Create` will either return a
|
|
// creation error or an initialization error). Since Cancel is advisory and non-blocking, it is up
|
|
// to the host to decide how long to wait after Cancel is called before (e.g.)
|
|
// hard-closing any gRPC connection.
|
|
Cancel(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
|
|
// GetPluginInfo returns generic information about this plugin, like its version.
|
|
GetPluginInfo(context.Context, *emptypb.Empty) (*PluginInfo, error)
|
|
// Attach sends the engine address to an already running plugin.
|
|
Attach(context.Context, *PluginAttach) (*emptypb.Empty, error)
|
|
// GetMapping fetches the mapping for this resource provider, if any. A provider should return an empty
|
|
// response (not an error) if it doesn't have a mapping for the given key.
|
|
GetMapping(context.Context, *GetMappingRequest) (*GetMappingResponse, error)
|
|
// GetMappings is an optional method that returns what mappings (if any) a provider supports. If a provider does not
|
|
// implement this method the engine falls back to the old behaviour of just calling GetMapping without a name.
|
|
// If this method is implemented than the engine will then call GetMapping only with the names returned from this method.
|
|
GetMappings(context.Context, *GetMappingsRequest) (*GetMappingsResponse, error)
|
|
mustEmbedUnimplementedResourceProviderServer()
|
|
}
|
|
|
|
// UnimplementedResourceProviderServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedResourceProviderServer struct {
|
|
}
|
|
|
|
func (UnimplementedResourceProviderServer) Parameterize(context.Context, *ParameterizeRequest) (*ParameterizeResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Parameterize not implemented")
|
|
}
|
|
func (UnimplementedResourceProviderServer) GetSchema(context.Context, *GetSchemaRequest) (*GetSchemaResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetSchema not implemented")
|
|
}
|
|
func (UnimplementedResourceProviderServer) CheckConfig(context.Context, *CheckRequest) (*CheckResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method CheckConfig not implemented")
|
|
}
|
|
func (UnimplementedResourceProviderServer) DiffConfig(context.Context, *DiffRequest) (*DiffResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method DiffConfig not implemented")
|
|
}
|
|
func (UnimplementedResourceProviderServer) Configure(context.Context, *ConfigureRequest) (*ConfigureResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Configure not implemented")
|
|
}
|
|
func (UnimplementedResourceProviderServer) Invoke(context.Context, *InvokeRequest) (*InvokeResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Invoke not implemented")
|
|
}
|
|
func (UnimplementedResourceProviderServer) StreamInvoke(*InvokeRequest, ResourceProvider_StreamInvokeServer) error {
|
|
return status.Errorf(codes.Unimplemented, "method StreamInvoke not implemented")
|
|
}
|
|
func (UnimplementedResourceProviderServer) Call(context.Context, *CallRequest) (*CallResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Call not implemented")
|
|
}
|
|
func (UnimplementedResourceProviderServer) Check(context.Context, *CheckRequest) (*CheckResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Check not implemented")
|
|
}
|
|
func (UnimplementedResourceProviderServer) Diff(context.Context, *DiffRequest) (*DiffResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Diff not implemented")
|
|
}
|
|
func (UnimplementedResourceProviderServer) Create(context.Context, *CreateRequest) (*CreateResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
|
|
}
|
|
func (UnimplementedResourceProviderServer) Read(context.Context, *ReadRequest) (*ReadResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Read not implemented")
|
|
}
|
|
func (UnimplementedResourceProviderServer) Update(context.Context, *UpdateRequest) (*UpdateResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
|
|
}
|
|
func (UnimplementedResourceProviderServer) Delete(context.Context, *DeleteRequest) (*emptypb.Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
|
|
}
|
|
func (UnimplementedResourceProviderServer) Construct(context.Context, *ConstructRequest) (*ConstructResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Construct not implemented")
|
|
}
|
|
func (UnimplementedResourceProviderServer) Cancel(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Cancel not implemented")
|
|
}
|
|
func (UnimplementedResourceProviderServer) GetPluginInfo(context.Context, *emptypb.Empty) (*PluginInfo, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetPluginInfo not implemented")
|
|
}
|
|
func (UnimplementedResourceProviderServer) Attach(context.Context, *PluginAttach) (*emptypb.Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Attach not implemented")
|
|
}
|
|
func (UnimplementedResourceProviderServer) GetMapping(context.Context, *GetMappingRequest) (*GetMappingResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetMapping not implemented")
|
|
}
|
|
func (UnimplementedResourceProviderServer) GetMappings(context.Context, *GetMappingsRequest) (*GetMappingsResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetMappings not implemented")
|
|
}
|
|
func (UnimplementedResourceProviderServer) mustEmbedUnimplementedResourceProviderServer() {}
|
|
|
|
// UnsafeResourceProviderServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to ResourceProviderServer will
|
|
// result in compilation errors.
|
|
type UnsafeResourceProviderServer interface {
|
|
mustEmbedUnimplementedResourceProviderServer()
|
|
}
|
|
|
|
func RegisterResourceProviderServer(s grpc.ServiceRegistrar, srv ResourceProviderServer) {
|
|
s.RegisterService(&ResourceProvider_ServiceDesc, srv)
|
|
}
|
|
|
|
func _ResourceProvider_Parameterize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ParameterizeRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ResourceProviderServer).Parameterize(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/pulumirpc.ResourceProvider/Parameterize",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ResourceProviderServer).Parameterize(ctx, req.(*ParameterizeRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ResourceProvider_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.(ResourceProviderServer).GetSchema(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/pulumirpc.ResourceProvider/GetSchema",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ResourceProviderServer).GetSchema(ctx, req.(*GetSchemaRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ResourceProvider_CheckConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CheckRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ResourceProviderServer).CheckConfig(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/pulumirpc.ResourceProvider/CheckConfig",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ResourceProviderServer).CheckConfig(ctx, req.(*CheckRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ResourceProvider_DiffConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DiffRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ResourceProviderServer).DiffConfig(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/pulumirpc.ResourceProvider/DiffConfig",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ResourceProviderServer).DiffConfig(ctx, req.(*DiffRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ResourceProvider_Configure_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ConfigureRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ResourceProviderServer).Configure(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/pulumirpc.ResourceProvider/Configure",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ResourceProviderServer).Configure(ctx, req.(*ConfigureRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ResourceProvider_Invoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(InvokeRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ResourceProviderServer).Invoke(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/pulumirpc.ResourceProvider/Invoke",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ResourceProviderServer).Invoke(ctx, req.(*InvokeRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ResourceProvider_StreamInvoke_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
m := new(InvokeRequest)
|
|
if err := stream.RecvMsg(m); err != nil {
|
|
return err
|
|
}
|
|
return srv.(ResourceProviderServer).StreamInvoke(m, &resourceProviderStreamInvokeServer{stream})
|
|
}
|
|
|
|
type ResourceProvider_StreamInvokeServer interface {
|
|
Send(*InvokeResponse) error
|
|
grpc.ServerStream
|
|
}
|
|
|
|
type resourceProviderStreamInvokeServer struct {
|
|
grpc.ServerStream
|
|
}
|
|
|
|
func (x *resourceProviderStreamInvokeServer) Send(m *InvokeResponse) error {
|
|
return x.ServerStream.SendMsg(m)
|
|
}
|
|
|
|
func _ResourceProvider_Call_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CallRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ResourceProviderServer).Call(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/pulumirpc.ResourceProvider/Call",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ResourceProviderServer).Call(ctx, req.(*CallRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ResourceProvider_Check_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CheckRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ResourceProviderServer).Check(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/pulumirpc.ResourceProvider/Check",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ResourceProviderServer).Check(ctx, req.(*CheckRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ResourceProvider_Diff_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DiffRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ResourceProviderServer).Diff(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/pulumirpc.ResourceProvider/Diff",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ResourceProviderServer).Diff(ctx, req.(*DiffRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ResourceProvider_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CreateRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ResourceProviderServer).Create(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/pulumirpc.ResourceProvider/Create",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ResourceProviderServer).Create(ctx, req.(*CreateRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ResourceProvider_Read_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ReadRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ResourceProviderServer).Read(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/pulumirpc.ResourceProvider/Read",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ResourceProviderServer).Read(ctx, req.(*ReadRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ResourceProvider_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UpdateRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ResourceProviderServer).Update(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/pulumirpc.ResourceProvider/Update",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ResourceProviderServer).Update(ctx, req.(*UpdateRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ResourceProvider_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeleteRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ResourceProviderServer).Delete(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/pulumirpc.ResourceProvider/Delete",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ResourceProviderServer).Delete(ctx, req.(*DeleteRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ResourceProvider_Construct_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ConstructRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ResourceProviderServer).Construct(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/pulumirpc.ResourceProvider/Construct",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ResourceProviderServer).Construct(ctx, req.(*ConstructRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ResourceProvider_Cancel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(emptypb.Empty)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ResourceProviderServer).Cancel(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/pulumirpc.ResourceProvider/Cancel",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ResourceProviderServer).Cancel(ctx, req.(*emptypb.Empty))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ResourceProvider_GetPluginInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(emptypb.Empty)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ResourceProviderServer).GetPluginInfo(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/pulumirpc.ResourceProvider/GetPluginInfo",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ResourceProviderServer).GetPluginInfo(ctx, req.(*emptypb.Empty))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ResourceProvider_Attach_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(PluginAttach)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ResourceProviderServer).Attach(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/pulumirpc.ResourceProvider/Attach",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ResourceProviderServer).Attach(ctx, req.(*PluginAttach))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ResourceProvider_GetMapping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetMappingRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ResourceProviderServer).GetMapping(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/pulumirpc.ResourceProvider/GetMapping",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ResourceProviderServer).GetMapping(ctx, req.(*GetMappingRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ResourceProvider_GetMappings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetMappingsRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ResourceProviderServer).GetMappings(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/pulumirpc.ResourceProvider/GetMappings",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ResourceProviderServer).GetMappings(ctx, req.(*GetMappingsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// ResourceProvider_ServiceDesc is the grpc.ServiceDesc for ResourceProvider service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var ResourceProvider_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "pulumirpc.ResourceProvider",
|
|
HandlerType: (*ResourceProviderServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Parameterize",
|
|
Handler: _ResourceProvider_Parameterize_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetSchema",
|
|
Handler: _ResourceProvider_GetSchema_Handler,
|
|
},
|
|
{
|
|
MethodName: "CheckConfig",
|
|
Handler: _ResourceProvider_CheckConfig_Handler,
|
|
},
|
|
{
|
|
MethodName: "DiffConfig",
|
|
Handler: _ResourceProvider_DiffConfig_Handler,
|
|
},
|
|
{
|
|
MethodName: "Configure",
|
|
Handler: _ResourceProvider_Configure_Handler,
|
|
},
|
|
{
|
|
MethodName: "Invoke",
|
|
Handler: _ResourceProvider_Invoke_Handler,
|
|
},
|
|
{
|
|
MethodName: "Call",
|
|
Handler: _ResourceProvider_Call_Handler,
|
|
},
|
|
{
|
|
MethodName: "Check",
|
|
Handler: _ResourceProvider_Check_Handler,
|
|
},
|
|
{
|
|
MethodName: "Diff",
|
|
Handler: _ResourceProvider_Diff_Handler,
|
|
},
|
|
{
|
|
MethodName: "Create",
|
|
Handler: _ResourceProvider_Create_Handler,
|
|
},
|
|
{
|
|
MethodName: "Read",
|
|
Handler: _ResourceProvider_Read_Handler,
|
|
},
|
|
{
|
|
MethodName: "Update",
|
|
Handler: _ResourceProvider_Update_Handler,
|
|
},
|
|
{
|
|
MethodName: "Delete",
|
|
Handler: _ResourceProvider_Delete_Handler,
|
|
},
|
|
{
|
|
MethodName: "Construct",
|
|
Handler: _ResourceProvider_Construct_Handler,
|
|
},
|
|
{
|
|
MethodName: "Cancel",
|
|
Handler: _ResourceProvider_Cancel_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetPluginInfo",
|
|
Handler: _ResourceProvider_GetPluginInfo_Handler,
|
|
},
|
|
{
|
|
MethodName: "Attach",
|
|
Handler: _ResourceProvider_Attach_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetMapping",
|
|
Handler: _ResourceProvider_GetMapping_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetMappings",
|
|
Handler: _ResourceProvider_GetMappings_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{
|
|
{
|
|
StreamName: "StreamInvoke",
|
|
Handler: _ResourceProvider_StreamInvoke_Handler,
|
|
ServerStreams: true,
|
|
},
|
|
},
|
|
Metadata: "pulumi/provider.proto",
|
|
}
|