| 1 | package ctyscip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/ |
| 2 | |
| 3 | // unknownType is the placeholder type used for the sigil value representing |
| 4 | // "Unknown", to make it unambigiously distinct from any other possible value. |
| 5 | type unknownTypescip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/unknownType# struct { |
| 6 | } |
| 7 | |
| 8 | // unknown is a special value that can be used as the internal value of a |
| 9 | // Value to create a placeholder for a value that isn't yet known. |
| 10 | var unknownscip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/unknown. interface{} = &unknownTypescip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/unknownType#{} |
| 11 | |
| 12 | // UnknownVal returns an Value that represents an unknown value of the given |
| 13 | // type. Unknown values can be used to represent a value that is |
| 14 | // not yet known. Its meaning is undefined in cty, but it could be used by |
| 15 | // an calling application to allow partial evaluation. |
| 16 | // |
| 17 | // Unknown values of any type can be created of any type. All operations on |
| 18 | // Unknown values themselves return Unknown. |
| 19 | func UnknownValscip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/UnknownVal().(t Typescip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/Type#) Valuescip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/Value# { |
| 20 | return Valuescip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/Value#{ |
| 21 | tyscip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/Value#ty.: t, |
| 22 | vscip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/Value#v.: unknownscip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/unknown., |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | func (t unknownTypescip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/unknownType#) GoStringscip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/unknownType#GoString().() string { |
| 27 | // This is the stringification of our internal unknown marker. The |
| 28 | // stringification of the public representation of unknowns is in |
| 29 | // Value.GoString. |
| 30 | return "cty.unknown" |
| 31 | } |
| 32 | |
| 33 | type pseudoTypeDynamicscip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/pseudoTypeDynamic# struct { |
| 34 | typeImplSigilscip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/pseudoTypeDynamic#typeImplSigil. |
| 35 | } |
| 36 | |
| 37 | // DynamicPseudoType represents the dynamic pseudo-type. |
| 38 | // |
| 39 | // This type can represent situations where a type is not yet known. Its |
| 40 | // meaning is undefined in cty, but it could be used by a calling |
| 41 | // application to allow expression type checking with some types not yet known. |
| 42 | // For example, the application might optimistically permit any operation on |
| 43 | // values of this type in type checking, allowing a partial type-check result, |
| 44 | // and then repeat the check when more information is known to get the |
| 45 | // final, concrete type. |
| 46 | // |
| 47 | // It is a pseudo-type because it is used only as a sigil to the calling |
| 48 | // application. "Unknown" is the only valid value of this pseudo-type, so |
| 49 | // operations on values of this type will always short-circuit as per |
| 50 | // the rules for that special value. |
| 51 | var DynamicPseudoTypescip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/DynamicPseudoType. Typescip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/Type# |
| 52 | |
| 53 | func (t pseudoTypeDynamicscip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/pseudoTypeDynamic#) Equalsscip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/pseudoTypeDynamic#Equals().(other Typescip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/Type#) bool { |
| 54 | _, ok := other.typeImplscip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/Type#typeImpl..(pseudoTypeDynamicscip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/pseudoTypeDynamic#) |
| 55 | return ok |
| 56 | } |
| 57 | |
| 58 | func (t pseudoTypeDynamicscip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/pseudoTypeDynamic#) FriendlyNamescip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/pseudoTypeDynamic#FriendlyName().(mode friendlyTypeNameModescip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/friendlyTypeNameMode#) string { |
| 59 | switch mode { |
| 60 | case friendlyTypeConstraintNamescip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/friendlyTypeConstraintName.: |
| 61 | return "any type" |
| 62 | default: |
| 63 | return "dynamic" |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | func (t pseudoTypeDynamicscip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/pseudoTypeDynamic#) GoStringscip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/pseudoTypeDynamic#GoString().() string { |
| 68 | return "cty.DynamicPseudoType" |
| 69 | } |
| 70 | |
| 71 | // DynamicVal is the only valid value of the pseudo-type dynamic. |
| 72 | // This value can be used as a placeholder where a value or expression's |
| 73 | // type and value are both unknown, thus allowing partial evaluation. See |
| 74 | // the docs for DynamicPseudoType for more information. |
| 75 | var DynamicValscip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/DynamicVal. Valuescip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/Value# |
| 76 | |
| 77 | func initscip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/init().() { |
| 78 | DynamicPseudoTypescip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/DynamicPseudoType. = Typescip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/Type#{ |
| 79 | pseudoTypeDynamicscip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/pseudoTypeDynamic#{}, |
| 80 | } |
| 81 | DynamicValscip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/DynamicVal. = Valuescip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/Value#{ |
| 82 | tyscip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/Value#ty.: DynamicPseudoTypescip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/DynamicPseudoType., |
| 83 | vscip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/Value#v.: unknownscip-go gomod github.com/zclconf/go-cty . `github.com/zclconf/go-cty/cty`/unknown., |
| 84 | } |
| 85 | } |