2018-06-26 20:14:03 +02:00
|
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
// source: analyzer.proto
|
|
|
|
|
2018-07-12 03:07:50 +02:00
|
|
|
package pulumirpc
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
|
|
|
|
import (
|
2020-02-28 12:53:47 +01:00
|
|
|
context "context"
|
|
|
|
fmt "fmt"
|
|
|
|
proto "github.com/golang/protobuf/proto"
|
|
|
|
empty "github.com/golang/protobuf/ptypes/empty"
|
|
|
|
_struct "github.com/golang/protobuf/ptypes/struct"
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
grpc "google.golang.org/grpc"
|
2020-02-28 12:53:47 +01:00
|
|
|
codes "google.golang.org/grpc/codes"
|
|
|
|
status "google.golang.org/grpc/status"
|
|
|
|
math "math"
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
// 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.
|
2020-02-28 12:53:47 +01:00
|
|
|
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
|
2019-06-11 00:20:22 +02:00
|
|
|
// EnforcementLevel indicates the severity of a policy violation.
|
2019-06-24 02:51:15 +02:00
|
|
|
type EnforcementLevel int32
|
2019-06-11 00:20:22 +02:00
|
|
|
|
|
|
|
const (
|
2019-06-24 02:51:15 +02:00
|
|
|
EnforcementLevel_ADVISORY EnforcementLevel = 0
|
|
|
|
EnforcementLevel_MANDATORY EnforcementLevel = 1
|
2020-03-08 22:11:55 +01:00
|
|
|
EnforcementLevel_DISABLED EnforcementLevel = 2
|
2019-06-11 00:20:22 +02:00
|
|
|
)
|
|
|
|
|
2019-06-24 02:51:15 +02:00
|
|
|
var EnforcementLevel_name = map[int32]string{
|
|
|
|
0: "ADVISORY",
|
|
|
|
1: "MANDATORY",
|
2020-03-08 22:11:55 +01:00
|
|
|
2: "DISABLED",
|
2019-06-11 00:20:22 +02:00
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
|
2019-06-24 02:51:15 +02:00
|
|
|
var EnforcementLevel_value = map[string]int32{
|
|
|
|
"ADVISORY": 0,
|
|
|
|
"MANDATORY": 1,
|
2020-03-08 22:11:55 +01:00
|
|
|
"DISABLED": 2,
|
2019-06-11 00:20:22 +02:00
|
|
|
}
|
|
|
|
|
2019-06-24 02:51:15 +02:00
|
|
|
func (x EnforcementLevel) String() string {
|
|
|
|
return proto.EnumName(EnforcementLevel_name, int32(x))
|
2019-06-11 00:20:22 +02:00
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
|
2019-06-24 02:51:15 +02:00
|
|
|
func (EnforcementLevel) EnumDescriptor() ([]byte, []int) {
|
2020-02-28 12:53:47 +01:00
|
|
|
return fileDescriptor_fadbb7eccb91f143, []int{0}
|
2019-06-11 00:20:22 +02:00
|
|
|
}
|
|
|
|
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
type AnalyzeRequest struct {
|
2020-02-28 12:53:47 +01:00
|
|
|
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
|
|
|
|
Properties *_struct.Struct `protobuf:"bytes,2,opt,name=properties,proto3" json:"properties,omitempty"`
|
|
|
|
Urn string `protobuf:"bytes,3,opt,name=urn,proto3" json:"urn,omitempty"`
|
|
|
|
Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
|
|
|
|
Options *AnalyzerResourceOptions `protobuf:"bytes,5,opt,name=options,proto3" json:"options,omitempty"`
|
|
|
|
Provider *AnalyzerProviderResource `protobuf:"bytes,6,opt,name=provider,proto3" json:"provider,omitempty"`
|
2020-02-08 01:11:34 +01:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
}
|
|
|
|
|
2018-07-12 03:07:50 +02:00
|
|
|
func (m *AnalyzeRequest) Reset() { *m = AnalyzeRequest{} }
|
|
|
|
func (m *AnalyzeRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*AnalyzeRequest) ProtoMessage() {}
|
|
|
|
func (*AnalyzeRequest) Descriptor() ([]byte, []int) {
|
2020-02-28 12:53:47 +01:00
|
|
|
return fileDescriptor_fadbb7eccb91f143, []int{0}
|
2018-07-12 03:07:50 +02:00
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
|
2018-07-12 03:07:50 +02:00
|
|
|
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)
|
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
func (m *AnalyzeRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_AnalyzeRequest.Merge(m, src)
|
2018-07-12 03:07:50 +02:00
|
|
|
}
|
|
|
|
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
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
|
Make more progress on the new deployment model
This change restructures a lot more pertaining to deployments, snapshots,
environments, and the like.
The most notable change is that the notion of a deploy.Source is introduced,
which splits the responsibility between the deploy.Plan -- which simply
understands how to compute and carry out deployment plans -- and the idea
of something that can produce new objects on-demand during deployment.
The primary such implementation is evalSource, which encapsulates an
interpreter and takes a package, args, and config map, and proceeds to run
the interpreter in a distinct goroutine. It synchronizes as needed to
poke and prod the interpreter along its path to create new resource objects.
There are two other sources, however. First, a nullSource, which simply
refuses to create new objects. This can be handy when writing isolated
tests but is also used to simulate the "empty" environment as necessary to
do a complete teardown of the target environment. Second, a fixedSource,
which takes a pre-computed array of objects, and hands those, in order, to
the planning engine; this is mostly useful as a testing technique.
Boatloads of code is now changed and updated in the various CLI commands.
This further chugs along towards pulumi/lumi#90. The end is in sight.
2017-06-10 20:50:47 +02:00
|
|
|
func (m *AnalyzeRequest) GetType() string {
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
if m != nil {
|
|
|
|
return m.Type
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2018-07-12 03:07:50 +02:00
|
|
|
func (m *AnalyzeRequest) GetProperties() *_struct.Struct {
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
if m != nil {
|
|
|
|
return m.Properties
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2019-11-21 22:01:15 +01:00
|
|
|
func (m *AnalyzeRequest) GetUrn() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Urn
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *AnalyzeRequest) GetName() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Name
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2020-02-08 01:11:34 +01:00
|
|
|
func (m *AnalyzeRequest) GetOptions() *AnalyzerResourceOptions {
|
|
|
|
if m != nil {
|
|
|
|
return m.Options
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *AnalyzeRequest) GetProvider() *AnalyzerProviderResource {
|
|
|
|
if m != nil {
|
|
|
|
return m.Provider
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// AnalyzerResource defines the view of a Pulumi-managed resource as sent to Analyzers. The properties
|
2019-10-25 17:29:02 +02:00
|
|
|
// of the resource are specific to the type of analysis being performed. See the Analyzer
|
|
|
|
// service definition for more information.
|
|
|
|
type AnalyzerResource struct {
|
2020-02-28 12:53:47 +01:00
|
|
|
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
|
|
|
|
Properties *_struct.Struct `protobuf:"bytes,2,opt,name=properties,proto3" json:"properties,omitempty"`
|
|
|
|
Urn string `protobuf:"bytes,3,opt,name=urn,proto3" json:"urn,omitempty"`
|
|
|
|
Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
|
|
|
|
Options *AnalyzerResourceOptions `protobuf:"bytes,5,opt,name=options,proto3" json:"options,omitempty"`
|
|
|
|
Provider *AnalyzerProviderResource `protobuf:"bytes,6,opt,name=provider,proto3" json:"provider,omitempty"`
|
|
|
|
Parent string `protobuf:"bytes,7,opt,name=parent,proto3" json:"parent,omitempty"`
|
|
|
|
Dependencies []string `protobuf:"bytes,8,rep,name=dependencies,proto3" json:"dependencies,omitempty"`
|
|
|
|
PropertyDependencies map[string]*AnalyzerPropertyDependencies `protobuf:"bytes,9,rep,name=propertyDependencies,proto3" json:"propertyDependencies,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
2020-02-08 01:11:34 +01:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2019-10-25 17:29:02 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *AnalyzerResource) Reset() { *m = AnalyzerResource{} }
|
|
|
|
func (m *AnalyzerResource) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*AnalyzerResource) ProtoMessage() {}
|
|
|
|
func (*AnalyzerResource) Descriptor() ([]byte, []int) {
|
2020-02-28 12:53:47 +01:00
|
|
|
return fileDescriptor_fadbb7eccb91f143, []int{1}
|
2019-10-25 17:29:02 +02:00
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
|
2019-10-25 17:29:02 +02:00
|
|
|
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)
|
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
func (m *AnalyzerResource) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_AnalyzerResource.Merge(m, src)
|
2019-10-25 17:29:02 +02:00
|
|
|
}
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2019-11-21 22:01:15 +01:00
|
|
|
func (m *AnalyzerResource) GetUrn() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Urn
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *AnalyzerResource) GetName() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Name
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2020-02-08 01:11:34 +01:00
|
|
|
func (m *AnalyzerResource) GetOptions() *AnalyzerResourceOptions {
|
|
|
|
if m != nil {
|
|
|
|
return m.Options
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *AnalyzerResource) GetProvider() *AnalyzerProviderResource {
|
|
|
|
if m != nil {
|
|
|
|
return m.Provider
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *AnalyzerResource) GetParent() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Parent
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *AnalyzerResource) GetDependencies() []string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Dependencies
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *AnalyzerResource) GetPropertyDependencies() map[string]*AnalyzerPropertyDependencies {
|
|
|
|
if m != nil {
|
|
|
|
return m.PropertyDependencies
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// AnalyzerResourceOptions defines the options associated with a resource.
|
|
|
|
type AnalyzerResourceOptions struct {
|
2020-02-28 12:53:47 +01:00
|
|
|
Protect bool `protobuf:"varint,1,opt,name=protect,proto3" json:"protect,omitempty"`
|
|
|
|
IgnoreChanges []string `protobuf:"bytes,2,rep,name=ignoreChanges,proto3" json:"ignoreChanges,omitempty"`
|
|
|
|
DeleteBeforeReplace bool `protobuf:"varint,3,opt,name=deleteBeforeReplace,proto3" json:"deleteBeforeReplace,omitempty"`
|
|
|
|
DeleteBeforeReplaceDefined bool `protobuf:"varint,4,opt,name=deleteBeforeReplaceDefined,proto3" json:"deleteBeforeReplaceDefined,omitempty"`
|
|
|
|
AdditionalSecretOutputs []string `protobuf:"bytes,5,rep,name=additionalSecretOutputs,proto3" json:"additionalSecretOutputs,omitempty"`
|
|
|
|
Aliases []string `protobuf:"bytes,6,rep,name=aliases,proto3" json:"aliases,omitempty"`
|
|
|
|
CustomTimeouts *AnalyzerResourceOptions_CustomTimeouts `protobuf:"bytes,7,opt,name=customTimeouts,proto3" json:"customTimeouts,omitempty"`
|
2020-02-08 01:11:34 +01:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *AnalyzerResourceOptions) Reset() { *m = AnalyzerResourceOptions{} }
|
|
|
|
func (m *AnalyzerResourceOptions) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*AnalyzerResourceOptions) ProtoMessage() {}
|
|
|
|
func (*AnalyzerResourceOptions) Descriptor() ([]byte, []int) {
|
2020-02-28 12:53:47 +01:00
|
|
|
return fileDescriptor_fadbb7eccb91f143, []int{2}
|
2020-02-08 01:11:34 +01:00
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
|
2020-02-08 01:11:34 +01:00
|
|
|
func (m *AnalyzerResourceOptions) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_AnalyzerResourceOptions.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *AnalyzerResourceOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_AnalyzerResourceOptions.Marshal(b, m, deterministic)
|
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
func (m *AnalyzerResourceOptions) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_AnalyzerResourceOptions.Merge(m, src)
|
2020-02-08 01:11:34 +01:00
|
|
|
}
|
|
|
|
func (m *AnalyzerResourceOptions) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_AnalyzerResourceOptions.Size(m)
|
|
|
|
}
|
|
|
|
func (m *AnalyzerResourceOptions) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_AnalyzerResourceOptions.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_AnalyzerResourceOptions proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *AnalyzerResourceOptions) GetProtect() bool {
|
|
|
|
if m != nil {
|
|
|
|
return m.Protect
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *AnalyzerResourceOptions) GetIgnoreChanges() []string {
|
|
|
|
if m != nil {
|
|
|
|
return m.IgnoreChanges
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *AnalyzerResourceOptions) GetDeleteBeforeReplace() bool {
|
|
|
|
if m != nil {
|
|
|
|
return m.DeleteBeforeReplace
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *AnalyzerResourceOptions) GetDeleteBeforeReplaceDefined() bool {
|
|
|
|
if m != nil {
|
|
|
|
return m.DeleteBeforeReplaceDefined
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *AnalyzerResourceOptions) GetAdditionalSecretOutputs() []string {
|
|
|
|
if m != nil {
|
|
|
|
return m.AdditionalSecretOutputs
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *AnalyzerResourceOptions) GetAliases() []string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Aliases
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *AnalyzerResourceOptions) GetCustomTimeouts() *AnalyzerResourceOptions_CustomTimeouts {
|
|
|
|
if m != nil {
|
|
|
|
return m.CustomTimeouts
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// CustomTimeouts allows a user to be able to create a set of custom timeout parameters.
|
|
|
|
type AnalyzerResourceOptions_CustomTimeouts struct {
|
2020-02-28 12:53:47 +01:00
|
|
|
Create float64 `protobuf:"fixed64,1,opt,name=create,proto3" json:"create,omitempty"`
|
|
|
|
Update float64 `protobuf:"fixed64,2,opt,name=update,proto3" json:"update,omitempty"`
|
|
|
|
Delete float64 `protobuf:"fixed64,3,opt,name=delete,proto3" json:"delete,omitempty"`
|
2020-02-08 01:11:34 +01:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *AnalyzerResourceOptions_CustomTimeouts) Reset() {
|
|
|
|
*m = AnalyzerResourceOptions_CustomTimeouts{}
|
|
|
|
}
|
|
|
|
func (m *AnalyzerResourceOptions_CustomTimeouts) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*AnalyzerResourceOptions_CustomTimeouts) ProtoMessage() {}
|
|
|
|
func (*AnalyzerResourceOptions_CustomTimeouts) Descriptor() ([]byte, []int) {
|
2020-02-28 12:53:47 +01:00
|
|
|
return fileDescriptor_fadbb7eccb91f143, []int{2, 0}
|
2020-02-08 01:11:34 +01:00
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
|
2020-02-08 01:11:34 +01:00
|
|
|
func (m *AnalyzerResourceOptions_CustomTimeouts) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_AnalyzerResourceOptions_CustomTimeouts.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *AnalyzerResourceOptions_CustomTimeouts) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_AnalyzerResourceOptions_CustomTimeouts.Marshal(b, m, deterministic)
|
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
func (m *AnalyzerResourceOptions_CustomTimeouts) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_AnalyzerResourceOptions_CustomTimeouts.Merge(m, src)
|
2020-02-08 01:11:34 +01:00
|
|
|
}
|
|
|
|
func (m *AnalyzerResourceOptions_CustomTimeouts) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_AnalyzerResourceOptions_CustomTimeouts.Size(m)
|
|
|
|
}
|
|
|
|
func (m *AnalyzerResourceOptions_CustomTimeouts) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_AnalyzerResourceOptions_CustomTimeouts.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_AnalyzerResourceOptions_CustomTimeouts proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *AnalyzerResourceOptions_CustomTimeouts) GetCreate() float64 {
|
|
|
|
if m != nil {
|
|
|
|
return m.Create
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *AnalyzerResourceOptions_CustomTimeouts) GetUpdate() float64 {
|
|
|
|
if m != nil {
|
|
|
|
return m.Update
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *AnalyzerResourceOptions_CustomTimeouts) GetDelete() float64 {
|
|
|
|
if m != nil {
|
|
|
|
return m.Delete
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
// AnalyzerProviderResource provides information about a resource's provider.
|
|
|
|
type AnalyzerProviderResource struct {
|
2020-02-28 12:53:47 +01:00
|
|
|
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
|
|
|
|
Properties *_struct.Struct `protobuf:"bytes,2,opt,name=properties,proto3" json:"properties,omitempty"`
|
|
|
|
Urn string `protobuf:"bytes,3,opt,name=urn,proto3" json:"urn,omitempty"`
|
|
|
|
Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
|
2020-02-08 01:11:34 +01:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *AnalyzerProviderResource) Reset() { *m = AnalyzerProviderResource{} }
|
|
|
|
func (m *AnalyzerProviderResource) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*AnalyzerProviderResource) ProtoMessage() {}
|
|
|
|
func (*AnalyzerProviderResource) Descriptor() ([]byte, []int) {
|
2020-02-28 12:53:47 +01:00
|
|
|
return fileDescriptor_fadbb7eccb91f143, []int{3}
|
2020-02-08 01:11:34 +01:00
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
|
2020-02-08 01:11:34 +01:00
|
|
|
func (m *AnalyzerProviderResource) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_AnalyzerProviderResource.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *AnalyzerProviderResource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_AnalyzerProviderResource.Marshal(b, m, deterministic)
|
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
func (m *AnalyzerProviderResource) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_AnalyzerProviderResource.Merge(m, src)
|
2020-02-08 01:11:34 +01:00
|
|
|
}
|
|
|
|
func (m *AnalyzerProviderResource) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_AnalyzerProviderResource.Size(m)
|
|
|
|
}
|
|
|
|
func (m *AnalyzerProviderResource) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_AnalyzerProviderResource.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_AnalyzerProviderResource proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *AnalyzerProviderResource) GetType() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Type
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *AnalyzerProviderResource) GetProperties() *_struct.Struct {
|
|
|
|
if m != nil {
|
|
|
|
return m.Properties
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *AnalyzerProviderResource) GetUrn() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Urn
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *AnalyzerProviderResource) GetName() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Name
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
// AnalyzerPropertyDependencies describes the resources that a particular property depends on.
|
|
|
|
type AnalyzerPropertyDependencies struct {
|
2020-02-28 12:53:47 +01:00
|
|
|
Urns []string `protobuf:"bytes,1,rep,name=urns,proto3" json:"urns,omitempty"`
|
2020-02-08 01:11:34 +01:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *AnalyzerPropertyDependencies) Reset() { *m = AnalyzerPropertyDependencies{} }
|
|
|
|
func (m *AnalyzerPropertyDependencies) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*AnalyzerPropertyDependencies) ProtoMessage() {}
|
|
|
|
func (*AnalyzerPropertyDependencies) Descriptor() ([]byte, []int) {
|
2020-02-28 12:53:47 +01:00
|
|
|
return fileDescriptor_fadbb7eccb91f143, []int{4}
|
2020-02-08 01:11:34 +01:00
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
|
2020-02-08 01:11:34 +01:00
|
|
|
func (m *AnalyzerPropertyDependencies) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_AnalyzerPropertyDependencies.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *AnalyzerPropertyDependencies) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_AnalyzerPropertyDependencies.Marshal(b, m, deterministic)
|
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
func (m *AnalyzerPropertyDependencies) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_AnalyzerPropertyDependencies.Merge(m, src)
|
2020-02-08 01:11:34 +01:00
|
|
|
}
|
|
|
|
func (m *AnalyzerPropertyDependencies) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_AnalyzerPropertyDependencies.Size(m)
|
|
|
|
}
|
|
|
|
func (m *AnalyzerPropertyDependencies) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_AnalyzerPropertyDependencies.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_AnalyzerPropertyDependencies proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *AnalyzerPropertyDependencies) GetUrns() []string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Urns
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2019-10-25 17:29:02 +02:00
|
|
|
type AnalyzeStackRequest struct {
|
2020-02-28 12:53:47 +01:00
|
|
|
Resources []*AnalyzerResource `protobuf:"bytes,1,rep,name=resources,proto3" json:"resources,omitempty"`
|
2019-10-25 17:29:02 +02:00
|
|
|
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) {
|
2020-02-28 12:53:47 +01:00
|
|
|
return fileDescriptor_fadbb7eccb91f143, []int{5}
|
2019-10-25 17:29:02 +02:00
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
|
2019-10-25 17:29:02 +02:00
|
|
|
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)
|
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
func (m *AnalyzeStackRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_AnalyzeStackRequest.Merge(m, src)
|
2019-10-25 17:29:02 +02:00
|
|
|
}
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
Make more progress on the new deployment model
This change restructures a lot more pertaining to deployments, snapshots,
environments, and the like.
The most notable change is that the notion of a deploy.Source is introduced,
which splits the responsibility between the deploy.Plan -- which simply
understands how to compute and carry out deployment plans -- and the idea
of something that can produce new objects on-demand during deployment.
The primary such implementation is evalSource, which encapsulates an
interpreter and takes a package, args, and config map, and proceeds to run
the interpreter in a distinct goroutine. It synchronizes as needed to
poke and prod the interpreter along its path to create new resource objects.
There are two other sources, however. First, a nullSource, which simply
refuses to create new objects. This can be handy when writing isolated
tests but is also used to simulate the "empty" environment as necessary to
do a complete teardown of the target environment. Second, a fixedSource,
which takes a pre-computed array of objects, and hands those, in order, to
the planning engine; this is mostly useful as a testing technique.
Boatloads of code is now changed and updated in the various CLI commands.
This further chugs along towards pulumi/lumi#90. The end is in sight.
2017-06-10 20:50:47 +02:00
|
|
|
type AnalyzeResponse struct {
|
2020-02-28 12:53:47 +01:00
|
|
|
Diagnostics []*AnalyzeDiagnostic `protobuf:"bytes,2,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"`
|
2019-06-11 00:20:22 +02:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
}
|
|
|
|
|
2018-07-12 03:07:50 +02:00
|
|
|
func (m *AnalyzeResponse) Reset() { *m = AnalyzeResponse{} }
|
|
|
|
func (m *AnalyzeResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*AnalyzeResponse) ProtoMessage() {}
|
|
|
|
func (*AnalyzeResponse) Descriptor() ([]byte, []int) {
|
2020-02-28 12:53:47 +01:00
|
|
|
return fileDescriptor_fadbb7eccb91f143, []int{6}
|
2018-07-12 03:07:50 +02:00
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
|
2018-07-12 03:07:50 +02:00
|
|
|
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)
|
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
func (m *AnalyzeResponse) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_AnalyzeResponse.Merge(m, src)
|
2018-07-12 03:07:50 +02:00
|
|
|
}
|
|
|
|
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
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
|
2019-06-11 00:20:22 +02:00
|
|
|
func (m *AnalyzeResponse) GetDiagnostics() []*AnalyzeDiagnostic {
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
if m != nil {
|
2019-06-11 00:20:22 +02:00
|
|
|
return m.Diagnostics
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2019-06-11 00:20:22 +02:00
|
|
|
type AnalyzeDiagnostic struct {
|
2020-02-28 12:53:47 +01:00
|
|
|
PolicyName string `protobuf:"bytes,1,opt,name=policyName,proto3" json:"policyName,omitempty"`
|
|
|
|
PolicyPackName string `protobuf:"bytes,2,opt,name=policyPackName,proto3" json:"policyPackName,omitempty"`
|
|
|
|
PolicyPackVersion string `protobuf:"bytes,3,opt,name=policyPackVersion,proto3" json:"policyPackVersion,omitempty"`
|
|
|
|
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
|
|
|
|
Message string `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty"`
|
|
|
|
Tags []string `protobuf:"bytes,6,rep,name=tags,proto3" json:"tags,omitempty"`
|
|
|
|
EnforcementLevel EnforcementLevel `protobuf:"varint,7,opt,name=enforcementLevel,proto3,enum=pulumirpc.EnforcementLevel" json:"enforcementLevel,omitempty"`
|
|
|
|
Urn string `protobuf:"bytes,8,opt,name=urn,proto3" json:"urn,omitempty"`
|
2019-06-24 02:51:15 +02:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2018-07-12 03:07:50 +02:00
|
|
|
}
|
|
|
|
|
2019-06-11 00:20:22 +02:00
|
|
|
func (m *AnalyzeDiagnostic) Reset() { *m = AnalyzeDiagnostic{} }
|
|
|
|
func (m *AnalyzeDiagnostic) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*AnalyzeDiagnostic) ProtoMessage() {}
|
|
|
|
func (*AnalyzeDiagnostic) Descriptor() ([]byte, []int) {
|
2020-02-28 12:53:47 +01:00
|
|
|
return fileDescriptor_fadbb7eccb91f143, []int{7}
|
2018-07-12 03:07:50 +02:00
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
|
2019-06-11 00:20:22 +02:00
|
|
|
func (m *AnalyzeDiagnostic) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_AnalyzeDiagnostic.Unmarshal(m, b)
|
2018-07-12 03:07:50 +02:00
|
|
|
}
|
2019-06-11 00:20:22 +02:00
|
|
|
func (m *AnalyzeDiagnostic) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_AnalyzeDiagnostic.Marshal(b, m, deterministic)
|
2018-07-12 03:07:50 +02:00
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
func (m *AnalyzeDiagnostic) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_AnalyzeDiagnostic.Merge(m, src)
|
2018-07-12 03:07:50 +02:00
|
|
|
}
|
2019-06-11 00:20:22 +02:00
|
|
|
func (m *AnalyzeDiagnostic) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_AnalyzeDiagnostic.Size(m)
|
2018-07-12 03:07:50 +02:00
|
|
|
}
|
2019-06-11 00:20:22 +02:00
|
|
|
func (m *AnalyzeDiagnostic) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_AnalyzeDiagnostic.DiscardUnknown(m)
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
}
|
|
|
|
|
2019-06-11 00:20:22 +02:00
|
|
|
var xxx_messageInfo_AnalyzeDiagnostic proto.InternalMessageInfo
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
|
2019-06-14 01:12:08 +02:00
|
|
|
func (m *AnalyzeDiagnostic) GetPolicyName() string {
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
if m != nil {
|
2019-06-14 01:12:08 +02:00
|
|
|
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
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2019-06-11 00:20:22 +02:00
|
|
|
func (m *AnalyzeDiagnostic) GetDescription() string {
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
if m != nil {
|
2019-06-11 00:20:22 +02:00
|
|
|
return m.Description
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2019-06-11 00:20:22 +02:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2019-06-24 02:51:15 +02:00
|
|
|
func (m *AnalyzeDiagnostic) GetEnforcementLevel() EnforcementLevel {
|
2019-06-11 00:20:22 +02:00
|
|
|
if m != nil {
|
|
|
|
return m.EnforcementLevel
|
|
|
|
}
|
2019-06-24 02:51:15 +02:00
|
|
|
return EnforcementLevel_ADVISORY
|
|
|
|
}
|
|
|
|
|
2019-11-21 22:01:15 +01:00
|
|
|
func (m *AnalyzeDiagnostic) GetUrn() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Urn
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2019-06-24 02:51:15 +02:00
|
|
|
// AnalyzerInfo provides metadata about a PolicyPack inside an analyzer.
|
|
|
|
type AnalyzerInfo struct {
|
2020-03-30 21:52:05 +02:00
|
|
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
|
|
|
DisplayName string `protobuf:"bytes,2,opt,name=displayName,proto3" json:"displayName,omitempty"`
|
|
|
|
Policies []*PolicyInfo `protobuf:"bytes,3,rep,name=policies,proto3" json:"policies,omitempty"`
|
|
|
|
Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"`
|
|
|
|
SupportsConfig bool `protobuf:"varint,5,opt,name=supportsConfig,proto3" json:"supportsConfig,omitempty"`
|
|
|
|
InitialConfig map[string]*PolicyConfig `protobuf:"bytes,6,rep,name=initialConfig,proto3" json:"initialConfig,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2019-06-24 02:51:15 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *AnalyzerInfo) Reset() { *m = AnalyzerInfo{} }
|
|
|
|
func (m *AnalyzerInfo) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*AnalyzerInfo) ProtoMessage() {}
|
|
|
|
func (*AnalyzerInfo) Descriptor() ([]byte, []int) {
|
2020-02-28 12:53:47 +01:00
|
|
|
return fileDescriptor_fadbb7eccb91f143, []int{8}
|
2019-06-24 02:51:15 +02:00
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
|
2019-06-24 02:51:15 +02:00
|
|
|
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)
|
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
func (m *AnalyzerInfo) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_AnalyzerInfo.Merge(m, src)
|
2019-06-24 02:51:15 +02:00
|
|
|
}
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2020-02-25 02:11:56 +01:00
|
|
|
func (m *AnalyzerInfo) GetVersion() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Version
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2020-03-08 22:11:55 +01:00
|
|
|
func (m *AnalyzerInfo) GetSupportsConfig() bool {
|
|
|
|
if m != nil {
|
|
|
|
return m.SupportsConfig
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
2020-03-30 21:52:05 +02:00
|
|
|
func (m *AnalyzerInfo) GetInitialConfig() map[string]*PolicyConfig {
|
|
|
|
if m != nil {
|
|
|
|
return m.InitialConfig
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-03-08 22:11:55 +01:00
|
|
|
// PolicyInfo provides metadata about a policy within a Policy Pack.
|
2019-06-24 02:51:15 +02:00
|
|
|
type PolicyInfo struct {
|
2020-03-08 22:11:55 +01:00
|
|
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
|
|
|
DisplayName string `protobuf:"bytes,2,opt,name=displayName,proto3" json:"displayName,omitempty"`
|
|
|
|
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
|
|
|
|
Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"`
|
|
|
|
EnforcementLevel EnforcementLevel `protobuf:"varint,5,opt,name=enforcementLevel,proto3,enum=pulumirpc.EnforcementLevel" json:"enforcementLevel,omitempty"`
|
|
|
|
ConfigSchema *PolicyConfigSchema `protobuf:"bytes,6,opt,name=configSchema,proto3" json:"configSchema,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2019-06-24 02:51:15 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *PolicyInfo) Reset() { *m = PolicyInfo{} }
|
|
|
|
func (m *PolicyInfo) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*PolicyInfo) ProtoMessage() {}
|
|
|
|
func (*PolicyInfo) Descriptor() ([]byte, []int) {
|
2020-02-28 12:53:47 +01:00
|
|
|
return fileDescriptor_fadbb7eccb91f143, []int{9}
|
2019-06-24 02:51:15 +02:00
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
|
2019-06-24 02:51:15 +02:00
|
|
|
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)
|
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
func (m *PolicyInfo) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_PolicyInfo.Merge(m, src)
|
2019-06-24 02:51:15 +02:00
|
|
|
}
|
|
|
|
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
|
2019-06-11 00:20:22 +02:00
|
|
|
}
|
|
|
|
|
2020-03-08 22:11:55 +01:00
|
|
|
func (m *PolicyInfo) GetConfigSchema() *PolicyConfigSchema {
|
|
|
|
if m != nil {
|
|
|
|
return m.ConfigSchema
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// PolicyConfigSchema provides the schema for a policy's configuration.
|
|
|
|
type PolicyConfigSchema struct {
|
|
|
|
Properties *_struct.Struct `protobuf:"bytes,1,opt,name=properties,proto3" json:"properties,omitempty"`
|
|
|
|
Required []string `protobuf:"bytes,2,rep,name=required,proto3" json:"required,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *PolicyConfigSchema) Reset() { *m = PolicyConfigSchema{} }
|
|
|
|
func (m *PolicyConfigSchema) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*PolicyConfigSchema) ProtoMessage() {}
|
|
|
|
func (*PolicyConfigSchema) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_fadbb7eccb91f143, []int{10}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *PolicyConfigSchema) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_PolicyConfigSchema.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *PolicyConfigSchema) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_PolicyConfigSchema.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (m *PolicyConfigSchema) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_PolicyConfigSchema.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *PolicyConfigSchema) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_PolicyConfigSchema.Size(m)
|
|
|
|
}
|
|
|
|
func (m *PolicyConfigSchema) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_PolicyConfigSchema.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_PolicyConfigSchema proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *PolicyConfigSchema) GetProperties() *_struct.Struct {
|
|
|
|
if m != nil {
|
|
|
|
return m.Properties
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *PolicyConfigSchema) GetRequired() []string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Required
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// PolicyConfig provides configuration for a policy.
|
|
|
|
type PolicyConfig struct {
|
|
|
|
EnforcementLevel EnforcementLevel `protobuf:"varint,1,opt,name=enforcementLevel,proto3,enum=pulumirpc.EnforcementLevel" json:"enforcementLevel,omitempty"`
|
|
|
|
Properties *_struct.Struct `protobuf:"bytes,2,opt,name=properties,proto3" json:"properties,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *PolicyConfig) Reset() { *m = PolicyConfig{} }
|
|
|
|
func (m *PolicyConfig) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*PolicyConfig) ProtoMessage() {}
|
|
|
|
func (*PolicyConfig) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_fadbb7eccb91f143, []int{11}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *PolicyConfig) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_PolicyConfig.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *PolicyConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_PolicyConfig.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (m *PolicyConfig) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_PolicyConfig.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *PolicyConfig) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_PolicyConfig.Size(m)
|
|
|
|
}
|
|
|
|
func (m *PolicyConfig) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_PolicyConfig.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_PolicyConfig proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *PolicyConfig) GetEnforcementLevel() EnforcementLevel {
|
|
|
|
if m != nil {
|
|
|
|
return m.EnforcementLevel
|
|
|
|
}
|
|
|
|
return EnforcementLevel_ADVISORY
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *PolicyConfig) GetProperties() *_struct.Struct {
|
|
|
|
if m != nil {
|
|
|
|
return m.Properties
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// ConfigureAnalyzerRequest provides configuration information to the analyzer.
|
|
|
|
type ConfigureAnalyzerRequest struct {
|
|
|
|
PolicyConfig map[string]*PolicyConfig `protobuf:"bytes,1,rep,name=policyConfig,proto3" json:"policyConfig,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ConfigureAnalyzerRequest) Reset() { *m = ConfigureAnalyzerRequest{} }
|
|
|
|
func (m *ConfigureAnalyzerRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*ConfigureAnalyzerRequest) ProtoMessage() {}
|
|
|
|
func (*ConfigureAnalyzerRequest) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_fadbb7eccb91f143, []int{12}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ConfigureAnalyzerRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_ConfigureAnalyzerRequest.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *ConfigureAnalyzerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_ConfigureAnalyzerRequest.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (m *ConfigureAnalyzerRequest) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_ConfigureAnalyzerRequest.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *ConfigureAnalyzerRequest) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_ConfigureAnalyzerRequest.Size(m)
|
|
|
|
}
|
|
|
|
func (m *ConfigureAnalyzerRequest) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_ConfigureAnalyzerRequest.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_ConfigureAnalyzerRequest proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *ConfigureAnalyzerRequest) GetPolicyConfig() map[string]*PolicyConfig {
|
|
|
|
if m != nil {
|
|
|
|
return m.PolicyConfig
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
func init() {
|
2020-02-28 12:53:47 +01:00
|
|
|
proto.RegisterEnum("pulumirpc.EnforcementLevel", EnforcementLevel_name, EnforcementLevel_value)
|
2017-09-22 04:18:21 +02:00
|
|
|
proto.RegisterType((*AnalyzeRequest)(nil), "pulumirpc.AnalyzeRequest")
|
2019-10-25 17:29:02 +02:00
|
|
|
proto.RegisterType((*AnalyzerResource)(nil), "pulumirpc.AnalyzerResource")
|
2020-02-08 01:11:34 +01:00
|
|
|
proto.RegisterMapType((map[string]*AnalyzerPropertyDependencies)(nil), "pulumirpc.AnalyzerResource.PropertyDependenciesEntry")
|
|
|
|
proto.RegisterType((*AnalyzerResourceOptions)(nil), "pulumirpc.AnalyzerResourceOptions")
|
|
|
|
proto.RegisterType((*AnalyzerResourceOptions_CustomTimeouts)(nil), "pulumirpc.AnalyzerResourceOptions.CustomTimeouts")
|
|
|
|
proto.RegisterType((*AnalyzerProviderResource)(nil), "pulumirpc.AnalyzerProviderResource")
|
|
|
|
proto.RegisterType((*AnalyzerPropertyDependencies)(nil), "pulumirpc.AnalyzerPropertyDependencies")
|
2019-10-25 17:29:02 +02:00
|
|
|
proto.RegisterType((*AnalyzeStackRequest)(nil), "pulumirpc.AnalyzeStackRequest")
|
2017-09-22 04:18:21 +02:00
|
|
|
proto.RegisterType((*AnalyzeResponse)(nil), "pulumirpc.AnalyzeResponse")
|
2019-06-11 00:20:22 +02:00
|
|
|
proto.RegisterType((*AnalyzeDiagnostic)(nil), "pulumirpc.AnalyzeDiagnostic")
|
2019-06-24 02:51:15 +02:00
|
|
|
proto.RegisterType((*AnalyzerInfo)(nil), "pulumirpc.AnalyzerInfo")
|
2020-03-30 21:52:05 +02:00
|
|
|
proto.RegisterMapType((map[string]*PolicyConfig)(nil), "pulumirpc.AnalyzerInfo.InitialConfigEntry")
|
2019-06-24 02:51:15 +02:00
|
|
|
proto.RegisterType((*PolicyInfo)(nil), "pulumirpc.PolicyInfo")
|
2020-03-08 22:11:55 +01:00
|
|
|
proto.RegisterType((*PolicyConfigSchema)(nil), "pulumirpc.PolicyConfigSchema")
|
|
|
|
proto.RegisterType((*PolicyConfig)(nil), "pulumirpc.PolicyConfig")
|
|
|
|
proto.RegisterType((*ConfigureAnalyzerRequest)(nil), "pulumirpc.ConfigureAnalyzerRequest")
|
|
|
|
proto.RegisterMapType((map[string]*PolicyConfig)(nil), "pulumirpc.ConfigureAnalyzerRequest.PolicyConfigEntry")
|
2020-02-28 12:53:47 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
func init() { proto.RegisterFile("analyzer.proto", fileDescriptor_fadbb7eccb91f143) }
|
|
|
|
|
|
|
|
var fileDescriptor_fadbb7eccb91f143 = []byte{
|
2020-03-30 21:52:05 +02:00
|
|
|
// 1130 bytes of a gzipped FileDescriptorProto
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x57, 0x51, 0x6f, 0x1b, 0x45,
|
|
|
|
0x10, 0xce, 0xd9, 0x69, 0x62, 0x8f, 0x1d, 0xd7, 0xd9, 0x42, 0x73, 0xbd, 0x86, 0x2a, 0xba, 0x22,
|
|
|
|
0x88, 0x2a, 0x70, 0xa9, 0x11, 0xa2, 0x20, 0x0a, 0x38, 0x71, 0x14, 0x05, 0x85, 0xc6, 0xac, 0xab,
|
|
|
|
0xaa, 0x79, 0xbc, 0x9e, 0xc7, 0xee, 0x2a, 0xe7, 0xbb, 0xeb, 0xde, 0x5e, 0x24, 0xf3, 0xc8, 0x23,
|
|
|
|
0x12, 0x12, 0x7f, 0x80, 0x7f, 0xc1, 0xff, 0xe0, 0x85, 0xdf, 0xc0, 0x33, 0x3f, 0x01, 0xed, 0xee,
|
|
|
|
0x9d, 0x73, 0xe7, 0x3b, 0xbb, 0x55, 0x84, 0xc4, 0x03, 0x6f, 0x3b, 0xb3, 0xdf, 0xcc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7b, 0xb9, 0xa1, 0x3c, 0x9f, 0xfe, 0x13, 0x00, 0x00,
|
|
|
|
0xff, 0xff, 0x13, 0xd0, 0x20, 0xeb, 0x00, 0x0e, 0x00, 0x00,
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
var _ context.Context
|
2020-02-28 12:53:47 +01:00
|
|
|
var _ grpc.ClientConnInterface
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
|
|
// is compatible with the grpc package it is being compiled against.
|
2020-02-28 12:53:47 +01:00
|
|
|
const _ = grpc.SupportPackageIsVersion6
|
2018-06-30 01:14:49 +02:00
|
|
|
|
2020-02-28 12:53:47 +01:00
|
|
|
// AnalyzerClient is the client API for Analyzer service.
|
|
|
|
//
|
|
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
2017-03-11 19:07:34 +01:00
|
|
|
type AnalyzerClient interface {
|
Make more progress on the new deployment model
This change restructures a lot more pertaining to deployments, snapshots,
environments, and the like.
The most notable change is that the notion of a deploy.Source is introduced,
which splits the responsibility between the deploy.Plan -- which simply
understands how to compute and carry out deployment plans -- and the idea
of something that can produce new objects on-demand during deployment.
The primary such implementation is evalSource, which encapsulates an
interpreter and takes a package, args, and config map, and proceeds to run
the interpreter in a distinct goroutine. It synchronizes as needed to
poke and prod the interpreter along its path to create new resource objects.
There are two other sources, however. First, a nullSource, which simply
refuses to create new objects. This can be handy when writing isolated
tests but is also used to simulate the "empty" environment as necessary to
do a complete teardown of the target environment. Second, a fixedSource,
which takes a pre-computed array of objects, and hands those, in order, to
the planning engine; this is mostly useful as a testing technique.
Boatloads of code is now changed and updated in the various CLI commands.
This further chugs along towards pulumi/lumi#90. The end is in sight.
2017-06-10 20:50:47 +02:00
|
|
|
// Analyze analyzes a single resource object, and returns any errors that it finds.
|
2019-10-25 17:29:02 +02:00
|
|
|
// Called with the "inputs" to the resource, before it is updated.
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
Analyze(ctx context.Context, in *AnalyzeRequest, opts ...grpc.CallOption) (*AnalyzeResponse, error)
|
2019-10-25 17:29:02 +02:00
|
|
|
// 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)
|
2019-06-24 02:51:15 +02:00
|
|
|
// GetAnalyzerInfo returns metadata about the analyzer (e.g., list of policies contained).
|
|
|
|
GetAnalyzerInfo(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*AnalyzerInfo, error)
|
2017-12-01 22:50:32 +01:00
|
|
|
// GetPluginInfo returns generic information about this plugin, like its version.
|
2018-07-12 03:07:50 +02:00
|
|
|
GetPluginInfo(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*PluginInfo, error)
|
2020-03-08 22:11:55 +01:00
|
|
|
// Configure configures the analyzer, passing configuration properties for each policy.
|
|
|
|
Configure(ctx context.Context, in *ConfigureAnalyzerRequest, opts ...grpc.CallOption) (*empty.Empty, error)
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
}
|
|
|
|
|
2017-03-11 19:07:34 +01:00
|
|
|
type analyzerClient struct {
|
2020-02-28 12:53:47 +01:00
|
|
|
cc grpc.ClientConnInterface
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
}
|
|
|
|
|
2020-02-28 12:53:47 +01:00
|
|
|
func NewAnalyzerClient(cc grpc.ClientConnInterface) AnalyzerClient {
|
2017-03-11 19:07:34 +01:00
|
|
|
return &analyzerClient{cc}
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
}
|
|
|
|
|
2017-03-11 19:07:34 +01:00
|
|
|
func (c *analyzerClient) Analyze(ctx context.Context, in *AnalyzeRequest, opts ...grpc.CallOption) (*AnalyzeResponse, error) {
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
out := new(AnalyzeResponse)
|
2020-02-28 12:53:47 +01:00
|
|
|
err := c.cc.Invoke(ctx, "/pulumirpc.Analyzer/Analyze", in, out, opts...)
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2019-10-25 17:29:02 +02:00
|
|
|
func (c *analyzerClient) AnalyzeStack(ctx context.Context, in *AnalyzeStackRequest, opts ...grpc.CallOption) (*AnalyzeResponse, error) {
|
|
|
|
out := new(AnalyzeResponse)
|
2020-02-28 12:53:47 +01:00
|
|
|
err := c.cc.Invoke(ctx, "/pulumirpc.Analyzer/AnalyzeStack", in, out, opts...)
|
2019-10-25 17:29:02 +02:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2019-06-24 02:51:15 +02:00
|
|
|
func (c *analyzerClient) GetAnalyzerInfo(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*AnalyzerInfo, error) {
|
|
|
|
out := new(AnalyzerInfo)
|
2020-02-28 12:53:47 +01:00
|
|
|
err := c.cc.Invoke(ctx, "/pulumirpc.Analyzer/GetAnalyzerInfo", in, out, opts...)
|
2019-06-24 02:51:15 +02:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2018-07-12 03:07:50 +02:00
|
|
|
func (c *analyzerClient) GetPluginInfo(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*PluginInfo, error) {
|
2017-12-01 22:50:32 +01:00
|
|
|
out := new(PluginInfo)
|
2020-02-28 12:53:47 +01:00
|
|
|
err := c.cc.Invoke(ctx, "/pulumirpc.Analyzer/GetPluginInfo", in, out, opts...)
|
2017-12-01 22:50:32 +01:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2020-03-08 22:11:55 +01:00
|
|
|
func (c *analyzerClient) Configure(ctx context.Context, in *ConfigureAnalyzerRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
|
|
|
|
out := new(empty.Empty)
|
|
|
|
err := c.cc.Invoke(ctx, "/pulumirpc.Analyzer/Configure", in, out, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
2020-02-28 12:53:47 +01:00
|
|
|
// AnalyzerServer is the server API for Analyzer service.
|
2017-03-11 19:07:34 +01:00
|
|
|
type AnalyzerServer interface {
|
Make more progress on the new deployment model
This change restructures a lot more pertaining to deployments, snapshots,
environments, and the like.
The most notable change is that the notion of a deploy.Source is introduced,
which splits the responsibility between the deploy.Plan -- which simply
understands how to compute and carry out deployment plans -- and the idea
of something that can produce new objects on-demand during deployment.
The primary such implementation is evalSource, which encapsulates an
interpreter and takes a package, args, and config map, and proceeds to run
the interpreter in a distinct goroutine. It synchronizes as needed to
poke and prod the interpreter along its path to create new resource objects.
There are two other sources, however. First, a nullSource, which simply
refuses to create new objects. This can be handy when writing isolated
tests but is also used to simulate the "empty" environment as necessary to
do a complete teardown of the target environment. Second, a fixedSource,
which takes a pre-computed array of objects, and hands those, in order, to
the planning engine; this is mostly useful as a testing technique.
Boatloads of code is now changed and updated in the various CLI commands.
This further chugs along towards pulumi/lumi#90. The end is in sight.
2017-06-10 20:50:47 +02:00
|
|
|
// Analyze analyzes a single resource object, and returns any errors that it finds.
|
2019-10-25 17:29:02 +02:00
|
|
|
// Called with the "inputs" to the resource, before it is updated.
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
Analyze(context.Context, *AnalyzeRequest) (*AnalyzeResponse, error)
|
2019-10-25 17:29:02 +02:00
|
|
|
// 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)
|
2019-06-24 02:51:15 +02:00
|
|
|
// GetAnalyzerInfo returns metadata about the analyzer (e.g., list of policies contained).
|
|
|
|
GetAnalyzerInfo(context.Context, *empty.Empty) (*AnalyzerInfo, error)
|
2017-12-01 22:50:32 +01:00
|
|
|
// GetPluginInfo returns generic information about this plugin, like its version.
|
2018-07-12 03:07:50 +02:00
|
|
|
GetPluginInfo(context.Context, *empty.Empty) (*PluginInfo, error)
|
2020-03-08 22:11:55 +01:00
|
|
|
// Configure configures the analyzer, passing configuration properties for each policy.
|
|
|
|
Configure(context.Context, *ConfigureAnalyzerRequest) (*empty.Empty, error)
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
}
|
|
|
|
|
2020-02-28 12:53:47 +01:00
|
|
|
// UnimplementedAnalyzerServer can be embedded to have forward compatible implementations.
|
|
|
|
type UnimplementedAnalyzerServer struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*UnimplementedAnalyzerServer) Analyze(ctx context.Context, req *AnalyzeRequest) (*AnalyzeResponse, error) {
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method Analyze not implemented")
|
|
|
|
}
|
|
|
|
func (*UnimplementedAnalyzerServer) AnalyzeStack(ctx context.Context, req *AnalyzeStackRequest) (*AnalyzeResponse, error) {
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method AnalyzeStack not implemented")
|
|
|
|
}
|
|
|
|
func (*UnimplementedAnalyzerServer) GetAnalyzerInfo(ctx context.Context, req *empty.Empty) (*AnalyzerInfo, error) {
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetAnalyzerInfo not implemented")
|
|
|
|
}
|
|
|
|
func (*UnimplementedAnalyzerServer) GetPluginInfo(ctx context.Context, req *empty.Empty) (*PluginInfo, error) {
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetPluginInfo not implemented")
|
|
|
|
}
|
2020-03-08 22:11:55 +01:00
|
|
|
func (*UnimplementedAnalyzerServer) Configure(ctx context.Context, req *ConfigureAnalyzerRequest) (*empty.Empty, error) {
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method Configure not implemented")
|
|
|
|
}
|
2020-02-28 12:53:47 +01:00
|
|
|
|
2017-03-11 19:07:34 +01:00
|
|
|
func RegisterAnalyzerServer(s *grpc.Server, srv AnalyzerServer) {
|
|
|
|
s.RegisterService(&_Analyzer_serviceDesc, srv)
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
}
|
|
|
|
|
2017-03-11 19:07:34 +01:00
|
|
|
func _Analyzer_Analyze_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
in := new(AnalyzeRequest)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
2017-03-11 19:07:34 +01:00
|
|
|
return srv.(AnalyzerServer).Analyze(ctx, in)
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
2017-09-22 04:18:21 +02:00
|
|
|
FullMethod: "/pulumirpc.Analyzer/Analyze",
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
2017-03-11 19:07:34 +01:00
|
|
|
return srv.(AnalyzerServer).Analyze(ctx, req.(*AnalyzeRequest))
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
2019-10-25 17:29:02 +02:00
|
|
|
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)
|
|
|
|
}
|
|
|
|
|
2019-06-24 02:51:15 +02:00
|
|
|
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)
|
|
|
|
}
|
|
|
|
|
2017-12-01 22:50:32 +01:00
|
|
|
func _Analyzer_GetPluginInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
2018-07-12 03:07:50 +02:00
|
|
|
in := new(empty.Empty)
|
2017-12-01 22:50:32 +01:00
|
|
|
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) {
|
2018-07-12 03:07:50 +02:00
|
|
|
return srv.(AnalyzerServer).GetPluginInfo(ctx, req.(*empty.Empty))
|
2017-12-01 22:50:32 +01:00
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
2020-03-08 22:11:55 +01:00
|
|
|
func _Analyzer_Configure_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(ConfigureAnalyzerRequest)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(AnalyzerServer).Configure(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/pulumirpc.Analyzer/Configure",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(AnalyzerServer).Configure(ctx, req.(*ConfigureAnalyzerRequest))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
2017-03-11 19:07:34 +01:00
|
|
|
var _Analyzer_serviceDesc = grpc.ServiceDesc{
|
2017-09-22 04:18:21 +02:00
|
|
|
ServiceName: "pulumirpc.Analyzer",
|
2017-03-11 19:07:34 +01:00
|
|
|
HandlerType: (*AnalyzerServer)(nil),
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
Methods: []grpc.MethodDesc{
|
|
|
|
{
|
|
|
|
MethodName: "Analyze",
|
2017-03-11 19:07:34 +01:00
|
|
|
Handler: _Analyzer_Analyze_Handler,
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
},
|
2019-10-25 17:29:02 +02:00
|
|
|
{
|
|
|
|
MethodName: "AnalyzeStack",
|
|
|
|
Handler: _Analyzer_AnalyzeStack_Handler,
|
|
|
|
},
|
2019-06-24 02:51:15 +02:00
|
|
|
{
|
|
|
|
MethodName: "GetAnalyzerInfo",
|
|
|
|
Handler: _Analyzer_GetAnalyzerInfo_Handler,
|
|
|
|
},
|
2017-12-01 22:50:32 +01:00
|
|
|
{
|
|
|
|
MethodName: "GetPluginInfo",
|
|
|
|
Handler: _Analyzer_GetPluginInfo_Handler,
|
|
|
|
},
|
2020-03-08 22:11:55 +01:00
|
|
|
{
|
|
|
|
MethodName: "Configure",
|
|
|
|
Handler: _Analyzer_Configure_Handler,
|
|
|
|
},
|
Add basic analyzer support
This change introduces the basic requirements for analyzers, as per
pulumi/coconut#119. In particular, an analyzer can implement either,
or both, of the RPC methods, Analyze and AnalyzeResource. The former
is meant to check an overall deployment (e.g., to ensure it has been
signed off on) and the latter is to check individual resources (e.g.,
to ensure properties of them are correct, such as checking style,
security, etc. rules). These run simultaneous to overall checking.
Analyzers are loaded as plugins just like providers are. The difference
is mainly in their naming ("analyzer-" prefix, rather than "resource-"),
and the RPC methods that they support.
This isn't 100% functional since we need a way to specify at the CLI
that a particular analyzer should be run, in addition to a way of
recording which analyzers certain projects should use in their manifests.
2017-03-11 08:49:17 +01:00
|
|
|
},
|
|
|
|
Streams: []grpc.StreamDesc{},
|
|
|
|
Metadata: "analyzer.proto",
|
|
|
|
}
|