MCPcopy
hub / github.com/hashicorp/packer / Decodable

Interface Decodable

hcl2template/decode.go:15–17  ·  view source on GitHub ↗

Decodable structs are structs that can tell their hcl2 ObjectSpec; this config spec will be passed to hcldec.Decode and the result will be a cty.Value. This Value can then be applied on the said struct.

Source from the content-addressed store, hash-verified

13// config spec will be passed to hcldec.Decode and the result will be a
14// cty.Value. This Value can then be applied on the said struct.
15type Decodable interface {
16 ConfigSpec() hcldec.ObjectSpec
17}
18
19func decodeHCL2Spec(body hcl.Body, ectx *hcl.EvalContext, dec Decodable) (cty.Value, hcl.Diagnostics) {
20 return hcldec.Decode(body, dec.ConfigSpec(), ectx)

Callers 8

ConfigSpecMethod · 0.65
decodeHCL2SpecFunction · 0.65
ConfigSpecMethod · 0.65
ConfigSpecMethod · 0.65
ConfigSpecMethod · 0.65
ConfigSpecMethod · 0.65
ConfigSpecMethod · 0.65

Implementers 15

Datasourcedatasource/hcp-packer-image/data.go
Datasourcedatasource/null/data.go
Datasourcedatasource/http/data.go
Datasourcedatasource/hcp-packer-version/data.go
Datasourcedatasource/hcp-packer-artifact/data.go
Datasourcedatasource/hcp-packer-iteration/data.g
ParallelTestBuildercommand/build_parallel_test.go
LockedBuildercommand/build_parallel_test.go
PostProcessorpost-processor/shell-local/post-proces
PostProcessorpost-processor/checksum/post-processor
PostProcessorpost-processor/compress/post-processor
PostProcessorpost-processor/manifest/post-processor

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…