hclformat

package
v1.4.27 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExecutor

func NewExecutor(params ExecutorParams) (formats.Executor, error)

func NewReader

func NewReader(input io.Reader) formats.Reader

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.

Types

type ExecutorParams

type ExecutorParams struct {
	Input          io.Reader
	DhClient       client.Client
	OverrideConfig OverrideConfig
	DoMigration    bool
	ForceMigration bool
	DataOnly       bool
	FileName       string
}

type OverrideConfig

type OverrideConfig struct {
	Namespace  string
	DataSource string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL