Allow dynamic-provider to send structured errors

A critical part of the partial update protocol is to return a structured
error when a resource is successfully created, but fails to initialize.
This structured error contains the properties of the
partially-initialized resource, and instructs the engine to halt.

Most languages implement this by attaching "details" to the error, i.e.,
an arbitrary proto message attached to the error. The JavaScript
implementation is not mature enough to include all the facilities
required to use this, so here we must add a `Status` message, which
protobuf requires as part of its structure for returning details.
This commit is contained in:
Sean Gillespie 2018-06-29 16:14:49 -07:00 committed by Alex Clemmer
parent 3bd2e6f235
commit 8b9e24cd85
18 changed files with 857 additions and 1172 deletions

View file

@ -342,15 +342,15 @@ proto.pulumirpc.AnalyzeResponse.serializeBinaryToWriter = function(message, writ
/**
* repeated AnalyzeFailure failures = 1;
* @return {!Array<!proto.pulumirpc.AnalyzeFailure>}
* @return {!Array.<!proto.pulumirpc.AnalyzeFailure>}
*/
proto.pulumirpc.AnalyzeResponse.prototype.getFailuresList = function() {
return /** @type{!Array<!proto.pulumirpc.AnalyzeFailure>} */ (
return /** @type{!Array.<!proto.pulumirpc.AnalyzeFailure>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.pulumirpc.AnalyzeFailure, 1));
};
/** @param {!Array<!proto.pulumirpc.AnalyzeFailure>} value */
/** @param {!Array.<!proto.pulumirpc.AnalyzeFailure>} value */
proto.pulumirpc.AnalyzeResponse.prototype.setFailuresList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 1, value);
};

View file

@ -352,15 +352,15 @@ proto.pulumirpc.GetRequiredPluginsResponse.serializeBinaryToWriter = function(me
/**
* repeated PluginDependency plugins = 1;
* @return {!Array<!proto.pulumirpc.PluginDependency>}
* @return {!Array.<!proto.pulumirpc.PluginDependency>}
*/
proto.pulumirpc.GetRequiredPluginsResponse.prototype.getPluginsList = function() {
return /** @type{!Array<!proto.pulumirpc.PluginDependency>} */ (
return /** @type{!Array.<!proto.pulumirpc.PluginDependency>} */ (
jspb.Message.getRepeatedWrapperField(this, plugin_pb.PluginDependency, 1));
};
/** @param {!Array<!proto.pulumirpc.PluginDependency>} value */
/** @param {!Array.<!proto.pulumirpc.PluginDependency>} value */
proto.pulumirpc.GetRequiredPluginsResponse.prototype.setPluginsList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 1, value);
};
@ -503,7 +503,7 @@ proto.pulumirpc.RunRequest.deserializeBinaryFromReader = function(msg, reader) {
case 6:
var value = msg.getConfigMap();
reader.readMessage(value, function(message, reader) {
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "");
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString);
});
break;
case 7:
@ -672,14 +672,14 @@ proto.pulumirpc.RunRequest.prototype.setProgram = function(value) {
/**
* repeated string args = 5;
* @return {!Array<string>}
* @return {!Array.<string>}
*/
proto.pulumirpc.RunRequest.prototype.getArgsList = function() {
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 5));
return /** @type {!Array.<string>} */ (jspb.Message.getRepeatedField(this, 5));
};
/** @param {!Array<string>} value */
/** @param {!Array.<string>} value */
proto.pulumirpc.RunRequest.prototype.setArgsList = function(value) {
jspb.Message.setField(this, 5, value || []);
};

View file

@ -120,7 +120,7 @@ proto.pulumirpc.ConfigureRequest.deserializeBinaryFromReader = function(msg, rea
case 1:
var value = msg.getVariablesMap();
reader.readMessage(value, function(message, reader) {
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "");
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString);
});
break;
default:
@ -485,15 +485,15 @@ proto.pulumirpc.ConfigureErrorMissingKeys.MissingKey.prototype.setDescription =
/**
* repeated MissingKey missingKeys = 1;
* @return {!Array<!proto.pulumirpc.ConfigureErrorMissingKeys.MissingKey>}
* @return {!Array.<!proto.pulumirpc.ConfigureErrorMissingKeys.MissingKey>}
*/
proto.pulumirpc.ConfigureErrorMissingKeys.prototype.getMissingkeysList = function() {
return /** @type{!Array<!proto.pulumirpc.ConfigureErrorMissingKeys.MissingKey>} */ (
return /** @type{!Array.<!proto.pulumirpc.ConfigureErrorMissingKeys.MissingKey>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.pulumirpc.ConfigureErrorMissingKeys.MissingKey, 1));
};
/** @param {!Array<!proto.pulumirpc.ConfigureErrorMissingKeys.MissingKey>} value */
/** @param {!Array.<!proto.pulumirpc.ConfigureErrorMissingKeys.MissingKey>} value */
proto.pulumirpc.ConfigureErrorMissingKeys.prototype.setMissingkeysList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 1, value);
};
@ -883,15 +883,15 @@ proto.pulumirpc.InvokeResponse.prototype.hasReturn = function() {
/**
* repeated CheckFailure failures = 2;
* @return {!Array<!proto.pulumirpc.CheckFailure>}
* @return {!Array.<!proto.pulumirpc.CheckFailure>}
*/
proto.pulumirpc.InvokeResponse.prototype.getFailuresList = function() {
return /** @type{!Array<!proto.pulumirpc.CheckFailure>} */ (
return /** @type{!Array.<!proto.pulumirpc.CheckFailure>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.pulumirpc.CheckFailure, 2));
};
/** @param {!Array<!proto.pulumirpc.CheckFailure>} value */
/** @param {!Array.<!proto.pulumirpc.CheckFailure>} value */
proto.pulumirpc.InvokeResponse.prototype.setFailuresList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 2, value);
};
@ -1325,15 +1325,15 @@ proto.pulumirpc.CheckResponse.prototype.hasInputs = function() {
/**
* repeated CheckFailure failures = 2;
* @return {!Array<!proto.pulumirpc.CheckFailure>}
* @return {!Array.<!proto.pulumirpc.CheckFailure>}
*/
proto.pulumirpc.CheckResponse.prototype.getFailuresList = function() {
return /** @type{!Array<!proto.pulumirpc.CheckFailure>} */ (
return /** @type{!Array.<!proto.pulumirpc.CheckFailure>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.pulumirpc.CheckFailure, 2));
};
/** @param {!Array<!proto.pulumirpc.CheckFailure>} value */
/** @param {!Array.<!proto.pulumirpc.CheckFailure>} value */
proto.pulumirpc.CheckResponse.prototype.setFailuresList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 2, value);
};
@ -1961,14 +1961,14 @@ proto.pulumirpc.DiffResponse.DiffChanges = {
/**
* repeated string replaces = 1;
* @return {!Array<string>}
* @return {!Array.<string>}
*/
proto.pulumirpc.DiffResponse.prototype.getReplacesList = function() {
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1));
return /** @type {!Array.<string>} */ (jspb.Message.getRepeatedField(this, 1));
};
/** @param {!Array<string>} value */
/** @param {!Array.<string>} value */
proto.pulumirpc.DiffResponse.prototype.setReplacesList = function(value) {
jspb.Message.setField(this, 1, value || []);
};
@ -1990,14 +1990,14 @@ proto.pulumirpc.DiffResponse.prototype.clearReplacesList = function() {
/**
* repeated string stables = 2;
* @return {!Array<string>}
* @return {!Array.<string>}
*/
proto.pulumirpc.DiffResponse.prototype.getStablesList = function() {
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2));
return /** @type {!Array.<string>} */ (jspb.Message.getRepeatedField(this, 2));
};
/** @param {!Array<string>} value */
/** @param {!Array.<string>} value */
proto.pulumirpc.DiffResponse.prototype.setStablesList = function(value) {
jspb.Message.setField(this, 2, value || []);
};
@ -3656,14 +3656,14 @@ proto.pulumirpc.ErrorResourceInitFailed.prototype.hasProperties = function() {
/**
* repeated string reasons = 3;
* @return {!Array<string>}
* @return {!Array.<string>}
*/
proto.pulumirpc.ErrorResourceInitFailed.prototype.getReasonsList = function() {
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 3));
return /** @type {!Array.<string>} */ (jspb.Message.getRepeatedField(this, 3));
};
/** @param {!Array<string>} value */
/** @param {!Array.<string>} value */
proto.pulumirpc.ErrorResourceInitFailed.prototype.setReasonsList = function(value) {
jspb.Message.setField(this, 3, value || []);
};

View file

