image

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2025 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// The Google Cloud project ID to search for images.
	ProjectID string `mapstructure:"project_id"`
	// The filter expression to narrow down the image search.
	// For example: "name=ubuntu" or "family=ubuntu-2004".
	// The exrpressions can be combined with AND/OR like this:
	// "name=ubuntu AND family=ubuntu-2004".
	// See https://cloud.google.com/sdk/gcloud/reference/topic/filters
	Filters string `mapstructure:"filters"`
	// If true, the most recent image will be returned.
	// If false, an error will be returned if more than one image matches the filters.
	MostRecent bool `mapstructure:"most_recent"`
}

func (*Config) FlatMapstructure

func (*Config) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }

FlatMapstructure returns a new FlatConfig. FlatConfig is an auto-generated flat version of Config. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.

type Datasource

type Datasource struct {
	// contains filtered or unexported fields
}

func (*Datasource) ConfigSpec

func (d *Datasource) ConfigSpec() hcldec.ObjectSpec

func (*Datasource) Configure

func (d *Datasource) Configure(raws ...interface{}) error

func (*Datasource) Execute

func (d *Datasource) Execute() (cty.Value, error)

func (*Datasource) OutputSpec

func (d *Datasource) OutputSpec() hcldec.ObjectSpec

type DatasourceOutput

type DatasourceOutput struct {
	ID           string            `mapstructure:"id"`
	Name         string            `mapstructure:"name"`
	CreationDate string            `mapstructure:"creation_date"`
	Labels       map[string]string `mapstructure:"labels"`
}

func (*DatasourceOutput) FlatMapstructure

func (*DatasourceOutput) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }

FlatMapstructure returns a new FlatDatasourceOutput. FlatDatasourceOutput is an auto-generated flat version of DatasourceOutput. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.

type FlatConfig

type FlatConfig struct {
	ProjectID  *string `mapstructure:"project_id" cty:"project_id" hcl:"project_id"`
	Filters    *string `mapstructure:"filters" cty:"filters" hcl:"filters"`
	MostRecent *bool   `mapstructure:"most_recent" cty:"most_recent" hcl:"most_recent"`
}

FlatConfig is an auto-generated flat version of Config. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.

func (*FlatConfig) HCL2Spec

func (*FlatConfig) HCL2Spec() map[string]hcldec.Spec

HCL2Spec returns the hcl spec of a Config. This spec is used by HCL to read the fields of Config. The decoded values from this spec will then be applied to a FlatConfig.

type FlatDatasourceOutput

type FlatDatasourceOutput struct {
	ID           *string           `mapstructure:"id" cty:"id" hcl:"id"`
	Name         *string           `mapstructure:"name" cty:"name" hcl:"name"`
	CreationDate *string           `mapstructure:"creation_date" cty:"creation_date" hcl:"creation_date"`
	Labels       map[string]string `mapstructure:"labels" cty:"labels" hcl:"labels"`
}

FlatDatasourceOutput is an auto-generated flat version of DatasourceOutput. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.

func (*FlatDatasourceOutput) HCL2Spec

func (*FlatDatasourceOutput) HCL2Spec() map[string]hcldec.Spec

HCL2Spec returns the hcl spec of a DatasourceOutput. This spec is used by HCL to read the fields of DatasourceOutput. The decoded values from this spec will then be applied to a FlatDatasourceOutput.

Jump to

Keyboard shortcuts

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