Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewExecutor ¶
func NewExecutor(params ExecutorParams) (formats.Executor, error)
func ToProtobufMessage ¶
func ToProtobufMessage(obj cty.Value, into protoreflect.Message) error
ToProtobufMessage writes the values from the given value into the fields of the given protobuf message.
The given value must have an object type matching what ImpliedTypeForMessageDesc would return for the message descriptor associated with the message given in "into", or else decoding will fail.
The types in the protocol buffers type system can have a smaller range than the corresponding cty types we convert from, so this function might return an error if the given values are out of range. In those cases, the returned error will be a cty.PathError with a message written to be understood by an end-user who provided whatever data was converted to cty.Value, without mentioning protobuf implementation details.
In case of any error, the given message may be partially updated.
Protocol buffers has no concept of an unknown value, so ToProtobufMessage will return an error if there are any unknown values in the given object. Don't pass marked values to ToProtobufMessage; it will panic if it encounters any values that are marked.