MCPcopy
hub / github.com/hashicorp/hcl / Content

Method Content

structure.go:50–50  ·  view source on GitHub ↗

Content verifies that the entire body content conforms to the given schema and then returns it, and/or returns diagnostics. The returned body content is valid if non-nil, regardless of whether Diagnostics are provided, but diagnostics should still be eventually shown to the user.

(schema *BodySchema)

Source from the content-addressed store, hash-verified

48 // are provided, but diagnostics should still be eventually shown to
49 // the user.
50 Content(schema *BodySchema) (*BodyContent, Diagnostics)
51
52 // PartialContent is like Content except that it permits the configuration
53 // to contain additional blocks or attributes not specified in the

Callers 15

TestMergedBodiesContentFunction · 0.65
mergedContentMethod · 0.65
decodeBodyToStructFunction · 0.65
TestBodyContentFunction · 0.65
LoadTestFileMethod · 0.65
decodeTraversalsBlockMethod · 0.65
decodePosFromBodyMethod · 0.65
decodeSpecRootFunction · 0.65
decodeObjectSpecFunction · 0.65
decodeArraySpecFunction · 0.65

Implementers 8

Bodyhclsyntax/structure.go
unknownBodyext/dynblock/unknown_body.go
expandBodyext/dynblock/expand_body.go
deepWrapperext/transform/transform.go
diagBodyext/transform/error.go
bodyjson/structure.go
mockBodyhcltest/mock.go

Calls

no outgoing calls

Tested by 7

TestMergedBodiesContentFunction · 0.52
TestBodyContentFunction · 0.52
TestDeepFunction · 0.52
TestBodyContentFunction · 0.52
TestParseWithStartPosFunction · 0.52