These changes restore a more-correct version of the behavior that was disabled with #3014. The original implementation of this behavior was done in the SDKs, which do not have access to the complete inputs for a resource (in particular, default values filled in by the provider during `Check` are not exposed to the SDK). This lack of information meant that the resolved output values could disagree with the typings present in a provider SDK. Exacerbating this problem was the fact that unknown values were dropped entirely, causing `undefined` values to appear in unexpected places. By doing this in the engine and allowing unknown values to be represented in a first-class manner in the SDK, we can attack both of these issues. Although this behavior is not _strictly_ consistent with respect to the resource model--in an update, a resource's output properties will come from its provider and may differ from its input properties--this behavior was present in the product for a fairly long time without significant issues. In the future, we may be able to improve the accuracy of resource outputs during a preview by allowing the provider to dry-run CRUD operations and return partially-known values where possible. These changes also introduce new APIs in the Node and Python SDKs that work with unknown values in a first-class fashion: - A new parameter to the `apply` function that indicates that the callback should be run even if the result of the apply contains unknown values - `containsUnknowns` and `isUnknown`, which return true if a value either contains nested unknown values or is exactly an unknown value - The `Unknown` type, which represents unknown values The primary use case for these APIs is to allow nested, properties with known values to be accessed via the lifted property accessor even when the containing property is not fully know. A common example of this pattern is the `metadata.name` property of a Kubernetes `Namespace` object: while other properties of the `metadata` bag may be unknown, `name` is often known. These APIs allow `ns.metadata.name` to return a known value in this case. In order to avoid exposing downlevel SDKs to unknown values--a change which could break user code by exposing it to unexpected values--a language SDK must indicate whether or not it supports first-class unknown values as part of each `RegisterResourceRequest`. These changes also allow us to avoid breaking user code with the new behavior introduced by the prior commit. Fixes #3190.
670 lines
25 KiB
Go
670 lines
25 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// source: analyzer.proto
|
|
|
|
package pulumirpc
|
|
|
|
import proto "github.com/golang/protobuf/proto"
|
|
import fmt "fmt"
|
|
import math "math"
|
|
import empty "github.com/golang/protobuf/ptypes/empty"
|
|
import _struct "github.com/golang/protobuf/ptypes/struct"
|
|
|
|
import (
|
|
context "golang.org/x/net/context"
|
|
grpc "google.golang.org/grpc"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
|
|
|
// EnforcementLevel indicates the severity of a policy violation.
|
|
type EnforcementLevel int32
|
|
|
|
const (
|
|
EnforcementLevel_ADVISORY EnforcementLevel = 0
|
|
EnforcementLevel_MANDATORY EnforcementLevel = 1
|
|
)
|
|
|
|
var EnforcementLevel_name = map[int32]string{
|
|
0: "ADVISORY",
|
|
1: "MANDATORY",
|
|
}
|
|
var EnforcementLevel_value = map[string]int32{
|
|
"ADVISORY": 0,
|
|
"MANDATORY": 1,
|
|
}
|
|
|
|
func (x EnforcementLevel) String() string {
|
|
return proto.EnumName(EnforcementLevel_name, int32(x))
|
|
}
|
|
func (EnforcementLevel) EnumDescriptor() ([]byte, []int) {
|
|
return fileDescriptor_analyzer_cc9701a1adb279ab, []int{0}
|
|
}
|
|
|
|
type AnalyzeRequest struct {
|
|
Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"`
|
|
Properties *_struct.Struct `protobuf:"bytes,2,opt,name=properties" json:"properties,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *AnalyzeRequest) Reset() { *m = AnalyzeRequest{} }
|
|
func (m *AnalyzeRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*AnalyzeRequest) ProtoMessage() {}
|
|
func (*AnalyzeRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_analyzer_cc9701a1adb279ab, []int{0}
|
|
}
|
|
func (m *AnalyzeRequest) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_AnalyzeRequest.Unmarshal(m, b)
|
|
}
|
|
func (m *AnalyzeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_AnalyzeRequest.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *AnalyzeRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_AnalyzeRequest.Merge(dst, src)
|
|
}
|
|
func (m *AnalyzeRequest) XXX_Size() int {
|
|
return xxx_messageInfo_AnalyzeRequest.Size(m)
|
|
}
|
|
func (m *AnalyzeRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_AnalyzeRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_AnalyzeRequest proto.InternalMessageInfo
|
|
|
|
func (m *AnalyzeRequest) GetType() string {
|
|
if m != nil {
|
|
return m.Type
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *AnalyzeRequest) GetProperties() *_struct.Struct {
|
|
if m != nil {
|
|
return m.Properties
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// Resource defines the view of a Pulumi-managed resource as sent to Analyzers. The properties
|
|
// of the resource are specific to the type of analysis being performed. See the Analyzer
|
|
// service definition for more information.
|
|
type AnalyzerResource struct {
|
|
Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"`
|
|
Properties *_struct.Struct `protobuf:"bytes,2,opt,name=properties" json:"properties,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *AnalyzerResource) Reset() { *m = AnalyzerResource{} }
|
|
func (m *AnalyzerResource) String() string { return proto.CompactTextString(m) }
|
|
func (*AnalyzerResource) ProtoMessage() {}
|
|
func (*AnalyzerResource) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_analyzer_cc9701a1adb279ab, []int{1}
|
|
}
|
|
func (m *AnalyzerResource) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_AnalyzerResource.Unmarshal(m, b)
|
|
}
|
|
func (m *AnalyzerResource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_AnalyzerResource.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *AnalyzerResource) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_AnalyzerResource.Merge(dst, src)
|
|
}
|
|
func (m *AnalyzerResource) XXX_Size() int {
|
|
return xxx_messageInfo_AnalyzerResource.Size(m)
|
|
}
|
|
func (m *AnalyzerResource) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_AnalyzerResource.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_AnalyzerResource proto.InternalMessageInfo
|
|
|
|
func (m *AnalyzerResource) GetType() string {
|
|
if m != nil {
|
|
return m.Type
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *AnalyzerResource) GetProperties() *_struct.Struct {
|
|
if m != nil {
|
|
return m.Properties
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type AnalyzeStackRequest struct {
|
|
Resources []*AnalyzerResource `protobuf:"bytes,1,rep,name=resources" json:"resources,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *AnalyzeStackRequest) Reset() { *m = AnalyzeStackRequest{} }
|
|
func (m *AnalyzeStackRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*AnalyzeStackRequest) ProtoMessage() {}
|
|
func (*AnalyzeStackRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_analyzer_cc9701a1adb279ab, []int{2}
|
|
}
|
|
func (m *AnalyzeStackRequest) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_AnalyzeStackRequest.Unmarshal(m, b)
|
|
}
|
|
func (m *AnalyzeStackRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_AnalyzeStackRequest.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *AnalyzeStackRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_AnalyzeStackRequest.Merge(dst, src)
|
|
}
|
|
func (m *AnalyzeStackRequest) XXX_Size() int {
|
|
return xxx_messageInfo_AnalyzeStackRequest.Size(m)
|
|
}
|
|
func (m *AnalyzeStackRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_AnalyzeStackRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_AnalyzeStackRequest proto.InternalMessageInfo
|
|
|
|
func (m *AnalyzeStackRequest) GetResources() []*AnalyzerResource {
|
|
if m != nil {
|
|
return m.Resources
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type AnalyzeResponse struct {
|
|
Diagnostics []*AnalyzeDiagnostic `protobuf:"bytes,2,rep,name=diagnostics" json:"diagnostics,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *AnalyzeResponse) Reset() { *m = AnalyzeResponse{} }
|
|
func (m *AnalyzeResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*AnalyzeResponse) ProtoMessage() {}
|
|
func (*AnalyzeResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_analyzer_cc9701a1adb279ab, []int{3}
|
|
}
|
|
func (m *AnalyzeResponse) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_AnalyzeResponse.Unmarshal(m, b)
|
|
}
|
|
func (m *AnalyzeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_AnalyzeResponse.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *AnalyzeResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_AnalyzeResponse.Merge(dst, src)
|
|
}
|
|
func (m *AnalyzeResponse) XXX_Size() int {
|
|
return xxx_messageInfo_AnalyzeResponse.Size(m)
|
|
}
|
|
func (m *AnalyzeResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_AnalyzeResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_AnalyzeResponse proto.InternalMessageInfo
|
|
|
|
func (m *AnalyzeResponse) GetDiagnostics() []*AnalyzeDiagnostic {
|
|
if m != nil {
|
|
return m.Diagnostics
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type AnalyzeDiagnostic struct {
|
|
PolicyName string `protobuf:"bytes,1,opt,name=policyName" json:"policyName,omitempty"`
|
|
PolicyPackName string `protobuf:"bytes,2,opt,name=policyPackName" json:"policyPackName,omitempty"`
|
|
PolicyPackVersion string `protobuf:"bytes,3,opt,name=policyPackVersion" json:"policyPackVersion,omitempty"`
|
|
Description string `protobuf:"bytes,4,opt,name=description" json:"description,omitempty"`
|
|
Message string `protobuf:"bytes,5,opt,name=message" json:"message,omitempty"`
|
|
Tags []string `protobuf:"bytes,6,rep,name=tags" json:"tags,omitempty"`
|
|
EnforcementLevel EnforcementLevel `protobuf:"varint,7,opt,name=enforcementLevel,enum=pulumirpc.EnforcementLevel" json:"enforcementLevel,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *AnalyzeDiagnostic) Reset() { *m = AnalyzeDiagnostic{} }
|
|
func (m *AnalyzeDiagnostic) String() string { return proto.CompactTextString(m) }
|
|
func (*AnalyzeDiagnostic) ProtoMessage() {}
|
|
func (*AnalyzeDiagnostic) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_analyzer_cc9701a1adb279ab, []int{4}
|
|
}
|
|
func (m *AnalyzeDiagnostic) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_AnalyzeDiagnostic.Unmarshal(m, b)
|
|
}
|
|
func (m *AnalyzeDiagnostic) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_AnalyzeDiagnostic.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *AnalyzeDiagnostic) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_AnalyzeDiagnostic.Merge(dst, src)
|
|
}
|
|
func (m *AnalyzeDiagnostic) XXX_Size() int {
|
|
return xxx_messageInfo_AnalyzeDiagnostic.Size(m)
|
|
}
|
|
func (m *AnalyzeDiagnostic) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_AnalyzeDiagnostic.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_AnalyzeDiagnostic proto.InternalMessageInfo
|
|
|
|
func (m *AnalyzeDiagnostic) GetPolicyName() string {
|
|
if m != nil {
|
|
return m.PolicyName
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *AnalyzeDiagnostic) GetPolicyPackName() string {
|
|
if m != nil {
|
|
return m.PolicyPackName
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *AnalyzeDiagnostic) GetPolicyPackVersion() string {
|
|
if m != nil {
|
|
return m.PolicyPackVersion
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *AnalyzeDiagnostic) GetDescription() string {
|
|
if m != nil {
|
|
return m.Description
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *AnalyzeDiagnostic) GetMessage() string {
|
|
if m != nil {
|
|
return m.Message
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *AnalyzeDiagnostic) GetTags() []string {
|
|
if m != nil {
|
|
return m.Tags
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *AnalyzeDiagnostic) GetEnforcementLevel() EnforcementLevel {
|
|
if m != nil {
|
|
return m.EnforcementLevel
|
|
}
|
|
return EnforcementLevel_ADVISORY
|
|
}
|
|
|
|
// AnalyzerInfo provides metadata about a PolicyPack inside an analyzer.
|
|
type AnalyzerInfo struct {
|
|
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
|
|
DisplayName string `protobuf:"bytes,2,opt,name=displayName" json:"displayName,omitempty"`
|
|
Policies []*PolicyInfo `protobuf:"bytes,3,rep,name=policies" json:"policies,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *AnalyzerInfo) Reset() { *m = AnalyzerInfo{} }
|
|
func (m *AnalyzerInfo) String() string { return proto.CompactTextString(m) }
|
|
func (*AnalyzerInfo) ProtoMessage() {}
|
|
func (*AnalyzerInfo) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_analyzer_cc9701a1adb279ab, []int{5}
|
|
}
|
|
func (m *AnalyzerInfo) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_AnalyzerInfo.Unmarshal(m, b)
|
|
}
|
|
func (m *AnalyzerInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_AnalyzerInfo.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *AnalyzerInfo) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_AnalyzerInfo.Merge(dst, src)
|
|
}
|
|
func (m *AnalyzerInfo) XXX_Size() int {
|
|
return xxx_messageInfo_AnalyzerInfo.Size(m)
|
|
}
|
|
func (m *AnalyzerInfo) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_AnalyzerInfo.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_AnalyzerInfo proto.InternalMessageInfo
|
|
|
|
func (m *AnalyzerInfo) GetName() string {
|
|
if m != nil {
|
|
return m.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *AnalyzerInfo) GetDisplayName() string {
|
|
if m != nil {
|
|
return m.DisplayName
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *AnalyzerInfo) GetPolicies() []*PolicyInfo {
|
|
if m != nil {
|
|
return m.Policies
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// PolicyInfo provides metadata about an individual Policy within a Policy Pack.
|
|
type PolicyInfo struct {
|
|
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
|
|
DisplayName string `protobuf:"bytes,2,opt,name=displayName" json:"displayName,omitempty"`
|
|
Description string `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"`
|
|
Message string `protobuf:"bytes,4,opt,name=message" json:"message,omitempty"`
|
|
EnforcementLevel EnforcementLevel `protobuf:"varint,5,opt,name=enforcementLevel,enum=pulumirpc.EnforcementLevel" json:"enforcementLevel,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *PolicyInfo) Reset() { *m = PolicyInfo{} }
|
|
func (m *PolicyInfo) String() string { return proto.CompactTextString(m) }
|
|
func (*PolicyInfo) ProtoMessage() {}
|
|
func (*PolicyInfo) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_analyzer_cc9701a1adb279ab, []int{6}
|
|
}
|
|
func (m *PolicyInfo) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_PolicyInfo.Unmarshal(m, b)
|
|
}
|
|
func (m *PolicyInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_PolicyInfo.Marshal(b, m, deterministic)
|
|
}
|
|
func (dst *PolicyInfo) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_PolicyInfo.Merge(dst, src)
|
|
}
|
|
func (m *PolicyInfo) XXX_Size() int {
|
|
return xxx_messageInfo_PolicyInfo.Size(m)
|
|
}
|
|
func (m *PolicyInfo) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_PolicyInfo.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_PolicyInfo proto.InternalMessageInfo
|
|
|
|
func (m *PolicyInfo) GetName() string {
|
|
if m != nil {
|
|
return m.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *PolicyInfo) GetDisplayName() string {
|
|
if m != nil {
|
|
return m.DisplayName
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *PolicyInfo) GetDescription() string {
|
|
if m != nil {
|
|
return m.Description
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *PolicyInfo) GetMessage() string {
|
|
if m != nil {
|
|
return m.Message
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *PolicyInfo) GetEnforcementLevel() EnforcementLevel {
|
|
if m != nil {
|
|
return m.EnforcementLevel
|
|
}
|
|
return EnforcementLevel_ADVISORY
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*AnalyzeRequest)(nil), "pulumirpc.AnalyzeRequest")
|
|
proto.RegisterType((*AnalyzerResource)(nil), "pulumirpc.AnalyzerResource")
|
|
proto.RegisterType((*AnalyzeStackRequest)(nil), "pulumirpc.AnalyzeStackRequest")
|
|
proto.RegisterType((*AnalyzeResponse)(nil), "pulumirpc.AnalyzeResponse")
|
|
proto.RegisterType((*AnalyzeDiagnostic)(nil), "pulumirpc.AnalyzeDiagnostic")
|
|
proto.RegisterType((*AnalyzerInfo)(nil), "pulumirpc.AnalyzerInfo")
|
|
proto.RegisterType((*PolicyInfo)(nil), "pulumirpc.PolicyInfo")
|
|
proto.RegisterEnum("pulumirpc.EnforcementLevel", EnforcementLevel_name, EnforcementLevel_value)
|
|
}
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ context.Context
|
|
var _ grpc.ClientConn
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
const _ = grpc.SupportPackageIsVersion4
|
|
|
|
// Client API for Analyzer service
|
|
|
|
type AnalyzerClient interface {
|
|
// Analyze analyzes a single resource object, and returns any errors that it finds.
|
|
// Called with the "inputs" to the resource, before it is updated.
|
|
Analyze(ctx context.Context, in *AnalyzeRequest, opts ...grpc.CallOption) (*AnalyzeResponse, error)
|
|
// AnalyzeStack analyzes all resources within a stack, at the end of a successful
|
|
// preview or update. The provided resources are the "outputs", after any mutations
|
|
// have taken place.
|
|
AnalyzeStack(ctx context.Context, in *AnalyzeStackRequest, opts ...grpc.CallOption) (*AnalyzeResponse, error)
|
|
// GetAnalyzerInfo returns metadata about the analyzer (e.g., list of policies contained).
|
|
GetAnalyzerInfo(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*AnalyzerInfo, error)
|
|
// GetPluginInfo returns generic information about this plugin, like its version.
|
|
GetPluginInfo(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*PluginInfo, error)
|
|
}
|
|
|
|
type analyzerClient struct {
|
|
cc *grpc.ClientConn
|
|
}
|
|
|
|
func NewAnalyzerClient(cc *grpc.ClientConn) AnalyzerClient {
|
|
return &analyzerClient{cc}
|
|
}
|
|
|
|
func (c *analyzerClient) Analyze(ctx context.Context, in *AnalyzeRequest, opts ...grpc.CallOption) (*AnalyzeResponse, error) {
|
|
out := new(AnalyzeResponse)
|
|
err := grpc.Invoke(ctx, "/pulumirpc.Analyzer/Analyze", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *analyzerClient) AnalyzeStack(ctx context.Context, in *AnalyzeStackRequest, opts ...grpc.CallOption) (*AnalyzeResponse, error) {
|
|
out := new(AnalyzeResponse)
|
|
err := grpc.Invoke(ctx, "/pulumirpc.Analyzer/AnalyzeStack", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *analyzerClient) GetAnalyzerInfo(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*AnalyzerInfo, error) {
|
|
out := new(AnalyzerInfo)
|
|
err := grpc.Invoke(ctx, "/pulumirpc.Analyzer/GetAnalyzerInfo", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *analyzerClient) GetPluginInfo(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*PluginInfo, error) {
|
|
out := new(PluginInfo)
|
|
err := grpc.Invoke(ctx, "/pulumirpc.Analyzer/GetPluginInfo", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// Server API for Analyzer service
|
|
|
|
type AnalyzerServer interface {
|
|
// Analyze analyzes a single resource object, and returns any errors that it finds.
|
|
// Called with the "inputs" to the resource, before it is updated.
|
|
Analyze(context.Context, *AnalyzeRequest) (*AnalyzeResponse, error)
|
|
// AnalyzeStack analyzes all resources within a stack, at the end of a successful
|
|
// preview or update. The provided resources are the "outputs", after any mutations
|
|
// have taken place.
|
|
AnalyzeStack(context.Context, *AnalyzeStackRequest) (*AnalyzeResponse, error)
|
|
// GetAnalyzerInfo returns metadata about the analyzer (e.g., list of policies contained).
|
|
GetAnalyzerInfo(context.Context, *empty.Empty) (*AnalyzerInfo, error)
|
|
// GetPluginInfo returns generic information about this plugin, like its version.
|
|
GetPluginInfo(context.Context, *empty.Empty) (*PluginInfo, error)
|
|
}
|
|
|
|
func RegisterAnalyzerServer(s *grpc.Server, srv AnalyzerServer) {
|
|
s.RegisterService(&_Analyzer_serviceDesc, srv)
|
|
}
|
|
|
|
func _Analyzer_Analyze_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(AnalyzeRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AnalyzerServer).Analyze(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/pulumirpc.Analyzer/Analyze",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AnalyzerServer).Analyze(ctx, req.(*AnalyzeRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Analyzer_AnalyzeStack_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(AnalyzeStackRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AnalyzerServer).AnalyzeStack(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/pulumirpc.Analyzer/AnalyzeStack",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AnalyzerServer).AnalyzeStack(ctx, req.(*AnalyzeStackRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Analyzer_GetAnalyzerInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(empty.Empty)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AnalyzerServer).GetAnalyzerInfo(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/pulumirpc.Analyzer/GetAnalyzerInfo",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AnalyzerServer).GetAnalyzerInfo(ctx, req.(*empty.Empty))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Analyzer_GetPluginInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(empty.Empty)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AnalyzerServer).GetPluginInfo(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/pulumirpc.Analyzer/GetPluginInfo",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AnalyzerServer).GetPluginInfo(ctx, req.(*empty.Empty))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
var _Analyzer_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "pulumirpc.Analyzer",
|
|
HandlerType: (*AnalyzerServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Analyze",
|
|
Handler: _Analyzer_Analyze_Handler,
|
|
},
|
|
{
|
|
MethodName: "AnalyzeStack",
|
|
Handler: _Analyzer_AnalyzeStack_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetAnalyzerInfo",
|
|
Handler: _Analyzer_GetAnalyzerInfo_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetPluginInfo",
|
|
Handler: _Analyzer_GetPluginInfo_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "analyzer.proto",
|
|
}
|
|
|
|
func init() { proto.RegisterFile("analyzer.proto", fileDescriptor_analyzer_cc9701a1adb279ab) }
|
|
|
|
var fileDescriptor_analyzer_cc9701a1adb279ab = []byte{
|
|
// 560 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x54, 0x5d, 0x6f, 0xd3, 0x30,
|
|
0x14, 0xed, 0xd7, 0xd6, 0xf5, 0xae, 0xeb, 0x3a, 0x23, 0x58, 0xe8, 0xa6, 0x69, 0xca, 0x03, 0x42,
|
|
0x08, 0xa5, 0x62, 0x3c, 0x20, 0x5e, 0x10, 0x45, 0x9d, 0xa6, 0x49, 0x63, 0x94, 0x14, 0x4d, 0xe2,
|
|
0x01, 0xa1, 0x2c, 0xdc, 0x45, 0x11, 0x69, 0x6c, 0x6c, 0x07, 0x54, 0x7e, 0x0e, 0xe2, 0xbf, 0xf0,
|
|
0xb7, 0xb0, 0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