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 where the parameter is stored.
ProjectId string `mapstructure:"project_id" required:"true"`
// The location in which parameter is stored. Defaults to "global" if not specified.
Location string `mapstructure:"location"`
// The name of the parameter within the Parameter Manager.
Name string `mapstructure:"name" required:"true"`
// The version of the parameter within the Parameter Manager.
Version string `mapstructure:"version" required:"true"`
// A specific key to extract from the parameter payload if it's a JSON or YAML object.
Key string `mapstructure:"key"`
}
Config is the configuration structure for the data source.
type Datasource ¶
type Datasource struct {
// contains filtered or unexported fields
}
Datasource is the data source implementation.
func (*Datasource) ConfigSpec ¶
func (d *Datasource) ConfigSpec() hcldec.ObjectSpec
ConfigSpec returns the HCL object spec for the data source configuration.
func (*Datasource) Configure ¶
func (d *Datasource) Configure(raws ...interface{}) error
Configure sets up the data source configuration.
func (*Datasource) Execute ¶
func (d *Datasource) Execute() (cty.Value, error)
Execute fetches the parameter from Google Cloud Parameter Manager.
func (*Datasource) OutputSpec ¶
func (d *Datasource) OutputSpec() hcldec.ObjectSpec
OutputSpec returns the HCL object spec for the data source output.
type DatasourceOutput ¶
type DatasourceOutput struct {
// The raw string payload of the parameter version.
Payload string `mapstructure:"payload"`
// The value extracted using the 'key', if provided.
Value string `mapstructure:"value"`
}
DatasourceOutput contains the data returned by the data source.
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" required:"true" cty:"project_id" hcl:"project_id"`
Location *string `mapstructure:"location" cty:"location" hcl:"location"`
Name *string `mapstructure:"name" required:"true" cty:"name" hcl:"name"`
Version *string `mapstructure:"version" required:"true" cty:"version" hcl:"version"`
Key *string `mapstructure:"key" cty:"key" hcl:"key"`
}
FlatConfig is an auto-generated flat version of Config. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type FlatDatasourceOutput ¶
type FlatDatasourceOutput struct {
Payload *string `mapstructure:"payload" cty:"payload" hcl:"payload"`
Value *string `mapstructure:"value" cty:"value" hcl:"value"`
}
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.