jsonschema

package
v0.0.0-...-03d5297 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: MPL-2.0 Imports: 6 Imported by: 3

Documentation

Overview

Package configschema is an adoption of a subset of the github.com/hashicorp/terraform/internal/configs/configschema@92574a7811111f6afef4a16c9b72b8bd53e882e1. It only focus on the implied type (and its dependencies) of the schema `Block` type. But instead of the `Block` defined internally by terraform core, it target to the github.com/hashicorp/terraform-json.SchemaBlock.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecoderSpec

func DecoderSpec(b *tfjson.SchemaBlock) hcldec.Spec

DecoderSpec returns a hcldec.Spec that can be used to decode a HCL body using the facilities in the hcldec package.

func SchemaAttributeEmptyValue

func SchemaAttributeEmptyValue(a *tfjson.SchemaAttribute) cty.Value

SchemaAttributeEmptyValue returns the "empty value" for the receiving attribute, which is the value that would be returned if there were no definition of the attribute at all, ignoring any required constraint.

func SchemaAttributeImpliedType

func SchemaAttributeImpliedType(o *tfjson.SchemaAttribute) cty.Type

ImpliedType returns the cty.Type that would result from decoding a NestedType Attribute using the receiving block schema.

func SchemaBlockEmptyValue

func SchemaBlockEmptyValue(b *tfjson.SchemaBlock) cty.Value

SchemaBlockEmptyValue returns the "empty value" for the recieving block, which for a block type is a non-null object where all of the attribute values are the empty values of the block's attributes and nested block types.

func SchemaBlockImpliedType

func SchemaBlockImpliedType(b *tfjson.SchemaBlock) cty.Type

SchemaBlockImpliedType returns the cty.Type that would result from decoding a configuration block using the receiving block schema.

func SchemaBlockTypeEmptyValue

func SchemaBlockTypeEmptyValue(b *tfjson.SchemaBlockType) cty.Value
SchemaBlockTypeEmptyValue returns the "empty value" for when there are zero nested blocks

present of the receiving type.

func SchemaNestedAttributeTypeImpliedType

func SchemaNestedAttributeTypeImpliedType(o *tfjson.SchemaNestedAttributeType) cty.Type

SchemaNestedAttributeTypeImpliedType returns the cty.Type that would result from decoding a NestedType Attribute using the SchemaNestedAttributeType.

Types

This section is empty.

Jump to

Keyboard shortcuts

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