parameterize

package
v0.0.0-...-44613e8 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

parameterize encapsulates parsing parameterize args as well as marshaling and unmarshaling parameterize values. It only handles transforming from untyped github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin.ParameterizeRequest to typed values, and does not validate that described providers exist.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Args

type Args struct {
	Remote *RemoteArgs
	Local  *LocalArgs
}

Args represents a parsed CLI argument from a parameterize call.

func ParseArgs

func ParseArgs(ctx context.Context, a []string) (Args, error)

type LocalArgs

type LocalArgs struct {
	// Path is the path to the provider binary. It can be relative or absolute.
	Path string

	// UpstreamRepoPath (if provided) is the local path to the dynamically bridged Terraform provider's repo.
	//
	// If set, full documentation will be generated for the provider.
	// If not set, only documentation from the TF provider's schema will be used.
	UpstreamRepoPath string
}

LocalArgs represents a local TF provider referenced by path.

type LocalValue

type LocalValue struct {
	// The local or absolute path to the Terraform provider on disk.
	Path string `json:"path"`
}

type RemoteArgs

type RemoteArgs struct {
	// Name is a (possibly qualified) name of the provider.
	Name string
	// Version is the (possibly empty) version constraint on the provider.
	Version string

	// Docs indicates if full schema documentation should be generated.
	Docs bool
}

RemoteArgs represents a TF provider referenced by name.

type RemoteValue

type RemoteValue struct {
	// The fully qualified URL of the remote value.
	URL string `json:"url"`
	// The fully specified version of the remote value.
	Version string `json:"version"`
}

type Value

type Value struct {
	Remote *RemoteValue `json:"remote,omitempty"`
	Local  *LocalValue  `json:"local,omitempty"`
}

Value represents a fully qualified provider reference suitable to be embedded in generated SDKs.

It is conceptually an either, and only Remote or Local will be non-nil.

func ParseValue

func ParseValue(b []byte) (Value, error)

func (*Value) IntoArgs

func (p *Value) IntoArgs() Args

IntoArgs converts a Value into an Args.

We can do this because Value is a fully resolved Args, and so it is always possible to go from Value to Args.

func (Value) Marshal

func (p Value) Marshal() []byte

func (*Value) Unmarshal

func (p *Value) Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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