@ -791,14 +791,14 @@ proto.pulumirpc.RegisterResourceRequest.prototype.setProtect = function(value) {
/**
* repeated string dependencies = 7;
* @return {!Array<string>}
* @return {!Array.<string>}
*/
proto.pulumirpc.RegisterResourceRequest.prototype.getDependenciesList = function() {
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 7));
return /** @type {!Array.<string>} */ (jspb.Message.getRepeatedField(this, 7));
};
/** @param {!Array<string>} value */
/** @param {!Array.<string>} value */
proto.pulumirpc.RegisterResourceRequest.prototype.setDependenciesList = function(value) {
jspb.Message.setField(this, 7, value || []);
};
@ -1081,14 +1081,14 @@ proto.pulumirpc.RegisterResourceResponse.prototype.setStable = function(value) {
/**
* repeated string stables = 5;
* @return {!Array<string>}
* @return {!Array.<string>}
*/
proto.pulumirpc.RegisterResourceResponse.prototype.getStablesList = function() {
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 5));
return /** @type {!Array.<string>} */ (jspb.Message.getRepeatedField(this, 5));
};
/** @param {!Array<string>} value */
/** @param {!Array.<string>} value */
proto.pulumirpc.RegisterResourceResponse.prototype.setStablesList = function(value) {
jspb.Message.setField(this, 5, value || []);
};

View file

@ -0,0 +1,238 @@
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js');
goog.exportSymbol('proto.google.rpc.Status', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.google.rpc.Status = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.rpc.Status.repeatedFields_, null);
};
goog.inherits(proto.google.rpc.Status, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.google.rpc.Status.displayName = 'proto.google.rpc.Status';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.google.rpc.Status.repeatedFields_ = [3];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.google.rpc.Status.prototype.toObject = function(opt_includeInstance) {
return proto.google.rpc.Status.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.google.rpc.Status} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.rpc.Status.toObject = function(includeInstance, msg) {
var f, obj = {
code: jspb.Message.getFieldWithDefault(msg, 1, 0),
message: jspb.Message.getFieldWithDefault(msg, 2, ""),
detailsList: jspb.Message.toObjectList(msg.getDetailsList(),
google_protobuf_any_pb.Any.toObject, includeInstance)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.google.rpc.Status}
*/
proto.google.rpc.Status.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.rpc.Status;
return proto.google.rpc.Status.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.rpc.Status} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.rpc.Status}
*/
proto.google.rpc.Status.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readInt32());
msg.setCode(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setMessage(value);
break;
case 3:
var value = new google_protobuf_any_pb.Any;
reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader);
msg.addDetails(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.rpc.Status.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.google.rpc.Status.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.google.rpc.Status} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.rpc.Status.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getCode();
if (f !== 0) {
writer.writeInt32(
1,
f
);
}
f = message.getMessage();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getDetailsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
3,
f,
google_protobuf_any_pb.Any.serializeBinaryToWriter
);
}
};
/**
* optional int32 code = 1;
* @return {number}
*/
proto.google.rpc.Status.prototype.getCode = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/** @param {number} value */
proto.google.rpc.Status.prototype.setCode = function(value) {
jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional string message = 2;
* @return {string}
*/
proto.google.rpc.Status.prototype.getMessage = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
proto.google.rpc.Status.prototype.setMessage = function(value) {
jspb.Message.setProto3StringField(this, 2, value);
};
/**
* repeated google.protobuf.Any details = 3;
* @return {!Array.<!proto.google.protobuf.Any>}
*/
proto.google.rpc.Status.prototype.getDetailsList = function() {
return /** @type{!Array.<!proto.google.protobuf.Any>} */ (
jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 3));
};
/** @param {!Array.<!proto.google.protobuf.Any>} value */
proto.google.rpc.Status.prototype.setDetailsList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 3, value);
};
/**
* @param {!proto.google.protobuf.Any=} opt_value
* @param {number=} opt_index
* @return {!proto.google.protobuf.Any}
*/
proto.google.rpc.Status.prototype.addDetails = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.google.protobuf.Any, opt_index);
};
proto.google.rpc.Status.prototype.clearDetailsList = function() {
this.setDetailsList([]);
};
goog.object.extend(exports, proto.google.rpc);

View file

@ -20,3 +20,4 @@ message ErrorCause {
string message = 1;
string stackTrace = 2;
}

View file

@ -18,6 +18,8 @@
set -e
PROTOC=$(which protoc || { >&2 echo "error: Protobuf compiler (protoc) not found on PATH"; exit 1; })
PROTO_FILES=$(find . -name "*.proto" -not -name "status.proto")
JS_PROTO_FILES=$(find . -name "*.proto")
echo Generating Protobuf/gRPC SDK files:
echo -e "\tVERSION: $(protoc --version)"

View file

