# Packages
Package convert contains some routines for converting between cty types.
Package ctystrings is a collection of string manipulation utilities which intend to help application developers implement string-manipulation functionality in a way that respects the cty model of strings, even when they are working in the realm of Go strings.
Package function builds on the functionality of cty by modeling functions that operate on cty Values.
Package gocty deals with converting between cty Values and native go values.
Package json provides functions for serializing cty types and values in JSON format, and for decoding them again.
Package msgpack provides functions for serializing cty values in the msgpack encoding, and decoding them again.
No description provided by the author
# Functions
BoolVal returns a Value of type Number whose internal value is the given bool.
CanListVal returns false if the given Values can not be coalesced into a single List due to inconsistent element types.
CanMapVal returns false if the given Values can not be coalesced into a single Map due to inconsistent element types.
CanSetVal returns false if the given Values can not be coalesced into a single Set due to inconsistent element types.
Capsule creates a new Capsule type.
CapsuleVal creates a value of the given capsule type using the given wrapVal, which must be a pointer to a value of the capsule type's native type.
CapsuleWithOps is like Capsule except the caller may provide an object representing some overloaded operation implementations to associate with the given capsule type.
GetAttrPath is a convenience method to start a new Path with a GetAttrStep.
IndexIntPath is a typed convenience method for IndexPath.
IndexPath is a convenience method to start a new Path with an IndexStep.
IndexStringPath is a typed convenience method for IndexPath.
List creates a map type with the given element Type.
ListVal returns a Value of list type whose element type is defined by the types of the given values, which must be homogenous.
ListValEmpty returns an empty list of the given element type.
Map creates a map type with the given element Type.
MapVal returns a Value of a map type whose element type is defined by the types of the given values, which must be homogenous.
MapValEmpty returns an empty map of the given element type.
MustParseNumberVal is like ParseNumberVal but it will panic in case of any error.
NewPathSet creates and returns a PathSet, with initial contents optionally set by the given arguments.
NewValueMarks constructs a new ValueMarks set with the given mark values.
NewValueSet creates and returns a new ValueSet with the given element type.
NormalizeString applies the same normalization that cty applies when constructing string values.
NullVal returns a null value of the given type.
NumberFloatVal returns a Value of type Number whose internal value is equal to the given float.
NumberIntVal returns a Value of type Number whose internal value is equal to the given integer.
NumberUIntVal returns a Value of type Number whose internal value is equal to the given unsigned integer.
NumberVal returns a Value of type Number whose internal value is the given big.Float.
Object creates an object type with the given attribute types.
ObjectVal returns a Value of an object type whose structure is defined by the key names and value types in the given map.
ObjectWithOptionalAttrs creates an object type where some of its attributes are optional.
ParseNumberVal returns a Value of type number produced by parsing the given string as a decimal real number.
Set creates a set type with the given element Type.
SetVal returns a Value of set type whose element type is defined by the types of the given values, which must be homogenous.
SetValEmpty returns an empty set of the given element type.
SetValFromValueSet returns a Value of set type based on an already-constructed ValueSet.
StringVal returns a Value of type String whose internal value is the given string.
Transform visits all of the values in a possibly-complex structure, calling a given function for each value which has an opportunity to replace that value.
TransformWithTransformer allows the caller to more closely control the traversal used for transformation.
Tuple creates a tuple type with the given element types.
TupleVal returns a Value of a tuple type whose element types are defined by the value types in the given slice.
UnknownAsNull returns a value of the same type as the given value but with any unknown values (including nested values) replaced with null values of the same type.
UnknownVal returns an Value that represents an unknown value of the given type.
Walk visits all of the values in a possibly-complex structure, calling a given function for each value.
# Variables
Bool is the boolean type.
DynamicPseudoType represents the dynamic pseudo-type.
DynamicVal is the only valid value of the pseudo-type dynamic.
EmptyObject is a shorthand for Object(map[string]Type{}), to more easily talk about the empty object type.
EmptyObjectVal is the only possible non-null, non-unknown value of type EmptyObject.
EmptyTuple is a shorthand for Tuple([]Type{}), to more easily talk about the empty tuple type.
EmptyTupleVal is the only possible non-null, non-unknown value of type EmptyTuple.
False is the falsey value of type Bool.
NegativeInfinity is a Number value representing negative infinity.
NilType is an invalid type used when a function is returning an error and has no useful type to return.
NilVal is an invalid Value that can be used as a placeholder when returning with an error from a function that returns (Value, error).
Number is the numeric type.
PositiveInfinity is a Number value representing positive infinity.
String is the string type.
True is the truthy value of type Bool.
Zero is a number value representing exactly zero.
# Structs
CapsuleOps represents a set of overloaded operations for a capsule type.
GetAttrStep is a Step implementation representing retrieving an attribute from a value, which must be of an object type.
IndexStep is a Step implementation representing applying the index operation to a value, which must be of either a list, map, or set type.
PathError is a specialization of error that represents where in a potentially-deep data structure an error occured, using a Path.
PathSet represents a set of Path objects.
PathValueMarks is a structure that enables tracking marks and the paths where they are located in one type.
RefinementBuilder is a supporting type for the [Value.Refine] method, using the builder pattern to apply zero or more constraints before constructing a new value with all of those constraints applied.
Type represents value types within the type system.
Value represents a value of a particular type, and is the interface by which operations are executed on typed values.
ValueRange offers partial information about the range of a value.
ValueSet is to cty.Set what []cty.Value is to cty.List and map[string]cty.Value is to cty.Map.
# Interfaces
ElementIterator is the interface type returned by Value.ElementIterator to allow the caller to iterate over elements of a collection-typed value.
PathStep represents a single step down into a data structure, as part of a Path.
Transformer is the interface used to optionally transform values in a possibly-complex structure.
# Type aliases
ElementCallback is a callback type used for iterating over elements of collections and attributes of objects.
A Path is a sequence of operations to locate a nested value within a data structure.
ValueMarks is a map, representing a set, of "mark" values associated with a Value.