Skip to main content
Less oft-needed functions to manipulate Tokens.

Initializers

import "github.com/open-constructs/cdk-terrain-go/cdktn"

cdktn.NewTokenization() Tokenization
NameTypeDescription

Static Functions

NameDescription
IsResolvableReturn whether the given object is an IResolvable object.
ResolveResolves an object by evaluating all tokens and removing any undefined or empty objects or arrays.
ReverseReverse any value into Resolvables, if possible.
ReverseListUn-encode a Tokenized value from a list.
ReverseMapUn-encode a Tokenized value from a map.
ReverseNumberUn-encode a Tokenized value from a number.
ReverseNumberListUn-encode a Tokenized value from a list.
ReverseStringUn-encode a string potentially containing encoded tokens.
StringifyNumberStringify a number directly or lazily if it’s a Token.

IsResolvable

import "github.com/open-constructs/cdk-terrain-go/cdktn"

cdktn.Tokenization_IsResolvable(obj interface{}) *bool
Return whether the given object is an IResolvable object. This is different from Token.isUnresolved() which will also check for encoded Tokens, whereas this method will only do a type check on the given object.

objRequired

  • Type: interface{}

Resolve

import "github.com/open-constructs/cdk-terrain-go/cdktn"

cdktn.Tokenization_Resolve(obj interface{}, options ResolveOptions) interface{}
Resolves an object by evaluating all tokens and removing any undefined or empty objects or arrays. Values can only be primitives, arrays or tokens. Other objects (i.e. with methods) will be rejected.

objRequired

  • Type: interface{}
The object to resolve.

optionsRequired

Prefix key path components for diagnostics.

Reverse

import "github.com/open-constructs/cdk-terrain-go/cdktn"

cdktn.Tokenization_Reverse(x interface{}) *[]IResolvable
Reverse any value into Resolvables, if possible.

xRequired

  • Type: interface{}

ReverseList

import "github.com/open-constructs/cdk-terrain-go/cdktn"

cdktn.Tokenization_ReverseList(l *[]*string) IResolvable
Un-encode a Tokenized value from a list.

lRequired

  • Type: *[]*string

ReverseMap

import "github.com/open-constructs/cdk-terrain-go/cdktn"

cdktn.Tokenization_ReverseMap(m *map[string]interface{}) IResolvable
Un-encode a Tokenized value from a map.

mRequired

  • Type: *map[string]interface{}

ReverseNumber

import "github.com/open-constructs/cdk-terrain-go/cdktn"

cdktn.Tokenization_ReverseNumber(n *f64) IResolvable
Un-encode a Tokenized value from a number.

nRequired

  • Type: *f64

ReverseNumberList

import "github.com/open-constructs/cdk-terrain-go/cdktn"

cdktn.Tokenization_ReverseNumberList(l *[]*f64) IResolvable
Un-encode a Tokenized value from a list.

lRequired

  • Type: *[]*f64

ReverseString

import "github.com/open-constructs/cdk-terrain-go/cdktn"

cdktn.Tokenization_ReverseString(s *string) TokenizedStringFragments
Un-encode a string potentially containing encoded tokens.

sRequired

  • Type: *string

StringifyNumber

import "github.com/open-constructs/cdk-terrain-go/cdktn"

cdktn.Tokenization_StringifyNumber(x *f64) *string
Stringify a number directly or lazily if it’s a Token. If it is an object (i.e., { Ref: ‘SomeLogicalId’ }), return it as-is.

xRequired

  • Type: *f64