@ -1,13 +1,62 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: analyzer.proto
package pulumirpc
/*
Package status is a generated protocol buffer package.
It is generated from these files:
analyzer.proto
engine.proto
errors.proto
language.proto
plugin.proto
provider.proto
resource.proto
status.proto
It has these top-level messages:
AnalyzeRequest
AnalyzeResponse
AnalyzeFailure
LogRequest
ErrorCause
GetRequiredPluginsRequest
GetRequiredPluginsResponse
RunRequest
RunResponse
PluginInfo
PluginDependency
ConfigureRequest
ConfigureErrorMissingKeys
InvokeRequest
InvokeResponse
CheckRequest
CheckResponse
CheckFailure
DiffRequest
DiffResponse
CreateRequest
CreateResponse
ReadRequest
ReadResponse
UpdateRequest
UpdateResponse
DeleteRequest
ErrorResourceInitFailed
ReadResourceRequest
ReadResourceResponse
RegisterResourceRequest
RegisterResourceResponse
RegisterResourceOutputsRequest
Status
*/
package status
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import empty "github.com/golang/protobuf/ptypes/empty"
import _struct "github.com/golang/protobuf/ptypes/struct"
import google_protobuf "github.com/golang/protobuf/ptypes/empty"
import google_protobuf1 "github.com/golang/protobuf/ptypes/struct"
import (
context "golang.org/x/net/context"
@ -26,36 +75,14 @@ var _ = math.Inf
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type AnalyzeRequest struct {
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"`
Properties *google_protobuf1.Struct `protobuf:"bytes,2,opt,name=properties" json:"properties,omitempty"`
}
func (m *AnalyzeRequest) Reset() { *m = AnalyzeRequest{} }
func (m *AnalyzeRequest) String() string { return proto.CompactTextString(m) }
func (*AnalyzeRequest) ProtoMessage() {}
func (*AnalyzeRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_analyzer_4d94ca02b59f2385, []int{0}
}
func (m *AnalyzeRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AnalyzeRequest.Unmarshal(m, b)
}
func (m *AnalyzeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AnalyzeRequest.Marshal(b, m, deterministic)
}
func (dst *AnalyzeRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_AnalyzeRequest.Merge(dst, src)
}
func (m *AnalyzeRequest) XXX_Size() int {
return xxx_messageInfo_AnalyzeRequest.Size(m)
}
func (m *AnalyzeRequest) XXX_DiscardUnknown() {
xxx_messageInfo_AnalyzeRequest.DiscardUnknown(m)
}
var xxx_messageInfo_AnalyzeRequest proto.InternalMessageInfo
func (m *AnalyzeRequest) Reset() { *m = AnalyzeRequest{} }
func (m *AnalyzeRequest) String() string { return proto.CompactTextString(m) }
func (*AnalyzeRequest) ProtoMessage() {}
func (*AnalyzeRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *AnalyzeRequest) GetType() string {
if m != nil {
@ -64,7 +91,7 @@ func (m *AnalyzeRequest) GetType() string {
return ""
}
func (m *AnalyzeRequest) GetProperties() *_struct.Struct {
func (m *AnalyzeRequest) GetProperties() *google_protobuf1.Struct {
if m != nil {
return m.Properties
}
@ -72,35 +99,13 @@ func (m *AnalyzeRequest) GetProperties() *_struct.Struct {
}
type AnalyzeResponse struct {
Failures []*AnalyzeFailure `protobuf:"bytes,1,rep,name=failures,proto3" json:"failures,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
Failures []*AnalyzeFailure `protobuf:"bytes,1,rep,name=failures" json:"failures,omitempty"`
}
func (m *AnalyzeResponse) Reset() { *m = AnalyzeResponse{} }
func (m *AnalyzeResponse) String() string { return proto.CompactTextString(m) }
func (*AnalyzeResponse) ProtoMessage() {}
func (*AnalyzeResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_analyzer_4d94ca02b59f2385, []int{1}
}
func (m *AnalyzeResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AnalyzeResponse.Unmarshal(m, b)
}
func (m *AnalyzeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AnalyzeResponse.Marshal(b, m, deterministic)
}
func (dst *AnalyzeResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_AnalyzeResponse.Merge(dst, src)
}
func (m *AnalyzeResponse) XXX_Size() int {
return xxx_messageInfo_AnalyzeResponse.Size(m)
}
func (m *AnalyzeResponse) XXX_DiscardUnknown() {
xxx_messageInfo_AnalyzeResponse.DiscardUnknown(m)
}
var xxx_messageInfo_AnalyzeResponse proto.InternalMessageInfo
func (m *AnalyzeResponse) Reset() { *m = AnalyzeResponse{} }
func (m *AnalyzeResponse) String() string { return proto.CompactTextString(m) }
func (*AnalyzeResponse) ProtoMessage() {}
func (*AnalyzeResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *AnalyzeResponse) GetFailures() []*AnalyzeFailure {
if m != nil {
@ -110,36 +115,14 @@ func (m *AnalyzeResponse) GetFailures() []*AnalyzeFailure {
}
type AnalyzeFailure struct {
Property string `protobuf:"bytes,1,opt,name=property,proto3" json:"property,omitempty"`
Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
Property string `protobuf:"bytes,1,opt,name=property" json:"property,omitempty"`
Reason string `protobuf:"bytes,2,opt,name=reason" json:"reason,omitempty"`
}
func (m *AnalyzeFailure) Reset() { *m = AnalyzeFailure{} }
func (m *AnalyzeFailure) String() string { return proto.CompactTextString(m) }
func (*AnalyzeFailure) ProtoMessage() {}
func (*AnalyzeFailure) Descriptor() ([]byte, []int) {
return fileDescriptor_analyzer_4d94ca02b59f2385, []int{2}
}
func (m *AnalyzeFailure) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AnalyzeFailure.Unmarshal(m, b)
}
func (m *AnalyzeFailure) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AnalyzeFailure.Marshal(b, m, deterministic)
}
func (dst *AnalyzeFailure) XXX_Merge(src proto.Message) {
xxx_messageInfo_AnalyzeFailure.Merge(dst, src)
}
func (m *AnalyzeFailure) XXX_Size() int {
return xxx_messageInfo_AnalyzeFailure.Size(m)
}
func (m *AnalyzeFailure) XXX_DiscardUnknown() {
xxx_messageInfo_AnalyzeFailure.DiscardUnknown(m)
}
var xxx_messageInfo_AnalyzeFailure proto.InternalMessageInfo
func (m *AnalyzeFailure) Reset() { *m = AnalyzeFailure{} }
func (m *AnalyzeFailure) String() string { return proto.CompactTextString(m) }
func (*AnalyzeFailure) ProtoMessage() {}
func (*AnalyzeFailure) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *AnalyzeFailure) GetProperty() string {
if m != nil {
@ -169,14 +152,13 @@ var _ grpc.ClientConn
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// 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.
// Client API for Analyzer service
type AnalyzerClient interface {
// Analyze analyzes a single resource object, and returns any errors that it finds.
Analyze(ctx context.Context, in *AnalyzeRequest, opts ...grpc.CallOption) (*AnalyzeResponse, error)
// GetPluginInfo returns generic information about this plugin, like its version.
GetPluginInfo(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*PluginInfo, error)
GetPluginInfo(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*PluginInfo, error)
}
type analyzerClient struct {
@ -189,28 +171,29 @@ func NewAnalyzerClient(cc *grpc.ClientConn) AnalyzerClient {
func (c *analyzerClient) Analyze(ctx context.Context, in *AnalyzeRequest, opts ...grpc.CallOption) (*AnalyzeResponse, error) {
out := new(AnalyzeResponse)
err := c.cc.Invoke(ctx, "/pulumirpc.Analyzer/Analyze", in, out, opts...)
err := grpc.Invoke(ctx, "/pulumirpc.Analyzer/Analyze", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *analyzerClient) GetPluginInfo(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*PluginInfo, error) {
func (c *analyzerClient) GetPluginInfo(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*PluginInfo, error) {
out := new(PluginInfo)
err := c.cc.Invoke(ctx, "/pulumirpc.Analyzer/GetPluginInfo", in, out, opts...)
err := grpc.Invoke(ctx, "/pulumirpc.Analyzer/GetPluginInfo", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// AnalyzerServer is the server API for Analyzer service.
// Server API for Analyzer service
type AnalyzerServer interface {
// Analyze analyzes a single resource object, and returns any errors that it finds.
Analyze(context.Context, *AnalyzeRequest) (*AnalyzeResponse, error)
// GetPluginInfo returns generic information about this plugin, like its version.
GetPluginInfo(context.Context, *empty.Empty) (*PluginInfo, error)
GetPluginInfo(context.Context, *google_protobuf.Empty) (*PluginInfo, error)
}
func RegisterAnalyzerServer(s *grpc.Server, srv AnalyzerServer) {
@ -236,7 +219,7 @@ func _Analyzer_Analyze_Handler(srv interface{}, ctx context.Context, dec func(in
}
func _Analyzer_GetPluginInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(empty.Empty)
in := new(google_protobuf.Empty)
if err := dec(in); err != nil {
return nil, err
}
@ -248,7 +231,7 @@ func _Analyzer_GetPluginInfo_Handler(srv interface{}, ctx context.Context, dec f
FullMethod: "/pulumirpc.Analyzer/GetPluginInfo",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AnalyzerServer).GetPluginInfo(ctx, req.(*empty.Empty))
return srv.(AnalyzerServer).GetPluginInfo(ctx, req.(*google_protobuf.Empty))
}
return interceptor(ctx, in, info, handler)
}
@ -270,9 +253,9 @@ var _Analyzer_serviceDesc = grpc.ServiceDesc{
Metadata: "analyzer.proto",
}
func init() { proto.RegisterFile("analyzer.proto", fileDescriptor_analyzer_4d94ca02b59f2385) }
func init() { proto.RegisterFile("analyzer.proto", fileDescriptor0) }
var fileDescriptor_analyzer_4d94ca02b59f2385 = []byte{
var fileDescriptor0 = []byte{
// 287 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0x4f, 0x4b, 0xc3, 0x40,
0x10, 0xc5, 0x1b, 0x95, 0xda, 0x4e, 0xb5, 0xc2, 0x80, 0xb5, 0xae, 0x1e, 0x42, 0x4e, 0x39, 0x6d,

View file

@ -1,12 +1,12 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: engine.proto
package pulumirpc
package status
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import empty "github.com/golang/protobuf/ptypes/empty"
import google_protobuf "github.com/golang/protobuf/ptypes/empty"
import (
context "golang.org/x/net/context"
@ -18,12 +18,6 @@ var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
// LogSeverity is the severity level of a log message. Errors are fatal; all others are informational.
type LogSeverity int32
@ -50,42 +44,18 @@ var LogSeverity_value = map[string]int32{
func (x LogSeverity) String() string {
return proto.EnumName(LogSeverity_name, int32(x))
}
func (LogSeverity) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_engine_9084b8160d1019f5, []int{0}
}
func (LogSeverity) EnumDescriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
type LogRequest struct {
Severity LogSeverity `protobuf:"varint,1,opt,name=severity,proto3,enum=pulumirpc.LogSeverity" json:"severity,omitempty"`
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
Urn string `protobuf:"bytes,3,opt,name=urn,proto3" json:"urn,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
Severity LogSeverity `protobuf:"varint,1,opt,name=severity,enum=pulumirpc.LogSeverity" json:"severity,omitempty"`
Message string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"`
Urn string `protobuf:"bytes,3,opt,name=urn" json:"urn,omitempty"`
}
func (m *LogRequest) Reset() { *m = LogRequest{} }
func (m *LogRequest) String() string { return proto.CompactTextString(m) }
func (*LogRequest) ProtoMessage() {}
func (*LogRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_engine_9084b8160d1019f5, []int{0}
}
func (m *LogRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LogRequest.Unmarshal(m, b)
}
func (m *LogRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_LogRequest.Marshal(b, m, deterministic)
}
func (dst *LogRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_LogRequest.Merge(dst, src)
}
func (m *LogRequest) XXX_Size() int {
return xxx_messageInfo_LogRequest.Size(m)
}
func (m *LogRequest) XXX_DiscardUnknown() {
xxx_messageInfo_LogRequest.DiscardUnknown(m)
}
var xxx_messageInfo_LogRequest proto.InternalMessageInfo
func (m *LogRequest) Reset() { *m = LogRequest{} }
func (m *LogRequest) String() string { return proto.CompactTextString(m) }
func (*LogRequest) ProtoMessage() {}
func (*LogRequest) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
func (m *LogRequest) GetSeverity() LogSeverity {
if m != nil {
@ -121,12 +91,11 @@ var _ grpc.ClientConn
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// EngineClient is the client API for Engine service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
// Client API for Engine service
type EngineClient interface {
// Log logs a global message in the engine, including errors and warnings.
Log(ctx context.Context, in *LogRequest, opts ...grpc.CallOption) (*empty.Empty, error)
Log(ctx context.Context, in *LogRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error)
}
type engineClient struct {
@ -137,19 +106,20 @@ func NewEngineClient(cc *grpc.ClientConn) EngineClient {
return &engineClient{cc}
}
func (c *engineClient) Log(ctx context.Context, in *LogRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
err := c.cc.Invoke(ctx, "/pulumirpc.Engine/Log", in, out, opts...)
func (c *engineClient) Log(ctx context.Context, in *LogRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) {
out := new(google_protobuf.Empty)
err := grpc.Invoke(ctx, "/pulumirpc.Engine/Log", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// EngineServer is the server API for Engine service.
// Server API for Engine service
type EngineServer interface {
// Log logs a global message in the engine, including errors and warnings.
Log(context.Context, *LogRequest) (*empty.Empty, error)
Log(context.Context, *LogRequest) (*google_protobuf.Empty, error)
}
func RegisterEngineServer(s *grpc.Server, srv EngineServer) {
@ -187,9 +157,9 @@ var _Engine_serviceDesc = grpc.ServiceDesc{
Metadata: "engine.proto",
}
func init() { proto.RegisterFile("engine.proto", fileDescriptor_engine_9084b8160d1019f5) }
func init() { proto.RegisterFile("engine.proto", fileDescriptor1) }
var fileDescriptor_engine_9084b8160d1019f5 = []byte{
var fileDescriptor1 = []byte{
// 239 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x8f, 0x4b, 0x4b, 0xc3, 0x40,
0x14, 0x85, 0x9b, 0x46, 0xdb, 0xe6, 0x56, 0x64, 0xb8, 0x60, 0x09, 0x75, 0x53, 0xba, 0x2a, 0x2e,

View file

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: errors.proto
package pulumirpc
package status
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
@ -12,43 +12,15 @@ var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type ErrorCause struct {
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
StackTrace string `protobuf:"bytes,2,opt,name=stackTrace,proto3" json:"stackTrace,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
Message string `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"`
StackTrace string `protobuf:"bytes,2,opt,name=stackTrace" json:"stackTrace,omitempty"`
}
func (m *ErrorCause) Reset() { *m = ErrorCause{} }
func (m *ErrorCause) String() string { return proto.CompactTextString(m) }
func (*ErrorCause) ProtoMessage() {}
func (*ErrorCause) Descriptor() ([]byte, []int) {
return fileDescriptor_errors_f003e48c15598612, []int{0}
}
func (m *ErrorCause) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ErrorCause.Unmarshal(m, b)
}
func (m *ErrorCause) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ErrorCause.Marshal(b, m, deterministic)
}
func (dst *ErrorCause) XXX_Merge(src proto.Message) {
xxx_messageInfo_ErrorCause.Merge(dst, src)
}
func (m *ErrorCause) XXX_Size() int {
return xxx_messageInfo_ErrorCause.Size(m)
}
func (m *ErrorCause) XXX_DiscardUnknown() {
xxx_messageInfo_ErrorCause.DiscardUnknown(m)
}
var xxx_messageInfo_ErrorCause proto.InternalMessageInfo
func (m *ErrorCause) Reset() { *m = ErrorCause{} }
func (m *ErrorCause) String() string { return proto.CompactTextString(m) }
func (*ErrorCause) ProtoMessage() {}
func (*ErrorCause) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} }
func (m *ErrorCause) GetMessage() string {
if m != nil {
@ -68,9 +40,9 @@ func init() {
proto.RegisterType((*ErrorCause)(nil), "pulumirpc.ErrorCause")
}
func init() { proto.RegisterFile("errors.proto", fileDescriptor_errors_f003e48c15598612) }
func init() { proto.RegisterFile("errors.proto", fileDescriptor2) }
var fileDescriptor_errors_f003e48c15598612 = []byte{
var fileDescriptor2 = []byte{
// 106 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x49, 0x2d, 0x2a, 0xca,
0x2f, 0x2a, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x2c, 0x28, 0xcd, 0x29, 0xcd, 0xcd,

View file

@ -1,12 +1,12 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: language.proto
package pulumirpc
package status
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import empty "github.com/golang/protobuf/ptypes/empty"
import google_protobuf "github.com/golang/protobuf/ptypes/empty"
import (
context "golang.org/x/net/context"
@ -18,44 +18,16 @@ var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type GetRequiredPluginsRequest struct {
Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"`
Pwd string `protobuf:"bytes,2,opt,name=pwd,proto3" json:"pwd,omitempty"`
Program string `protobuf:"bytes,3,opt,name=program,proto3" json:"program,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
Project string `protobuf:"bytes,1,opt,name=project" json:"project,omitempty"`
Pwd string `protobuf:"bytes,2,opt,name=pwd" json:"pwd,omitempty"`
Program string `protobuf:"bytes,3,opt,name=program" json:"program,omitempty"`
}
func (m *GetRequiredPluginsRequest) Reset() { *m = GetRequiredPluginsRequest{} }
func (m *GetRequiredPluginsRequest) String() string { return proto.CompactTextString(m) }
func (*GetRequiredPluginsRequest) ProtoMessage() {}
func (*GetRequiredPluginsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_language_840dd930e81005a9, []int{0}
}
func (m *GetRequiredPluginsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetRequiredPluginsRequest.Unmarshal(m, b)
}
func (m *GetRequiredPluginsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetRequiredPluginsRequest.Marshal(b, m, deterministic)
}
func (dst *GetRequiredPluginsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetRequiredPluginsRequest.Merge(dst, src)
}
func (m *GetRequiredPluginsRequest) XXX_Size() int {
return xxx_messageInfo_GetRequiredPluginsRequest.Size(m)
}
func (m *GetRequiredPluginsRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetRequiredPluginsRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetRequiredPluginsRequest proto.InternalMessageInfo
func (m *GetRequiredPluginsRequest) Reset() { *m = GetRequiredPluginsRequest{} }
func (m *GetRequiredPluginsRequest) String() string { return proto.CompactTextString(m) }
func (*GetRequiredPluginsRequest) ProtoMessage() {}
func (*GetRequiredPluginsRequest) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0} }
func (m *GetRequiredPluginsRequest) GetProject() string {
if m != nil {
@ -79,35 +51,13 @@ func (m *GetRequiredPluginsRequest) GetProgram() string {
}
type GetRequiredPluginsResponse struct {
Plugins []*PluginDependency `protobuf:"bytes,1,rep,name=plugins,proto3" json:"plugins,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
Plugins []*PluginDependency `protobuf:"bytes,1,rep,name=plugins" json:"plugins,omitempty"`
}
func (m *GetRequiredPluginsResponse) Reset() { *m = GetRequiredPluginsResponse{} }
func (m *GetRequiredPluginsResponse) String() string { return proto.CompactTextString(m) }
func (*GetRequiredPluginsResponse) ProtoMessage() {}
func (*GetRequiredPluginsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_language_840dd930e81005a9, []int{1}
}
func (m *GetRequiredPluginsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetRequiredPluginsResponse.Unmarshal(m, b)
}
func (m *GetRequiredPluginsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetRequiredPluginsResponse.Marshal(b, m, deterministic)
}
func (dst *GetRequiredPluginsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetRequiredPluginsResponse.Merge(dst, src)
}
func (m *GetRequiredPluginsResponse) XXX_Size() int {
return xxx_messageInfo_GetRequiredPluginsResponse.Size(m)
}
func (m *GetRequiredPluginsResponse) XXX_DiscardUnknown() {
xxx_messageInfo_GetRequiredPluginsResponse.DiscardUnknown(m)
}
var xxx_messageInfo_GetRequiredPluginsResponse proto.InternalMessageInfo
func (m *GetRequiredPluginsResponse) Reset() { *m = GetRequiredPluginsResponse{} }
func (m *GetRequiredPluginsResponse) String() string { return proto.CompactTextString(m) }
func (*GetRequiredPluginsResponse) ProtoMessage() {}
func (*GetRequiredPluginsResponse) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{1} }
func (m *GetRequiredPluginsResponse) GetPlugins() []*PluginDependency {
if m != nil {
@ -118,43 +68,21 @@ func (m *GetRequiredPluginsResponse) GetPlugins() []*PluginDependency {
// RunRequest asks the interpreter to execute a program.
type RunRequest struct {
Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"`
Stack string `protobuf:"bytes,2,opt,name=stack,proto3" json:"stack,omitempty"`
Pwd string `protobuf:"bytes,3,opt,name=pwd,proto3" json:"pwd,omitempty"`
Program string `protobuf:"bytes,4,opt,name=program,proto3" json:"program,omitempty"`
Args []string `protobuf:"bytes,5,rep,name=args,proto3" json:"args,omitempty"`
Config map[string]string `protobuf:"bytes,6,rep,name=config,proto3" json:"config,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
DryRun bool `protobuf:"varint,7,opt,name=dryRun,proto3" json:"dryRun,omitempty"`
Parallel int32 `protobuf:"varint,8,opt,name=parallel,proto3" json:"parallel,omitempty"`
MonitorAddress string `protobuf:"bytes,9,opt,name=monitor_address,json=monitorAddress,proto3" json:"monitor_address,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
Project string `protobuf:"bytes,1,opt,name=project" json:"project,omitempty"`
Stack string `protobuf:"bytes,2,opt,name=stack" json:"stack,omitempty"`
Pwd string `protobuf:"bytes,3,opt,name=pwd" json:"pwd,omitempty"`
Program string `protobuf:"bytes,4,opt,name=program" json:"program,omitempty"`
Args []string `protobuf:"bytes,5,rep,name=args" json:"args,omitempty"`
Config map[string]string `protobuf:"bytes,6,rep,name=config" json:"config,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
DryRun bool `protobuf:"varint,7,opt,name=dryRun" json:"dryRun,omitempty"`
Parallel int32 `protobuf:"varint,8,opt,name=parallel" json:"parallel,omitempty"`
MonitorAddress string `protobuf:"bytes,9,opt,name=monitor_address,json=monitorAddress" json:"monitor_address,omitempty"`
}
func (m *RunRequest) Reset() { *m = RunRequest{} }
func (m *RunRequest) String() string { return proto.CompactTextString(m) }
func (*RunRequest) ProtoMessage() {}
func (*RunRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_language_840dd930e81005a9, []int{2}
}
func (m *RunRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RunRequest.Unmarshal(m, b)
}
func (m *RunRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RunRequest.Marshal(b, m, deterministic)
}
func (dst *RunRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_RunRequest.Merge(dst, src)
}
func (m *RunRequest) XXX_Size() int {
return xxx_messageInfo_RunRequest.Size(m)
}
func (m *RunRequest) XXX_DiscardUnknown() {
xxx_messageInfo_RunRequest.DiscardUnknown(m)
}
var xxx_messageInfo_RunRequest proto.InternalMessageInfo
func (m *RunRequest) Reset() { *m = RunRequest{} }
func (m *RunRequest) String() string { return proto.CompactTextString(m) }
func (*RunRequest) ProtoMessage() {}
func (*RunRequest) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{2} }
func (m *RunRequest) GetProject() string {
if m != nil {
@ -221,35 +149,13 @@ func (m *RunRequest) GetMonitorAddress() string {
// RunResponse is the response back from the interpreter/source back to the monitor.
type RunResponse struct {
Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
Error string `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
}
func (m *RunResponse) Reset() { *m = RunResponse{} }
func (m *RunResponse) String() string { return proto.CompactTextString(m) }
func (*RunResponse) ProtoMessage() {}
func (*RunResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_language_840dd930e81005a9, []int{3}
}
func (m *RunResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RunResponse.Unmarshal(m, b)
}
func (m *RunResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RunResponse.Marshal(b, m, deterministic)
}
func (dst *RunResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_RunResponse.Merge(dst, src)
}
func (m *RunResponse) XXX_Size() int {
return xxx_messageInfo_RunResponse.Size(m)
}
func (m *RunResponse) XXX_DiscardUnknown() {
xxx_messageInfo_RunResponse.DiscardUnknown(m)
}
var xxx_messageInfo_RunResponse proto.InternalMessageInfo
func (m *RunResponse) Reset() { *m = RunResponse{} }
func (m *RunResponse) String() string { return proto.CompactTextString(m) }
func (*RunResponse) ProtoMessage() {}
func (*RunResponse) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{3} }
func (m *RunResponse) GetError() string {
if m != nil {
@ -262,7 +168,6 @@ func init() {
proto.RegisterType((*GetRequiredPluginsRequest)(nil), "pulumirpc.GetRequiredPluginsRequest")
proto.RegisterType((*GetRequiredPluginsResponse)(nil), "pulumirpc.GetRequiredPluginsResponse")
proto.RegisterType((*RunRequest)(nil), "pulumirpc.RunRequest")
proto.RegisterMapType((map[string]string)(nil), "pulumirpc.RunRequest.ConfigEntry")
proto.RegisterType((*RunResponse)(nil), "pulumirpc.RunResponse")
}
@ -274,16 +179,15 @@ var _ grpc.ClientConn
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// LanguageRuntimeClient is the client API for LanguageRuntime service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
// Client API for LanguageRuntime service
type LanguageRuntimeClient interface {
// GetRequiredPlugins computes the complete set of anticipated plugins required by a program.
GetRequiredPlugins(ctx context.Context, in *GetRequiredPluginsRequest, opts ...grpc.CallOption) (*GetRequiredPluginsResponse, error)
// Run executes a program and returns its result.
Run(ctx context.Context, in *RunRequest, opts ...grpc.CallOption) (*RunResponse, error)
// GetPluginInfo returns generic information about this plugin, like its version.
GetPluginInfo(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*PluginInfo, error)
GetPluginInfo(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*PluginInfo, error)
}
type languageRuntimeClient struct {
@ -296,7 +200,7 @@ func NewLanguageRuntimeClient(cc *grpc.ClientConn) LanguageRuntimeClient {
func (c *languageRuntimeClient) GetRequiredPlugins(ctx context.Context, in *GetRequiredPluginsRequest, opts ...grpc.CallOption) (*GetRequiredPluginsResponse, error) {
out := new(GetRequiredPluginsResponse)
err := c.cc.Invoke(ctx, "/pulumirpc.LanguageRuntime/GetRequiredPlugins", in, out, opts...)
err := grpc.Invoke(ctx, "/pulumirpc.LanguageRuntime/GetRequiredPlugins", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
@ -305,30 +209,31 @@ func (c *languageRuntimeClient) GetRequiredPlugins(ctx context.Context, in *GetR
func (c *languageRuntimeClient) Run(ctx context.Context, in *RunRequest, opts ...grpc.CallOption) (*RunResponse, error) {
out := new(RunResponse)
err := c.cc.Invoke(ctx, "/pulumirpc.LanguageRuntime/Run", in, out, opts...)
err := grpc.Invoke(ctx, "/pulumirpc.LanguageRuntime/Run", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *languageRuntimeClient) GetPluginInfo(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*PluginInfo, error) {
func (c *languageRuntimeClient) GetPluginInfo(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*PluginInfo, error) {
out := new(PluginInfo)
err := c.cc.Invoke(ctx, "/pulumirpc.LanguageRuntime/GetPluginInfo", in, out, opts...)
err := grpc.Invoke(ctx, "/pulumirpc.LanguageRuntime/GetPluginInfo", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// LanguageRuntimeServer is the server API for LanguageRuntime service.
// Server API for LanguageRuntime service
type LanguageRuntimeServer interface {
// GetRequiredPlugins computes the complete set of anticipated plugins required by a program.
GetRequiredPlugins(context.Context, *GetRequiredPluginsRequest) (*GetRequiredPluginsResponse, error)
// Run executes a program and returns its result.
Run(context.Context, *RunRequest) (*RunResponse, error)
// GetPluginInfo returns generic information about this plugin, like its version.
GetPluginInfo(context.Context, *empty.Empty) (*PluginInfo, error)
GetPluginInfo(context.Context, *google_protobuf.Empty) (*PluginInfo, error)
}
func RegisterLanguageRuntimeServer(s *grpc.Server, srv LanguageRuntimeServer) {
@ -372,7 +277,7 @@ func _LanguageRuntime_Run_Handler(srv interface{}, ctx context.Context, dec func
}
func _LanguageRuntime_GetPluginInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(empty.Empty)
in := new(google_protobuf.Empty)
if err := dec(in); err != nil {
return nil, err
}
@ -384,7 +289,7 @@ func _LanguageRuntime_GetPluginInfo_Handler(srv interface{}, ctx context.Context
FullMethod: "/pulumirpc.LanguageRuntime/GetPluginInfo",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LanguageRuntimeServer).GetPluginInfo(ctx, req.(*empty.Empty))
return srv.(LanguageRuntimeServer).GetPluginInfo(ctx, req.(*google_protobuf.Empty))
}
return interceptor(ctx, in, info, handler)
}
@ -410,9 +315,9 @@ var _LanguageRuntime_serviceDesc = grpc.ServiceDesc{
Metadata: "language.proto",
}
func init() { proto.RegisterFile("language.proto", fileDescriptor_language_840dd930e81005a9) }
func init() { proto.RegisterFile("language.proto", fileDescriptor3) }
var fileDescriptor_language_840dd930e81005a9 = []byte{
var fileDescriptor3 = []byte{
// 451 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0xcf, 0x6e, 0xd4, 0x30,
0x10, 0xc6, 0x9b, 0xa6, 0xfb, 0x6f, 0x16, 0x5a, 0x64, 0xb5, 0x2b, 0x93, 0x5e, 0x42, 0x00, 0x91,

View file

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: plugin.proto
package pulumirpc
package status
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
@ -12,43 +12,15 @@ var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
// PluginInfo is meta-information about a plugin that is used by the system.
type PluginInfo struct {
Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
Version string `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"`
}
func (m *PluginInfo) Reset() { *m = PluginInfo{} }
func (m *PluginInfo) String() string { return proto.CompactTextString(m) }
func (*PluginInfo) ProtoMessage() {}
func (*PluginInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_plugin_6374fd953f733c72, []int{0}
}
func (m *PluginInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PluginInfo.Unmarshal(m, b)
}
func (m *PluginInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PluginInfo.Marshal(b, m, deterministic)
}
func (dst *PluginInfo) XXX_Merge(src proto.Message) {
xxx_messageInfo_PluginInfo.Merge(dst, src)
}
func (m *PluginInfo) XXX_Size() int {
return xxx_messageInfo_PluginInfo.Size(m)
}
func (m *PluginInfo) XXX_DiscardUnknown() {
xxx_messageInfo_PluginInfo.DiscardUnknown(m)
}
var xxx_messageInfo_PluginInfo proto.InternalMessageInfo
func (m *PluginInfo) Reset() { *m = PluginInfo{} }
func (m *PluginInfo) String() string { return proto.CompactTextString(m) }
func (*PluginInfo) ProtoMessage() {}
func (*PluginInfo) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{0} }
func (m *PluginInfo) GetVersion() string {
if m != nil {
@ -59,37 +31,15 @@ func (m *PluginInfo) GetVersion() string {
// PluginDependency is information about a plugin that a program may depend upon.
type PluginDependency struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"`
Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
Kind string `protobuf:"bytes,2,opt,name=kind" json:"kind,omitempty"`
Version string `protobuf:"bytes,3,opt,name=version" json:"version,omitempty"`
}
func (m *PluginDependency) Reset() { *m = PluginDependency{} }
func (m *PluginDependency) String() string { return proto.CompactTextString(m) }
func (*PluginDependency) ProtoMessage() {}
func (*PluginDependency) Descriptor() ([]byte, []int) {
return fileDescriptor_plugin_6374fd953f733c72, []int{1}
}
func (m *PluginDependency) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PluginDependency.Unmarshal(m, b)
}
func (m *PluginDependency) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PluginDependency.Marshal(b, m, deterministic)
}
func (dst *PluginDependency) XXX_Merge(src proto.Message) {
xxx_messageInfo_PluginDependency.Merge(dst, src)
}
func (m *PluginDependency) XXX_Size() int {
return xxx_messageInfo_PluginDependency.Size(m)
}
func (m *PluginDependency) XXX_DiscardUnknown() {
xxx_messageInfo_PluginDependency.DiscardUnknown(m)
}
var xxx_messageInfo_PluginDependency proto.InternalMessageInfo
func (m *PluginDependency) Reset() { *m = PluginDependency{} }
func (m *PluginDependency) String() string { return proto.CompactTextString(m) }
func (*PluginDependency) ProtoMessage() {}
func (*PluginDependency) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{1} }
func (m *PluginDependency) GetName() string {
if m != nil {
@ -117,9 +67,9 @@ func init() {
proto.RegisterType((*PluginDependency)(nil), "pulumirpc.PluginDependency")
}
func init() { proto.RegisterFile("plugin.proto", fileDescriptor_plugin_6374fd953f733c72) }
func init() { proto.RegisterFile("plugin.proto", fileDescriptor4) }
var fileDescriptor_plugin_6374fd953f733c72 = []byte{
var fileDescriptor4 = []byte{
// 130 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0xc8, 0x29, 0x4d,
0xcf, 0xcc, 0xd3, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x2c, 0x28, 0xcd, 0x29, 0xcd, 0xcd,

File diff suppressed because it is too large Load diff

View file

@ -1,13 +1,13 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: resource.proto
package pulumirpc
package status
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import empty "github.com/golang/protobuf/ptypes/empty"
import _struct "github.com/golang/protobuf/ptypes/struct"
import google_protobuf "github.com/golang/protobuf/ptypes/empty"
import google_protobuf1 "github.com/golang/protobuf/ptypes/struct"
import (
context "golang.org/x/net/context"
@ -19,47 +19,19 @@ var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
// ReadResourceRequest contains enough information to uniquely qualify and read a resource's state.
type ReadResourceRequest struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
Parent string `protobuf:"bytes,4,opt,name=parent,proto3" json:"parent,omitempty"`
Properties *_struct.Struct `protobuf:"bytes,5,opt,name=properties,proto3" json:"properties,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
Type string `protobuf:"bytes,2,opt,name=type" json:"type,omitempty"`
Name string `protobuf:"bytes,3,opt,name=name" json:"name,omitempty"`
Parent string `protobuf:"bytes,4,opt,name=parent" json:"parent,omitempty"`
Properties *google_protobuf1.Struct `protobuf:"bytes,5,opt,name=properties" json:"properties,omitempty"`
}
func (m *ReadResourceRequest) Reset() { *m = ReadResourceRequest{} }
func (m *ReadResourceRequest) String() string { return proto.CompactTextString(m) }
func (*ReadResourceRequest) ProtoMessage() {}
func (*ReadResourceRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_resource_55fabfa8edee605e, []int{0}
}
func (m *ReadResourceRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReadResourceRequest.Unmarshal(m, b)
}
func (m *ReadResourceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReadResourceRequest.Marshal(b, m, deterministic)
}
func (dst *ReadResourceRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReadResourceRequest.Merge(dst, src)
}
func (m *ReadResourceRequest) XXX_Size() int {
return xxx_messageInfo_ReadResourceRequest.Size(m)
}
func (m *ReadResourceRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ReadResourceRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ReadResourceRequest proto.InternalMessageInfo
func (m *ReadResourceRequest) Reset() { *m = ReadResourceRequest{} }
func (m *ReadResourceRequest) String() string { return proto.CompactTextString(m) }
func (*ReadResourceRequest) ProtoMessage() {}
func (*ReadResourceRequest) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{0} }
func (m *ReadResourceRequest) GetId() string {
if m != nil {
@ -89,7 +61,7 @@ func (m *ReadResourceRequest) GetParent() string {
return ""
}
func (m *ReadResourceRequest) GetProperties() *_struct.Struct {
func (m *ReadResourceRequest) GetProperties() *google_protobuf1.Struct {
if m != nil {
return m.Properties
}
@ -98,36 +70,14 @@ func (m *ReadResourceRequest) GetProperties() *_struct.Struct {
// ReadResourceResponse contains the result of reading a resource's state.
type ReadResourceResponse struct {
Urn string `protobuf:"bytes,1,opt,name=urn,proto3" json:"urn,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:"-"`
Urn string `protobuf:"bytes,1,opt,name=urn" json:"urn,omitempty"`
Properties *google_protobuf1.Struct `protobuf:"bytes,2,opt,name=properties" json:"properties,omitempty"`
}
func (m *ReadResourceResponse) Reset() { *m = ReadResourceResponse{} }
func (m *ReadResourceResponse) String() string { return proto.CompactTextString(m) }
func (*ReadResourceResponse) ProtoMessage() {}
func (*ReadResourceResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_resource_55fabfa8edee605e, []int{1}
}
func (m *ReadResourceResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReadResourceResponse.Unmarshal(m, b)
}
func (m *ReadResourceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReadResourceResponse.Marshal(b, m, deterministic)
}
func (dst *ReadResourceResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReadResourceResponse.Merge(dst, src)
}
func (m *ReadResourceResponse) XXX_Size() int {
return xxx_messageInfo_ReadResourceResponse.Size(m)
}
func (m *ReadResourceResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ReadResourceResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ReadResourceResponse proto.InternalMessageInfo
func (m *ReadResourceResponse) Reset() { *m = ReadResourceResponse{} }
func (m *ReadResourceResponse) String() string { return proto.CompactTextString(m) }
func (*ReadResourceResponse) ProtoMessage() {}
func (*ReadResourceResponse) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{1} }
func (m *ReadResourceResponse) GetUrn() string {
if m != nil {
@ -136,7 +86,7 @@ func (m *ReadResourceResponse) GetUrn() string {
return ""
}
func (m *ReadResourceResponse) GetProperties() *_struct.Struct {
func (m *ReadResourceResponse) GetProperties() *google_protobuf1.Struct {
if m != nil {
return m.Properties
}
@ -145,41 +95,19 @@ func (m *ReadResourceResponse) GetProperties() *_struct.Struct {
// RegisterResourceRequest contains information about a resource object that was newly allocated.
type RegisterResourceRequest struct {
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Parent string `protobuf:"bytes,3,opt,name=parent,proto3" json:"parent,omitempty"`
Custom bool `protobuf:"varint,4,opt,name=custom,proto3" json:"custom,omitempty"`
Object *_struct.Struct `protobuf:"bytes,5,opt,name=object,proto3" json:"object,omitempty"`
Protect bool `protobuf:"varint,6,opt,name=protect,proto3" json:"protect,omitempty"`
Dependencies []string `protobuf:"bytes,7,rep,name=dependencies,proto3" json:"dependencies,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
Parent string `protobuf:"bytes,3,opt,name=parent" json:"parent,omitempty"`
Custom bool `protobuf:"varint,4,opt,name=custom" json:"custom,omitempty"`
Object *google_protobuf1.Struct `protobuf:"bytes,5,opt,name=object" json:"object,omitempty"`
Protect bool `protobuf:"varint,6,opt,name=protect" json:"protect,omitempty"`
Dependencies []string `protobuf:"bytes,7,rep,name=dependencies" json:"dependencies,omitempty"`
}
func (m *RegisterResourceRequest) Reset() { *m = RegisterResourceRequest{} }
func (m *RegisterResourceRequest) String() string { return proto.CompactTextString(m) }
func (*RegisterResourceRequest) ProtoMessage() {}
func (*RegisterResourceRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_resource_55fabfa8edee605e, []int{2}
}
func (m *RegisterResourceRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RegisterResourceRequest.Unmarshal(m, b)
}
func (m *RegisterResourceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RegisterResourceRequest.Marshal(b, m, deterministic)
}
func (dst *RegisterResourceRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_RegisterResourceRequest.Merge(dst, src)
}
func (m *RegisterResourceRequest) XXX_Size() int {
return xxx_messageInfo_RegisterResourceRequest.Size(m)
}
func (m *RegisterResourceRequest) XXX_DiscardUnknown() {
xxx_messageInfo_RegisterResourceRequest.DiscardUnknown(m)
}
var xxx_messageInfo_RegisterResourceRequest proto.InternalMessageInfo
func (m *RegisterResourceRequest) Reset() { *m = RegisterResourceRequest{} }
func (m *RegisterResourceRequest) String() string { return proto.CompactTextString(m) }
func (*RegisterResourceRequest) ProtoMessage() {}
func (*RegisterResourceRequest) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{2} }
func (m *RegisterResourceRequest) GetType() string {
if m != nil {
@ -209,7 +137,7 @@ func (m *RegisterResourceRequest) GetCustom() bool {
return false
}
func (m *RegisterResourceRequest) GetObject() *_struct.Struct {
func (m *RegisterResourceRequest) GetObject() *google_protobuf1.Struct {
if m != nil {
return m.Object
}
@ -233,39 +161,17 @@ func (m *RegisterResourceRequest) GetDependencies() []string {
// RegisterResourceResponse is returned by the engine after a resource has finished being initialized. It includes the
// auto-assigned URN, the provider-assigned ID, and any other properties initialized by the engine.
type RegisterResourceResponse struct {
Urn string `protobuf:"bytes,1,opt,name=urn,proto3" json:"urn,omitempty"`
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
Object *_struct.Struct `protobuf:"bytes,3,opt,name=object,proto3" json:"object,omitempty"`
Stable bool `protobuf:"varint,4,opt,name=stable,proto3" json:"stable,omitempty"`
Stables []string `protobuf:"bytes,5,rep,name=stables,proto3" json:"stables,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
Urn string `protobuf:"bytes,1,opt,name=urn" json:"urn,omitempty"`
Id string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"`
Object *google_protobuf1.Struct `protobuf:"bytes,3,opt,name=object" json:"object,omitempty"`
Stable bool `protobuf:"varint,4,opt,name=stable" json:"stable,omitempty"`
Stables []string `protobuf:"bytes,5,rep,name=stables" json:"stables,omitempty"`
}
func (m *RegisterResourceResponse) Reset() { *m = RegisterResourceResponse{} }
func (m *RegisterResourceResponse) String() string { return proto.CompactTextString(m) }
func (*RegisterResourceResponse) ProtoMessage() {}
func (*RegisterResourceResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_resource_55fabfa8edee605e, []int{3}
}
func (m *RegisterResourceResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RegisterResourceResponse.Unmarshal(m, b)
}
func (m *RegisterResourceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RegisterResourceResponse.Marshal(b, m, deterministic)
}
func (dst *RegisterResourceResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_RegisterResourceResponse.Merge(dst, src)
}
func (m *RegisterResourceResponse) XXX_Size() int {
return xxx_messageInfo_RegisterResourceResponse.Size(m)
}
func (m *RegisterResourceResponse) XXX_DiscardUnknown() {
xxx_messageInfo_RegisterResourceResponse.DiscardUnknown(m)
}
var xxx_messageInfo_RegisterResourceResponse proto.InternalMessageInfo
func (m *RegisterResourceResponse) Reset() { *m = RegisterResourceResponse{} }
func (m *RegisterResourceResponse) String() string { return proto.CompactTextString(m) }
func (*RegisterResourceResponse) ProtoMessage() {}
func (*RegisterResourceResponse) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{3} }
func (m *RegisterResourceResponse) GetUrn() string {
if m != nil {
@ -281,7 +187,7 @@ func (m *RegisterResourceResponse) GetId() string {
return ""
}
func (m *RegisterResourceResponse) GetObject() *_struct.Struct {
func (m *RegisterResourceResponse) GetObject() *google_protobuf1.Struct {
if m != nil {
return m.Object
}
@ -304,36 +210,14 @@ func (m *RegisterResourceResponse) GetStables() []string {
// RegisterResourceOutputsRequest adds extra resource outputs created by the program after registration has occurred.
type RegisterResourceOutputsRequest struct {
Urn string `protobuf:"bytes,1,opt,name=urn,proto3" json:"urn,omitempty"`
Outputs *_struct.Struct `protobuf:"bytes,2,opt,name=outputs,proto3" json:"outputs,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
Urn string `protobuf:"bytes,1,opt,name=urn" json:"urn,omitempty"`
Outputs *google_protobuf1.Struct `protobuf:"bytes,2,opt,name=outputs" json:"outputs,omitempty"`
}
func (m *RegisterResourceOutputsRequest) Reset() { *m = RegisterResourceOutputsRequest{} }
func (m *RegisterResourceOutputsRequest) String() string { return proto.CompactTextString(m) }
func (*RegisterResourceOutputsRequest) ProtoMessage() {}
func (*RegisterResourceOutputsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_resource_55fabfa8edee605e, []int{4}
}
func (m *RegisterResourceOutputsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RegisterResourceOutputsRequest.Unmarshal(m, b)
}
func (m *RegisterResourceOutputsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RegisterResourceOutputsRequest.Marshal(b, m, deterministic)
}
func (dst *RegisterResourceOutputsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_RegisterResourceOutputsRequest.Merge(dst, src)
}
func (m *RegisterResourceOutputsRequest) XXX_Size() int {
return xxx_messageInfo_RegisterResourceOutputsRequest.Size(m)
}
func (m *RegisterResourceOutputsRequest) XXX_DiscardUnknown() {
xxx_messageInfo_RegisterResourceOutputsRequest.DiscardUnknown(m)
}
var xxx_messageInfo_RegisterResourceOutputsRequest proto.InternalMessageInfo
func (m *RegisterResourceOutputsRequest) Reset() { *m = RegisterResourceOutputsRequest{} }
func (m *RegisterResourceOutputsRequest) String() string { return proto.CompactTextString(m) }
func (*RegisterResourceOutputsRequest) ProtoMessage() {}
func (*RegisterResourceOutputsRequest) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{4} }
func (m *RegisterResourceOutputsRequest) GetUrn() string {
if m != nil {
@ -342,7 +226,7 @@ func (m *RegisterResourceOutputsRequest) GetUrn() string {
return ""
}
func (m *RegisterResourceOutputsRequest) GetOutputs() *_struct.Struct {
func (m *RegisterResourceOutputsRequest) GetOutputs() *google_protobuf1.Struct {
if m != nil {
return m.Outputs
}
@ -365,14 +249,13 @@ var _ grpc.ClientConn
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// ResourceMonitorClient is the client API for ResourceMonitor service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
// Client API for ResourceMonitor service
type ResourceMonitorClient interface {
Invoke(ctx context.Context, in *InvokeRequest, opts ...grpc.CallOption) (*InvokeResponse, error)
ReadResource(ctx context.Context, in *ReadResourceRequest, opts ...grpc.CallOption) (*ReadResourceResponse, error)
RegisterResource(ctx context.Context, in *RegisterResourceRequest, opts ...grpc.CallOption) (*RegisterResourceResponse, error)
RegisterResourceOutputs(ctx context.Context, in *RegisterResourceOutputsRequest, opts ...grpc.CallOption) (*empty.Empty, error)
RegisterResourceOutputs(ctx context.Context, in *RegisterResourceOutputsRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error)
}
type resourceMonitorClient struct {
@ -385,7 +268,7 @@ func NewResourceMonitorClient(cc *grpc.ClientConn) ResourceMonitorClient {
func (c *resourceMonitorClient) Invoke(ctx context.Context, in *InvokeRequest, opts ...grpc.CallOption) (*InvokeResponse, error) {
out := new(InvokeResponse)
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceMonitor/Invoke", in, out, opts...)
err := grpc.Invoke(ctx, "/pulumirpc.ResourceMonitor/Invoke", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
@ -394,7 +277,7 @@ func (c *resourceMonitorClient) Invoke(ctx context.Context, in *InvokeRequest, o
func (c *resourceMonitorClient) ReadResource(ctx context.Context, in *ReadResourceRequest, opts ...grpc.CallOption) (*ReadResourceResponse, error) {
out := new(ReadResourceResponse)
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceMonitor/ReadResource", in, out, opts...)
err := grpc.Invoke(ctx, "/pulumirpc.ResourceMonitor/ReadResource", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
@ -403,28 +286,29 @@ func (c *resourceMonitorClient) ReadResource(ctx context.Context, in *ReadResour
func (c *resourceMonitorClient) RegisterResource(ctx context.Context, in *RegisterResourceRequest, opts ...grpc.CallOption) (*RegisterResourceResponse, error) {
out := new(RegisterResourceResponse)
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceMonitor/RegisterResource", in, out, opts...)
err := grpc.Invoke(ctx, "/pulumirpc.ResourceMonitor/RegisterResource", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *resourceMonitorClient) RegisterResourceOutputs(ctx context.Context, in *RegisterResourceOutputsRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
err := c.cc.Invoke(ctx, "/pulumirpc.ResourceMonitor/RegisterResourceOutputs", in, out, opts...)
func (c *resourceMonitorClient) RegisterResourceOutputs(ctx context.Context, in *RegisterResourceOutputsRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) {
out := new(google_protobuf.Empty)
err := grpc.Invoke(ctx, "/pulumirpc.ResourceMonitor/RegisterResourceOutputs", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ResourceMonitorServer is the server API for ResourceMonitor service.
// Server API for ResourceMonitor service
type ResourceMonitorServer interface {
Invoke(context.Context, *InvokeRequest) (*InvokeResponse, error)
ReadResource(context.Context, *ReadResourceRequest) (*ReadResourceResponse, error)
RegisterResource(context.Context, *RegisterResourceRequest) (*RegisterResourceResponse, error)
RegisterResourceOutputs(context.Context, *RegisterResourceOutputsRequest) (*empty.Empty, error)
RegisterResourceOutputs(context.Context, *RegisterResourceOutputsRequest) (*google_protobuf.Empty, error)
}
func RegisterResourceMonitorServer(s *grpc.Server, srv ResourceMonitorServer) {
@ -528,9 +412,9 @@ var _ResourceMonitor_serviceDesc = grpc.ServiceDesc{
Metadata: "resource.proto",
}
func init() { proto.RegisterFile("resource.proto", fileDescriptor_resource_55fabfa8edee605e) }
func init() { proto.RegisterFile("resource.proto", fileDescriptor6) }
var fileDescriptor_resource_55fabfa8edee605e = []byte{
var fileDescriptor6 = []byte{
// 472 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0x3b, 0x8f, 0xd3, 0x40,
0x10, 0x3e, 0xdb, 0x87, 0x43, 0x86, 0x53, 0x38, 0x0d, 0x28, 0x67, 0x0c, 0x3a, 0x22, 0xd3, 0x84,

View file

@ -1 +1 @@
Generated by version libprotoc 3.6.0 of protoc
Generated by version libprotoc 3.5.1 of protoc

92
sdk/proto/status.proto Normal file
View file

@ -0,0 +1,92 @@
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package google.rpc;
import "google/protobuf/any.proto";
option go_package = "google.golang.org/genproto/googleapis/rpc/status;status";
option java_multiple_files = true;
option java_outer_classname = "StatusProto";
option java_package = "com.google.rpc";
option objc_class_prefix = "RPC";
// The `Status` type defines a logical error model that is suitable for different
// programming environments, including REST APIs and RPC APIs. It is used by
// [gRPC](https://github.com/grpc). The error model is designed to be:
//
// - Simple to use and understand for most users
// - Flexible enough to meet unexpected needs
//
// # Overview
//
// The `Status` message contains three pieces of data: error code, error message,
// and error details. The error code should be an enum value of
// [google.rpc.Code][google.rpc.Code], but it may accept additional error codes if needed. The
// error message should be a developer-facing English message that helps
// developers *understand* and *resolve* the error. If a localized user-facing
// error message is needed, put the localized message in the error details or
// localize it in the client. The optional error details may contain arbitrary
// information about the error. There is a predefined set of error detail types
// in the package `google.rpc` which can be used for common error conditions.
//
// # Language mapping
//
// The `Status` message is the logical representation of the error model, but it
// is not necessarily the actual wire format. When the `Status` message is
// exposed in different client libraries and different wire protocols, it can be
// mapped differently. For example, it will likely be mapped to some exceptions
// in Java, but more likely mapped to some error codes in C.
//
// # Other uses
//
// The error model and the `Status` message can be used in a variety of
// environments, either with or without APIs, to provide a
// consistent developer experience across different environments.
//
// Example uses of this error model include:
//
// - Partial errors. If a service needs to return partial errors to the client,
// it may embed the `Status` in the normal response to indicate the partial
// errors.
//
// - Workflow errors. A typical workflow has multiple steps. Each step may
// have a `Status` message for error reporting purpose.
//
// - Batch operations. If a client uses batch request and batch response, the
// `Status` message should be used directly inside batch response, one for
// each error sub-response.
//
// - Asynchronous operations. If an API call embeds asynchronous operation
// results in its response, the status of those operations should be
// represented directly using the `Status` message.
//
// - Logging. If some API errors are stored in logs, the message `Status` could
// be used directly after any stripping needed for security/privacy reasons.
message Status {
// The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
int32 code = 1;
// A developer-facing error message, which should be in English. Any
// user-facing error message should be localized and sent in the
// [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
string message = 2;
// A list of messages that carry the error details. There will be a
// common set of message types for APIs to use.
repeated google.protobuf.Any details = 3;
}

View file

@ -0,0 +1,88 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: status.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name='status.proto',
package='google.rpc',
syntax='proto3',
serialized_pb=_b('\n\x0cstatus.proto\x12\ngoogle.rpc\x1a\x19google/protobuf/any.proto\"N\n\x06Status\x12\x0c\n\x04\x63ode\x18\x01 \x01(\x05\x12\x0f\n\x07message\x18\x02 \x01(\t\x12%\n\x07\x64\x65tails\x18\x03 \x03(\x0b\x32\x14.google.protobuf.AnyB^\n\x0e\x63om.google.rpcB\x0bStatusProtoP\x01Z7google.golang.org/genproto/googleapis/rpc/status;status\xa2\x02\x03RPCb\x06proto3')
,
dependencies=[google_dot_protobuf_dot_any__pb2.DESCRIPTOR,])
_STATUS = _descriptor.Descriptor(
name='Status',
full_name='google.rpc.Status',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='code', full_name='google.rpc.Status.code', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='message', full_name='google.rpc.Status.message', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='details', full_name='google.rpc.Status.details', index=2,
number=3, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=55,
serialized_end=133,
)
_STATUS.fields_by_name['details'].message_type = google_dot_protobuf_dot_any__pb2._ANY
DESCRIPTOR.message_types_by_name['Status'] = _STATUS
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
Status = _reflection.GeneratedProtocolMessageType('Status', (_message.Message,), dict(
DESCRIPTOR = _STATUS,
__module__ = 'status_pb2'
# @@protoc_insertion_point(class_scope:google.rpc.Status)
))
_sym_db.RegisterMessage(Status)
DESCRIPTOR.has_options = True
DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n\016com.google.rpcB\013StatusProtoP\001Z7google.golang.org/genproto/googleapis/rpc/status;status\242\002\003RPC'))
# @@protoc_insertion_point(module_scope)

View file

@ -0,0 +1,3 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc