├── constructs ├── version ├── NOTICE ├── jsii │ ├── constructs-10.4.4.tgz │ └── jsii.go ├── go.mod ├── RootConstruct__no_checks.go ├── RootConstruct__checks.go ├── ConstructOrder.go ├── Construct__no_checks.go ├── Dependable__no_checks.go ├── IConstruct.go ├── MetadataOptions.go ├── MetadataEntry.go ├── IDependable.go ├── Construct__checks.go ├── Dependable__checks.go ├── IValidation.go ├── Node__no_checks.go ├── DependencyGroup.go ├── README.md ├── Dependable.go ├── Node__checks.go ├── RootConstruct.go ├── Construct.go ├── main.go ├── LICENSE └── Node.go ├── NOTICE ├── README.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md └── LICENSE /constructs/version: -------------------------------------------------------------------------------- 1 | 10.4.4 2 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | -------------------------------------------------------------------------------- /constructs/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | -------------------------------------------------------------------------------- /constructs/jsii/constructs-10.4.4.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws/constructs-go/HEAD/constructs/jsii/constructs-10.4.4.tgz -------------------------------------------------------------------------------- /constructs/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/aws/constructs-go/constructs/v10 2 | 3 | go 1.23 4 | 5 | require ( 6 | github.com/aws/jsii-runtime-go v1.121.0 7 | ) 8 | -------------------------------------------------------------------------------- /constructs/RootConstruct__no_checks.go: -------------------------------------------------------------------------------- 1 | //go:build no_runtime_type_checking 2 | 3 | package constructs 4 | 5 | // Building without runtime type checking enabled, so all the below just return nil 6 | 7 | func validateRootConstruct_IsConstructParameters(x interface{}) error { 8 | return nil 9 | } 10 | 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## constructs-go 2 | 3 | Golang bindings for [constructs](https://github.com/aws/constructs) 4 | 5 | 6 | ## Security 7 | 8 | See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information. 9 | 10 | ## License 11 | 12 | This project is licensed under the Apache-2.0 License. 13 | 14 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | ## Code of Conduct 2 | This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). 3 | For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact 4 | opensource-codeofconduct@amazon.com with any additional questions or comments. 5 | -------------------------------------------------------------------------------- /constructs/RootConstruct__checks.go: -------------------------------------------------------------------------------- 1 | //go:build !no_runtime_type_checking 2 | 3 | package constructs 4 | 5 | import ( 6 | "fmt" 7 | ) 8 | 9 | func validateRootConstruct_IsConstructParameters(x interface{}) error { 10 | if x == nil { 11 | return fmt.Errorf("parameter x is required, but nil was provided") 12 | } 13 | 14 | return nil 15 | } 16 | 17 | -------------------------------------------------------------------------------- /constructs/ConstructOrder.go: -------------------------------------------------------------------------------- 1 | package constructs 2 | 3 | 4 | // In what order to return constructs. 5 | type ConstructOrder string 6 | 7 | const ( 8 | // Depth-first, pre-order. 9 | ConstructOrder_PREORDER ConstructOrder = "PREORDER" 10 | // Depth-first, post-order (leaf nodes first). 11 | ConstructOrder_POSTORDER ConstructOrder = "POSTORDER" 12 | ) 13 | 14 | -------------------------------------------------------------------------------- /constructs/Construct__no_checks.go: -------------------------------------------------------------------------------- 1 | //go:build no_runtime_type_checking 2 | 3 | package constructs 4 | 5 | // Building without runtime type checking enabled, so all the below just return nil 6 | 7 | func validateConstruct_IsConstructParameters(x interface{}) error { 8 | return nil 9 | } 10 | 11 | func validateNewConstructParameters(scope Construct, id *string) error { 12 | return nil 13 | } 14 | 15 | -------------------------------------------------------------------------------- /constructs/Dependable__no_checks.go: -------------------------------------------------------------------------------- 1 | //go:build no_runtime_type_checking 2 | 3 | package constructs 4 | 5 | // Building without runtime type checking enabled, so all the below just return nil 6 | 7 | func validateDependable_GetParameters(instance IDependable) error { 8 | return nil 9 | } 10 | 11 | func validateDependable_ImplementParameters(instance IDependable, trait Dependable) error { 12 | return nil 13 | } 14 | 15 | func validateDependable_OfParameters(instance IDependable) error { 16 | return nil 17 | } 18 | 19 | -------------------------------------------------------------------------------- /constructs/IConstruct.go: -------------------------------------------------------------------------------- 1 | package constructs 2 | 3 | import ( 4 | _jsii_ "github.com/aws/jsii-runtime-go/runtime" 5 | ) 6 | 7 | // Represents a construct. 8 | type IConstruct interface { 9 | IDependable 10 | // The tree node. 11 | Node() Node 12 | } 13 | 14 | // The jsii proxy for IConstruct 15 | type jsiiProxy_IConstruct struct { 16 | jsiiProxy_IDependable 17 | } 18 | 19 | func (j *jsiiProxy_IConstruct) Node() Node { 20 | var returns Node 21 | _jsii_.Get( 22 | j, 23 | "node", 24 | &returns, 25 | ) 26 | return returns 27 | } 28 | 29 | -------------------------------------------------------------------------------- /constructs/MetadataOptions.go: -------------------------------------------------------------------------------- 1 | package constructs 2 | 3 | 4 | // Options for `construct.addMetadata()`. 5 | type MetadataOptions struct { 6 | // Include stack trace with metadata entry. 7 | // Default: false. 8 | // 9 | StackTrace *bool `field:"optional" json:"stackTrace" yaml:"stackTrace"` 10 | // A JavaScript function to begin tracing from. 11 | // 12 | // This option is ignored unless `stackTrace` is `true`. 13 | // Default: addMetadata(). 14 | // 15 | TraceFromFunction interface{} `field:"optional" json:"traceFromFunction" yaml:"traceFromFunction"` 16 | } 17 | 18 | -------------------------------------------------------------------------------- /constructs/MetadataEntry.go: -------------------------------------------------------------------------------- 1 | package constructs 2 | 3 | 4 | // An entry in the construct metadata table. 5 | type MetadataEntry struct { 6 | // The data. 7 | Data interface{} `field:"required" json:"data" yaml:"data"` 8 | // The metadata entry type. 9 | Type *string `field:"required" json:"type" yaml:"type"` 10 | // Stack trace at the point of adding the metadata. 11 | // 12 | // Only available if `addMetadata()` is called with `stackTrace: true`. 13 | // Default: - no trace information. 14 | // 15 | Trace *[]*string `field:"optional" json:"trace" yaml:"trace"` 16 | } 17 | 18 | -------------------------------------------------------------------------------- /constructs/IDependable.go: -------------------------------------------------------------------------------- 1 | package constructs 2 | 3 | 4 | // Trait marker for classes that can be depended upon. 5 | // 6 | // The presence of this interface indicates that an object has 7 | // an `IDependable` implementation. 8 | // 9 | // This interface can be used to take an (ordering) dependency on a set of 10 | // constructs. An ordering dependency implies that the resources represented by 11 | // those constructs are deployed before the resources depending ON them are 12 | // deployed. 13 | type IDependable interface { 14 | } 15 | 16 | // The jsii proxy for IDependable 17 | type jsiiProxy_IDependable struct { 18 | _ byte // padding 19 | } 20 | 21 | -------------------------------------------------------------------------------- /constructs/Construct__checks.go: -------------------------------------------------------------------------------- 1 | //go:build !no_runtime_type_checking 2 | 3 | package constructs 4 | 5 | import ( 6 | "fmt" 7 | ) 8 | 9 | func validateConstruct_IsConstructParameters(x interface{}) error { 10 | if x == nil { 11 | return fmt.Errorf("parameter x is required, but nil was provided") 12 | } 13 | 14 | return nil 15 | } 16 | 17 | func validateNewConstructParameters(scope Construct, id *string) error { 18 | if scope == nil { 19 | return fmt.Errorf("parameter scope is required, but nil was provided") 20 | } 21 | 22 | if id == nil { 23 | return fmt.Errorf("parameter id is required, but nil was provided") 24 | } 25 | 26 | return nil 27 | } 28 | 29 | -------------------------------------------------------------------------------- /constructs/jsii/jsii.go: -------------------------------------------------------------------------------- 1 | // Package jsii contains the functionaility needed for jsii packages to 2 | // initialize their dependencies and themselves. Users should never need to use this package 3 | // directly. If you find you need to - please report a bug at 4 | // https://github.com/aws/jsii/issues/new/choose 5 | package jsii 6 | 7 | import ( 8 | _ "embed" 9 | 10 | _jsii_ "github.com/aws/jsii-runtime-go/runtime" 11 | ) 12 | 13 | //go:embed constructs-10.4.4.tgz 14 | var tarball []byte 15 | 16 | // Initialize loads the necessary packages in the @jsii/kernel to support the enclosing module. 17 | // The implementation is idempotent (and hence safe to be called over and over). 18 | func Initialize() { 19 | // Load this library into the kernel 20 | _jsii_.Load("constructs", "10.4.4", tarball) 21 | } 22 | -------------------------------------------------------------------------------- /constructs/Dependable__checks.go: -------------------------------------------------------------------------------- 1 | //go:build !no_runtime_type_checking 2 | 3 | package constructs 4 | 5 | import ( 6 | "fmt" 7 | ) 8 | 9 | func validateDependable_GetParameters(instance IDependable) error { 10 | if instance == nil { 11 | return fmt.Errorf("parameter instance is required, but nil was provided") 12 | } 13 | 14 | return nil 15 | } 16 | 17 | func validateDependable_ImplementParameters(instance IDependable, trait Dependable) error { 18 | if instance == nil { 19 | return fmt.Errorf("parameter instance is required, but nil was provided") 20 | } 21 | 22 | if trait == nil { 23 | return fmt.Errorf("parameter trait is required, but nil was provided") 24 | } 25 | 26 | return nil 27 | } 28 | 29 | func validateDependable_OfParameters(instance IDependable) error { 30 | if instance == nil { 31 | return fmt.Errorf("parameter instance is required, but nil was provided") 32 | } 33 | 34 | return nil 35 | } 36 | 37 | -------------------------------------------------------------------------------- /constructs/IValidation.go: -------------------------------------------------------------------------------- 1 | package constructs 2 | 3 | import ( 4 | _jsii_ "github.com/aws/jsii-runtime-go/runtime" 5 | ) 6 | 7 | // Implement this interface in order for the construct to be able to validate itself. 8 | type IValidation interface { 9 | // Validate the current construct. 10 | // 11 | // This method can be implemented by derived constructs in order to perform 12 | // validation logic. It is called on all constructs before synthesis. 13 | // 14 | // Returns: An array of validation error messages, or an empty array if there the construct is valid. 15 | Validate() *[]*string 16 | } 17 | 18 | // The jsii proxy for IValidation 19 | type jsiiProxy_IValidation struct { 20 | _ byte // padding 21 | } 22 | 23 | func (i *jsiiProxy_IValidation) Validate() *[]*string { 24 | var returns *[]*string 25 | 26 | _jsii_.Invoke( 27 | i, 28 | "validate", 29 | nil, // no parameters 30 | &returns, 31 | ) 32 | 33 | return returns 34 | } 35 | 36 | -------------------------------------------------------------------------------- /constructs/Node__no_checks.go: -------------------------------------------------------------------------------- 1 | //go:build no_runtime_type_checking 2 | 3 | package constructs 4 | 5 | // Building without runtime type checking enabled, so all the below just return nil 6 | 7 | func (n *jsiiProxy_Node) validateAddMetadataParameters(type_ *string, data interface{}, options *MetadataOptions) error { 8 | return nil 9 | } 10 | 11 | func (n *jsiiProxy_Node) validateAddValidationParameters(validation IValidation) error { 12 | return nil 13 | } 14 | 15 | func (n *jsiiProxy_Node) validateFindChildParameters(id *string) error { 16 | return nil 17 | } 18 | 19 | func (n *jsiiProxy_Node) validateGetContextParameters(key *string) error { 20 | return nil 21 | } 22 | 23 | func (n *jsiiProxy_Node) validateSetContextParameters(key *string, value interface{}) error { 24 | return nil 25 | } 26 | 27 | func (n *jsiiProxy_Node) validateTryFindChildParameters(id *string) error { 28 | return nil 29 | } 30 | 31 | func (n *jsiiProxy_Node) validateTryGetContextParameters(key *string) error { 32 | return nil 33 | } 34 | 35 | func (n *jsiiProxy_Node) validateTryRemoveChildParameters(childName *string) error { 36 | return nil 37 | } 38 | 39 | func validateNode_OfParameters(construct IConstruct) error { 40 | return nil 41 | } 42 | 43 | func validateNewNodeParameters(host Construct, scope IConstruct, id *string) error { 44 | return nil 45 | } 46 | 47 | -------------------------------------------------------------------------------- /constructs/DependencyGroup.go: -------------------------------------------------------------------------------- 1 | package constructs 2 | 3 | import ( 4 | _init_ "github.com/aws/constructs-go/constructs/v10/jsii" 5 | _jsii_ "github.com/aws/jsii-runtime-go/runtime" 6 | ) 7 | 8 | // A set of constructs to be used as a dependable. 9 | // 10 | // This class can be used when a set of constructs which are disjoint in the 11 | // construct tree needs to be combined to be used as a single dependable. 12 | type DependencyGroup interface { 13 | IDependable 14 | // Add a construct to the dependency roots. 15 | Add(scopes ...IDependable) 16 | } 17 | 18 | // The jsii proxy struct for DependencyGroup 19 | type jsiiProxy_DependencyGroup struct { 20 | jsiiProxy_IDependable 21 | } 22 | 23 | func NewDependencyGroup(deps ...IDependable) DependencyGroup { 24 | _init_.Initialize() 25 | 26 | args := []interface{}{} 27 | for _, a := range deps { 28 | args = append(args, a) 29 | } 30 | 31 | j := jsiiProxy_DependencyGroup{} 32 | 33 | _jsii_.Create( 34 | "constructs.DependencyGroup", 35 | args, 36 | &j, 37 | ) 38 | 39 | return &j 40 | } 41 | 42 | func NewDependencyGroup_Override(d DependencyGroup, deps ...IDependable) { 43 | _init_.Initialize() 44 | 45 | args := []interface{}{} 46 | for _, a := range deps { 47 | args = append(args, a) 48 | } 49 | 50 | _jsii_.Create( 51 | "constructs.DependencyGroup", 52 | args, 53 | d, 54 | ) 55 | } 56 | 57 | func (d *jsiiProxy_DependencyGroup) Add(scopes ...IDependable) { 58 | args := []interface{}{} 59 | for _, a := range scopes { 60 | args = append(args, a) 61 | } 62 | 63 | _jsii_.InvokeVoid( 64 | d, 65 | "add", 66 | args, 67 | ) 68 | } 69 | 70 | -------------------------------------------------------------------------------- /constructs/README.md: -------------------------------------------------------------------------------- 1 | # Constructs 2 | 3 | > Software-defined persistent state 4 | 5 | [![Release](https://github.com/aws/constructs/actions/workflows/release.yml/badge.svg)](https://github.com/aws/constructs/actions/workflows/release.yml) 6 | [![npm version](https://badge.fury.io/js/constructs.svg)](https://badge.fury.io/js/constructs) 7 | [![PyPI version](https://badge.fury.io/py/constructs.svg)](https://badge.fury.io/py/constructs) 8 | [![NuGet version](https://badge.fury.io/nu/Constructs.svg)](https://badge.fury.io/nu/Constructs) 9 | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/software.constructs/constructs/badge.svg?style=plastic)](https://maven-badges.herokuapp.com/maven-central/software.constructs/constructs) 10 | 11 | ## What are constructs? 12 | 13 | Constructs are classes which define a "piece of system state". Constructs can be composed together to form higher-level building blocks which represent more complex state. 14 | 15 | Constructs are often used to represent the *desired state* of cloud applications. For example, in the AWS CDK, which is used to define the desired state for AWS infrastructure using CloudFormation, the lowest-level construct represents a *resource definition* in a CloudFormation template. These resources are composed to represent higher-level logical units of a cloud application, etc. 16 | 17 | ## Support policy 18 | 19 | All [maintained Node.js versions](https://nodejs.org/en/about/previous-releases#release-schedule) are supported by this package. 20 | 21 | ## Contributing 22 | 23 | This project has adopted the [Amazon Open Source Code of 24 | Conduct](https://aws.github.io/code-of-conduct). 25 | 26 | We welcome community contributions and pull requests. See our [contribution 27 | guide](./CONTRIBUTING.md) for more information on how to report issues, set up a 28 | development environment and submit code. 29 | 30 | ## License 31 | 32 | This project is distributed under the [Apache License, Version 2.0](./LICENSE). 33 | -------------------------------------------------------------------------------- /constructs/Dependable.go: -------------------------------------------------------------------------------- 1 | package constructs 2 | 3 | import ( 4 | _init_ "github.com/aws/constructs-go/constructs/v10/jsii" 5 | _jsii_ "github.com/aws/jsii-runtime-go/runtime" 6 | ) 7 | 8 | // Trait for IDependable. 9 | // 10 | // Traits are interfaces that are privately implemented by objects. Instead of 11 | // showing up in the public interface of a class, they need to be queried 12 | // explicitly. This is used to implement certain framework features that are 13 | // not intended to be used by Construct consumers, and so should be hidden 14 | // from accidental use. 15 | // 16 | // Example: 17 | // // Usage 18 | // const roots = Dependable.of(construct).dependencyRoots; 19 | // 20 | // // Definition 21 | // Dependable.implement(construct, { 22 | // dependencyRoots: [construct], 23 | // }); 24 | // 25 | type Dependable interface { 26 | // The set of constructs that form the root of this dependable. 27 | // 28 | // All resources under all returned constructs are included in the ordering 29 | // dependency. 30 | DependencyRoots() *[]IConstruct 31 | } 32 | 33 | // The jsii proxy struct for Dependable 34 | type jsiiProxy_Dependable struct { 35 | _ byte // padding 36 | } 37 | 38 | func (j *jsiiProxy_Dependable) DependencyRoots() *[]IConstruct { 39 | var returns *[]IConstruct 40 | _jsii_.Get( 41 | j, 42 | "dependencyRoots", 43 | &returns, 44 | ) 45 | return returns 46 | } 47 | 48 | 49 | func NewDependable_Override(d Dependable) { 50 | _init_.Initialize() 51 | 52 | _jsii_.Create( 53 | "constructs.Dependable", 54 | nil, // no parameters 55 | d, 56 | ) 57 | } 58 | 59 | // Return the matching Dependable for the given class instance. 60 | // Deprecated: use `of`. 61 | func Dependable_Get(instance IDependable) Dependable { 62 | _init_.Initialize() 63 | 64 | if err := validateDependable_GetParameters(instance); err != nil { 65 | panic(err) 66 | } 67 | var returns Dependable 68 | 69 | _jsii_.StaticInvoke( 70 | "constructs.Dependable", 71 | "get", 72 | []interface{}{instance}, 73 | &returns, 74 | ) 75 | 76 | return returns 77 | } 78 | 79 | // Turn any object into an IDependable. 80 | func Dependable_Implement(instance IDependable, trait Dependable) { 81 | _init_.Initialize() 82 | 83 | if err := validateDependable_ImplementParameters(instance, trait); err != nil { 84 | panic(err) 85 | } 86 | _jsii_.StaticInvokeVoid( 87 | "constructs.Dependable", 88 | "implement", 89 | []interface{}{instance, trait}, 90 | ) 91 | } 92 | 93 | // Return the matching Dependable for the given class instance. 94 | func Dependable_Of(instance IDependable) Dependable { 95 | _init_.Initialize() 96 | 97 | if err := validateDependable_OfParameters(instance); err != nil { 98 | panic(err) 99 | } 100 | var returns Dependable 101 | 102 | _jsii_.StaticInvoke( 103 | "constructs.Dependable", 104 | "of", 105 | []interface{}{instance}, 106 | &returns, 107 | ) 108 | 109 | return returns 110 | } 111 | 112 | -------------------------------------------------------------------------------- /constructs/Node__checks.go: -------------------------------------------------------------------------------- 1 | //go:build !no_runtime_type_checking 2 | 3 | package constructs 4 | 5 | import ( 6 | "fmt" 7 | 8 | _jsii_ "github.com/aws/jsii-runtime-go/runtime" 9 | ) 10 | 11 | func (n *jsiiProxy_Node) validateAddMetadataParameters(type_ *string, data interface{}, options *MetadataOptions) error { 12 | if type_ == nil { 13 | return fmt.Errorf("parameter type_ is required, but nil was provided") 14 | } 15 | 16 | if data == nil { 17 | return fmt.Errorf("parameter data is required, but nil was provided") 18 | } 19 | 20 | if err := _jsii_.ValidateStruct(options, func() string { return "parameter options" }); err != nil { 21 | return err 22 | } 23 | 24 | return nil 25 | } 26 | 27 | func (n *jsiiProxy_Node) validateAddValidationParameters(validation IValidation) error { 28 | if validation == nil { 29 | return fmt.Errorf("parameter validation is required, but nil was provided") 30 | } 31 | 32 | return nil 33 | } 34 | 35 | func (n *jsiiProxy_Node) validateFindChildParameters(id *string) error { 36 | if id == nil { 37 | return fmt.Errorf("parameter id is required, but nil was provided") 38 | } 39 | 40 | return nil 41 | } 42 | 43 | func (n *jsiiProxy_Node) validateGetContextParameters(key *string) error { 44 | if key == nil { 45 | return fmt.Errorf("parameter key is required, but nil was provided") 46 | } 47 | 48 | return nil 49 | } 50 | 51 | func (n *jsiiProxy_Node) validateSetContextParameters(key *string, value interface{}) error { 52 | if key == nil { 53 | return fmt.Errorf("parameter key is required, but nil was provided") 54 | } 55 | 56 | if value == nil { 57 | return fmt.Errorf("parameter value is required, but nil was provided") 58 | } 59 | 60 | return nil 61 | } 62 | 63 | func (n *jsiiProxy_Node) validateTryFindChildParameters(id *string) error { 64 | if id == nil { 65 | return fmt.Errorf("parameter id is required, but nil was provided") 66 | } 67 | 68 | return nil 69 | } 70 | 71 | func (n *jsiiProxy_Node) validateTryGetContextParameters(key *string) error { 72 | if key == nil { 73 | return fmt.Errorf("parameter key is required, but nil was provided") 74 | } 75 | 76 | return nil 77 | } 78 | 79 | func (n *jsiiProxy_Node) validateTryRemoveChildParameters(childName *string) error { 80 | if childName == nil { 81 | return fmt.Errorf("parameter childName is required, but nil was provided") 82 | } 83 | 84 | return nil 85 | } 86 | 87 | func validateNode_OfParameters(construct IConstruct) error { 88 | if construct == nil { 89 | return fmt.Errorf("parameter construct is required, but nil was provided") 90 | } 91 | 92 | return nil 93 | } 94 | 95 | func validateNewNodeParameters(host Construct, scope IConstruct, id *string) error { 96 | if host == nil { 97 | return fmt.Errorf("parameter host is required, but nil was provided") 98 | } 99 | 100 | if scope == nil { 101 | return fmt.Errorf("parameter scope is required, but nil was provided") 102 | } 103 | 104 | if id == nil { 105 | return fmt.Errorf("parameter id is required, but nil was provided") 106 | } 107 | 108 | return nil 109 | } 110 | 111 | -------------------------------------------------------------------------------- /constructs/RootConstruct.go: -------------------------------------------------------------------------------- 1 | package constructs 2 | 3 | import ( 4 | _init_ "github.com/aws/constructs-go/constructs/v10/jsii" 5 | _jsii_ "github.com/aws/jsii-runtime-go/runtime" 6 | ) 7 | 8 | // Creates a new root construct node. 9 | // 10 | // The root construct represents the top of the construct tree and is not contained within a parent scope itself. 11 | // For root constructs, the id is optional. 12 | type RootConstruct interface { 13 | Construct 14 | // The tree node. 15 | Node() Node 16 | // Returns a string representation of this construct. 17 | ToString() *string 18 | } 19 | 20 | // The jsii proxy struct for RootConstruct 21 | type jsiiProxy_RootConstruct struct { 22 | jsiiProxy_Construct 23 | } 24 | 25 | func (j *jsiiProxy_RootConstruct) Node() Node { 26 | var returns Node 27 | _jsii_.Get( 28 | j, 29 | "node", 30 | &returns, 31 | ) 32 | return returns 33 | } 34 | 35 | 36 | // Creates a new root construct node. 37 | func NewRootConstruct(id *string) RootConstruct { 38 | _init_.Initialize() 39 | 40 | j := jsiiProxy_RootConstruct{} 41 | 42 | _jsii_.Create( 43 | "constructs.RootConstruct", 44 | []interface{}{id}, 45 | &j, 46 | ) 47 | 48 | return &j 49 | } 50 | 51 | // Creates a new root construct node. 52 | func NewRootConstruct_Override(r RootConstruct, id *string) { 53 | _init_.Initialize() 54 | 55 | _jsii_.Create( 56 | "constructs.RootConstruct", 57 | []interface{}{id}, 58 | r, 59 | ) 60 | } 61 | 62 | // Checks if `x` is a construct. 63 | // 64 | // Use this method instead of `instanceof` to properly detect `Construct` 65 | // instances, even when the construct library is symlinked. 66 | // 67 | // Explanation: in JavaScript, multiple copies of the `constructs` library on 68 | // disk are seen as independent, completely different libraries. As a 69 | // consequence, the class `Construct` in each copy of the `constructs` library 70 | // is seen as a different class, and an instance of one class will not test as 71 | // `instanceof` the other class. `npm install` will not create installations 72 | // like this, but users may manually symlink construct libraries together or 73 | // use a monorepo tool: in those cases, multiple copies of the `constructs` 74 | // library can be accidentally installed, and `instanceof` will behave 75 | // unpredictably. It is safest to avoid using `instanceof`, and using 76 | // this type-testing method instead. 77 | // 78 | // Returns: true if `x` is an object created from a class which extends `Construct`. 79 | func RootConstruct_IsConstruct(x interface{}) *bool { 80 | _init_.Initialize() 81 | 82 | if err := validateRootConstruct_IsConstructParameters(x); err != nil { 83 | panic(err) 84 | } 85 | var returns *bool 86 | 87 | _jsii_.StaticInvoke( 88 | "constructs.RootConstruct", 89 | "isConstruct", 90 | []interface{}{x}, 91 | &returns, 92 | ) 93 | 94 | return returns 95 | } 96 | 97 | func (r *jsiiProxy_RootConstruct) ToString() *string { 98 | var returns *string 99 | 100 | _jsii_.Invoke( 101 | r, 102 | "toString", 103 | nil, // no parameters 104 | &returns, 105 | ) 106 | 107 | return returns 108 | } 109 | 110 | -------------------------------------------------------------------------------- /constructs/Construct.go: -------------------------------------------------------------------------------- 1 | package constructs 2 | 3 | import ( 4 | _init_ "github.com/aws/constructs-go/constructs/v10/jsii" 5 | _jsii_ "github.com/aws/jsii-runtime-go/runtime" 6 | ) 7 | 8 | // Represents the building block of the construct graph. 9 | // 10 | // All constructs besides the root construct must be created within the scope of 11 | // another construct. 12 | type Construct interface { 13 | IConstruct 14 | // The tree node. 15 | Node() Node 16 | // Returns a string representation of this construct. 17 | ToString() *string 18 | } 19 | 20 | // The jsii proxy struct for Construct 21 | type jsiiProxy_Construct struct { 22 | jsiiProxy_IConstruct 23 | } 24 | 25 | func (j *jsiiProxy_Construct) Node() Node { 26 | var returns Node 27 | _jsii_.Get( 28 | j, 29 | "node", 30 | &returns, 31 | ) 32 | return returns 33 | } 34 | 35 | 36 | // Creates a new construct node. 37 | func NewConstruct(scope Construct, id *string) Construct { 38 | _init_.Initialize() 39 | 40 | if err := validateNewConstructParameters(scope, id); err != nil { 41 | panic(err) 42 | } 43 | j := jsiiProxy_Construct{} 44 | 45 | _jsii_.Create( 46 | "constructs.Construct", 47 | []interface{}{scope, id}, 48 | &j, 49 | ) 50 | 51 | return &j 52 | } 53 | 54 | // Creates a new construct node. 55 | func NewConstruct_Override(c Construct, scope Construct, id *string) { 56 | _init_.Initialize() 57 | 58 | _jsii_.Create( 59 | "constructs.Construct", 60 | []interface{}{scope, id}, 61 | c, 62 | ) 63 | } 64 | 65 | // Checks if `x` is a construct. 66 | // 67 | // Use this method instead of `instanceof` to properly detect `Construct` 68 | // instances, even when the construct library is symlinked. 69 | // 70 | // Explanation: in JavaScript, multiple copies of the `constructs` library on 71 | // disk are seen as independent, completely different libraries. As a 72 | // consequence, the class `Construct` in each copy of the `constructs` library 73 | // is seen as a different class, and an instance of one class will not test as 74 | // `instanceof` the other class. `npm install` will not create installations 75 | // like this, but users may manually symlink construct libraries together or 76 | // use a monorepo tool: in those cases, multiple copies of the `constructs` 77 | // library can be accidentally installed, and `instanceof` will behave 78 | // unpredictably. It is safest to avoid using `instanceof`, and using 79 | // this type-testing method instead. 80 | // 81 | // Returns: true if `x` is an object created from a class which extends `Construct`. 82 | func Construct_IsConstruct(x interface{}) *bool { 83 | _init_.Initialize() 84 | 85 | if err := validateConstruct_IsConstructParameters(x); err != nil { 86 | panic(err) 87 | } 88 | var returns *bool 89 | 90 | _jsii_.StaticInvoke( 91 | "constructs.Construct", 92 | "isConstruct", 93 | []interface{}{x}, 94 | &returns, 95 | ) 96 | 97 | return returns 98 | } 99 | 100 | func (c *jsiiProxy_Construct) ToString() *string { 101 | var returns *string 102 | 103 | _jsii_.Invoke( 104 | c, 105 | "toString", 106 | nil, // no parameters 107 | &returns, 108 | ) 109 | 110 | return returns 111 | } 112 | 113 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing Guidelines 2 | 3 | Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional 4 | documentation, we greatly value feedback and contributions from our community. 5 | 6 | Please read through this document before submitting any issues or pull requests to ensure we have all the necessary 7 | information to effectively respond to your bug report or contribution. 8 | 9 | 10 | ## Reporting Bugs/Feature Requests 11 | 12 | We welcome you to use the GitHub issue tracker to report bugs or suggest features. 13 | 14 | When filing an issue, please check existing open, or recently closed, issues to make sure somebody else hasn't already 15 | reported the issue. Please try to include as much information as you can. Details like these are incredibly useful: 16 | 17 | * A reproducible test case or series of steps 18 | * The version of our code being used 19 | * Any modifications you've made relevant to the bug 20 | * Anything unusual about your environment or deployment 21 | 22 | 23 | ## Contributing via Pull Requests 24 | Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that: 25 | 26 | 1. You are working against the latest source on the *main* branch. 27 | 2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already. 28 | 3. You open an issue to discuss any significant work - we would hate for your time to be wasted. 29 | 30 | To send us a pull request, please: 31 | 32 | 1. Fork the repository. 33 | 2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change. 34 | 3. Ensure local tests pass. 35 | 4. Commit to your fork using clear commit messages. 36 | 5. Send us a pull request, answering any default questions in the pull request interface. 37 | 6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation. 38 | 39 | GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and 40 | [creating a pull request](https://help.github.com/articles/creating-a-pull-request/). 41 | 42 | 43 | ## Finding contributions to work on 44 | Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any 'help wanted' issues is a great place to start. 45 | 46 | 47 | ## Code of Conduct 48 | This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). 49 | For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact 50 | opensource-codeofconduct@amazon.com with any additional questions or comments. 51 | 52 | 53 | ## Security issue notifications 54 | If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue. 55 | 56 | 57 | ## Licensing 58 | 59 | See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution. 60 | -------------------------------------------------------------------------------- /constructs/main.go: -------------------------------------------------------------------------------- 1 | // A programming model for software-defined state 2 | package constructs 3 | 4 | import ( 5 | "reflect" 6 | 7 | _jsii_ "github.com/aws/jsii-runtime-go/runtime" 8 | ) 9 | 10 | func init() { 11 | _jsii_.RegisterClass( 12 | "constructs.Construct", 13 | reflect.TypeOf((*Construct)(nil)).Elem(), 14 | []_jsii_.Member{ 15 | _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, 16 | _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, 17 | }, 18 | func() interface{} { 19 | j := jsiiProxy_Construct{} 20 | _jsii_.InitJsiiProxy(&j.jsiiProxy_IConstruct) 21 | return &j 22 | }, 23 | ) 24 | _jsii_.RegisterEnum( 25 | "constructs.ConstructOrder", 26 | reflect.TypeOf((*ConstructOrder)(nil)).Elem(), 27 | map[string]interface{}{ 28 | "PREORDER": ConstructOrder_PREORDER, 29 | "POSTORDER": ConstructOrder_POSTORDER, 30 | }, 31 | ) 32 | _jsii_.RegisterClass( 33 | "constructs.Dependable", 34 | reflect.TypeOf((*Dependable)(nil)).Elem(), 35 | []_jsii_.Member{ 36 | _jsii_.MemberProperty{JsiiProperty: "dependencyRoots", GoGetter: "DependencyRoots"}, 37 | }, 38 | func() interface{} { 39 | return &jsiiProxy_Dependable{} 40 | }, 41 | ) 42 | _jsii_.RegisterClass( 43 | "constructs.DependencyGroup", 44 | reflect.TypeOf((*DependencyGroup)(nil)).Elem(), 45 | []_jsii_.Member{ 46 | _jsii_.MemberMethod{JsiiMethod: "add", GoMethod: "Add"}, 47 | }, 48 | func() interface{} { 49 | j := jsiiProxy_DependencyGroup{} 50 | _jsii_.InitJsiiProxy(&j.jsiiProxy_IDependable) 51 | return &j 52 | }, 53 | ) 54 | _jsii_.RegisterInterface( 55 | "constructs.IConstruct", 56 | reflect.TypeOf((*IConstruct)(nil)).Elem(), 57 | []_jsii_.Member{ 58 | _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, 59 | }, 60 | func() interface{} { 61 | j := jsiiProxy_IConstruct{} 62 | _jsii_.InitJsiiProxy(&j.jsiiProxy_IDependable) 63 | return &j 64 | }, 65 | ) 66 | _jsii_.RegisterInterface( 67 | "constructs.IDependable", 68 | reflect.TypeOf((*IDependable)(nil)).Elem(), 69 | nil, // no members 70 | func() interface{} { 71 | return &jsiiProxy_IDependable{} 72 | }, 73 | ) 74 | _jsii_.RegisterInterface( 75 | "constructs.IValidation", 76 | reflect.TypeOf((*IValidation)(nil)).Elem(), 77 | []_jsii_.Member{ 78 | _jsii_.MemberMethod{JsiiMethod: "validate", GoMethod: "Validate"}, 79 | }, 80 | func() interface{} { 81 | return &jsiiProxy_IValidation{} 82 | }, 83 | ) 84 | _jsii_.RegisterStruct( 85 | "constructs.MetadataEntry", 86 | reflect.TypeOf((*MetadataEntry)(nil)).Elem(), 87 | ) 88 | _jsii_.RegisterStruct( 89 | "constructs.MetadataOptions", 90 | reflect.TypeOf((*MetadataOptions)(nil)).Elem(), 91 | ) 92 | _jsii_.RegisterClass( 93 | "constructs.Node", 94 | reflect.TypeOf((*Node)(nil)).Elem(), 95 | []_jsii_.Member{ 96 | _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, 97 | _jsii_.MemberMethod{JsiiMethod: "addMetadata", GoMethod: "AddMetadata"}, 98 | _jsii_.MemberProperty{JsiiProperty: "addr", GoGetter: "Addr"}, 99 | _jsii_.MemberMethod{JsiiMethod: "addValidation", GoMethod: "AddValidation"}, 100 | _jsii_.MemberProperty{JsiiProperty: "children", GoGetter: "Children"}, 101 | _jsii_.MemberProperty{JsiiProperty: "defaultChild", GoGetter: "DefaultChild"}, 102 | _jsii_.MemberProperty{JsiiProperty: "dependencies", GoGetter: "Dependencies"}, 103 | _jsii_.MemberMethod{JsiiMethod: "findAll", GoMethod: "FindAll"}, 104 | _jsii_.MemberMethod{JsiiMethod: "findChild", GoMethod: "FindChild"}, 105 | _jsii_.MemberMethod{JsiiMethod: "getAllContext", GoMethod: "GetAllContext"}, 106 | _jsii_.MemberMethod{JsiiMethod: "getContext", GoMethod: "GetContext"}, 107 | _jsii_.MemberProperty{JsiiProperty: "id", GoGetter: "Id"}, 108 | _jsii_.MemberMethod{JsiiMethod: "lock", GoMethod: "Lock"}, 109 | _jsii_.MemberProperty{JsiiProperty: "locked", GoGetter: "Locked"}, 110 | _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, 111 | _jsii_.MemberProperty{JsiiProperty: "path", GoGetter: "Path"}, 112 | _jsii_.MemberProperty{JsiiProperty: "root", GoGetter: "Root"}, 113 | _jsii_.MemberProperty{JsiiProperty: "scope", GoGetter: "Scope"}, 114 | _jsii_.MemberProperty{JsiiProperty: "scopes", GoGetter: "Scopes"}, 115 | _jsii_.MemberMethod{JsiiMethod: "setContext", GoMethod: "SetContext"}, 116 | _jsii_.MemberMethod{JsiiMethod: "tryFindChild", GoMethod: "TryFindChild"}, 117 | _jsii_.MemberMethod{JsiiMethod: "tryGetContext", GoMethod: "TryGetContext"}, 118 | _jsii_.MemberMethod{JsiiMethod: "tryRemoveChild", GoMethod: "TryRemoveChild"}, 119 | _jsii_.MemberMethod{JsiiMethod: "validate", GoMethod: "Validate"}, 120 | }, 121 | func() interface{} { 122 | return &jsiiProxy_Node{} 123 | }, 124 | ) 125 | _jsii_.RegisterClass( 126 | "constructs.RootConstruct", 127 | reflect.TypeOf((*RootConstruct)(nil)).Elem(), 128 | []_jsii_.Member{ 129 | _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, 130 | _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, 131 | }, 132 | func() interface{} { 133 | j := jsiiProxy_RootConstruct{} 134 | _jsii_.InitJsiiProxy(&j.jsiiProxy_Construct) 135 | return &j 136 | }, 137 | ) 138 | } 139 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | -------------------------------------------------------------------------------- /constructs/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /constructs/Node.go: -------------------------------------------------------------------------------- 1 | package constructs 2 | 3 | import ( 4 | _init_ "github.com/aws/constructs-go/constructs/v10/jsii" 5 | _jsii_ "github.com/aws/jsii-runtime-go/runtime" 6 | ) 7 | 8 | // Represents the construct node in the scope tree. 9 | type Node interface { 10 | // Returns an opaque tree-unique address for this construct. 11 | // 12 | // Addresses are 42 characters hexadecimal strings. They begin with "c8" 13 | // followed by 40 lowercase hexadecimal characters (0-9a-f). 14 | // 15 | // Addresses are calculated using a SHA-1 of the components of the construct 16 | // path. 17 | // 18 | // To enable refactoring of construct trees, constructs with the ID `Default` 19 | // will be excluded from the calculation. In those cases constructs in the 20 | // same tree may have the same address. 21 | // 22 | // Example: 23 | // c83a2846e506bcc5f10682b564084bca2d275709ee 24 | // 25 | Addr() *string 26 | // All direct children of this construct. 27 | Children() *[]IConstruct 28 | // Returns the child construct that has the id `Default` or `Resource`. 29 | // 30 | // This is usually the construct that provides the bulk of the underlying functionality. 31 | // Useful for modifications of the underlying construct that are not available at the higher levels. 32 | // Override the defaultChild property. 33 | // 34 | // This should only be used in the cases where the correct 35 | // default child is not named 'Resource' or 'Default' as it 36 | // should be. 37 | // 38 | // If you set this to undefined, the default behavior of finding 39 | // the child named 'Resource' or 'Default' will be used. 40 | // 41 | // Returns: a construct or undefined if there is no default child. 42 | DefaultChild() IConstruct 43 | SetDefaultChild(val IConstruct) 44 | // Return all dependencies registered on this node (non-recursive). 45 | Dependencies() *[]IConstruct 46 | // The id of this construct within the current scope. 47 | // 48 | // This is a scope-unique id. To obtain an app-unique id for this construct, use `addr`. 49 | Id() *string 50 | // Returns true if this construct or the scopes in which it is defined are locked. 51 | Locked() *bool 52 | // An immutable array of metadata objects associated with this construct. 53 | // 54 | // This can be used, for example, to implement support for deprecation notices, source mapping, etc. 55 | Metadata() *[]*MetadataEntry 56 | // The full, absolute path of this construct in the tree. 57 | // 58 | // Components are separated by '/'. 59 | Path() *string 60 | // Returns the root of the construct tree. 61 | // 62 | // Returns: The root of the construct tree. 63 | Root() IConstruct 64 | // Returns the scope in which this construct is defined. 65 | // 66 | // The value is `undefined` at the root of the construct scope tree. 67 | Scope() IConstruct 68 | // All parent scopes of this construct. 69 | // 70 | // Returns: a list of parent scopes. The last element in the list will always 71 | // be the current construct and the first element will be the root of the 72 | // tree. 73 | Scopes() *[]IConstruct 74 | // Add an ordering dependency on another construct. 75 | // 76 | // An `IDependable`. 77 | AddDependency(deps ...IDependable) 78 | // Adds a metadata entry to this construct. 79 | // 80 | // Entries are arbitrary values and will also include a stack trace to allow tracing back to 81 | // the code location for when the entry was added. It can be used, for example, to include source 82 | // mapping in CloudFormation templates to improve diagnostics. 83 | // Note that construct metadata is not the same as CloudFormation resource metadata and is never written to the CloudFormation template. 84 | // The metadata entries are written to the Cloud Assembly Manifest if the `treeMetadata` property is specified in the props of the App that contains this Construct. 85 | AddMetadata(type_ *string, data interface{}, options *MetadataOptions) 86 | // Adds a validation to this construct. 87 | // 88 | // When `node.validate()` is called, the `validate()` method will be called on 89 | // all validations and all errors will be returned. 90 | AddValidation(validation IValidation) 91 | // Return this construct and all of its children in the given order. 92 | FindAll(order ConstructOrder) *[]IConstruct 93 | // Return a direct child by id. 94 | // 95 | // Throws an error if the child is not found. 96 | // 97 | // Returns: Child with the given id. 98 | FindChild(id *string) IConstruct 99 | // Retrieves the all context of a node from tree context. 100 | // 101 | // Context is usually initialized at the root, but can be overridden at any point in the tree. 102 | // 103 | // Returns: The context object or an empty object if there is discovered context. 104 | GetAllContext(defaults *map[string]interface{}) interface{} 105 | // Retrieves a value from tree context if present. Otherwise, would throw an error. 106 | // 107 | // Context is usually initialized at the root, but can be overridden at any point in the tree. 108 | // 109 | // Returns: The context value or throws error if there is no context value for this key. 110 | GetContext(key *string) interface{} 111 | // Locks this construct from allowing more children to be added. 112 | // 113 | // After this 114 | // call, no more children can be added to this construct or to any children. 115 | Lock() 116 | // This can be used to set contextual values. 117 | // 118 | // Context must be set before any children are added, since children may consult context info during construction. 119 | // If the key already exists, it will be overridden. 120 | SetContext(key *string, value interface{}) 121 | // Return a direct child by id, or undefined. 122 | // 123 | // Returns: the child if found, or undefined. 124 | TryFindChild(id *string) IConstruct 125 | // Retrieves a value from tree context. 126 | // 127 | // Context is usually initialized at the root, but can be overridden at any point in the tree. 128 | // 129 | // Returns: The context value or `undefined` if there is no context value for this key. 130 | TryGetContext(key *string) interface{} 131 | // Remove the child with the given name, if present. 132 | // 133 | // Returns: Whether a child with the given name was deleted. 134 | TryRemoveChild(childName *string) *bool 135 | // Validates this construct. 136 | // 137 | // Invokes the `validate()` method on all validations added through 138 | // `addValidation()`. 139 | // 140 | // Returns: an array of validation error messages associated with this 141 | // construct. 142 | Validate() *[]*string 143 | } 144 | 145 | // The jsii proxy struct for Node 146 | type jsiiProxy_Node struct { 147 | _ byte // padding 148 | } 149 | 150 | func (j *jsiiProxy_Node) Addr() *string { 151 | var returns *string 152 | _jsii_.Get( 153 | j, 154 | "addr", 155 | &returns, 156 | ) 157 | return returns 158 | } 159 | 160 | func (j *jsiiProxy_Node) Children() *[]IConstruct { 161 | var returns *[]IConstruct 162 | _jsii_.Get( 163 | j, 164 | "children", 165 | &returns, 166 | ) 167 | return returns 168 | } 169 | 170 | func (j *jsiiProxy_Node) DefaultChild() IConstruct { 171 | var returns IConstruct 172 | _jsii_.Get( 173 | j, 174 | "defaultChild", 175 | &returns, 176 | ) 177 | return returns 178 | } 179 | 180 | func (j *jsiiProxy_Node) Dependencies() *[]IConstruct { 181 | var returns *[]IConstruct 182 | _jsii_.Get( 183 | j, 184 | "dependencies", 185 | &returns, 186 | ) 187 | return returns 188 | } 189 | 190 | func (j *jsiiProxy_Node) Id() *string { 191 | var returns *string 192 | _jsii_.Get( 193 | j, 194 | "id", 195 | &returns, 196 | ) 197 | return returns 198 | } 199 | 200 | func (j *jsiiProxy_Node) Locked() *bool { 201 | var returns *bool 202 | _jsii_.Get( 203 | j, 204 | "locked", 205 | &returns, 206 | ) 207 | return returns 208 | } 209 | 210 | func (j *jsiiProxy_Node) Metadata() *[]*MetadataEntry { 211 | var returns *[]*MetadataEntry 212 | _jsii_.Get( 213 | j, 214 | "metadata", 215 | &returns, 216 | ) 217 | return returns 218 | } 219 | 220 | func (j *jsiiProxy_Node) Path() *string { 221 | var returns *string 222 | _jsii_.Get( 223 | j, 224 | "path", 225 | &returns, 226 | ) 227 | return returns 228 | } 229 | 230 | func (j *jsiiProxy_Node) Root() IConstruct { 231 | var returns IConstruct 232 | _jsii_.Get( 233 | j, 234 | "root", 235 | &returns, 236 | ) 237 | return returns 238 | } 239 | 240 | func (j *jsiiProxy_Node) Scope() IConstruct { 241 | var returns IConstruct 242 | _jsii_.Get( 243 | j, 244 | "scope", 245 | &returns, 246 | ) 247 | return returns 248 | } 249 | 250 | func (j *jsiiProxy_Node) Scopes() *[]IConstruct { 251 | var returns *[]IConstruct 252 | _jsii_.Get( 253 | j, 254 | "scopes", 255 | &returns, 256 | ) 257 | return returns 258 | } 259 | 260 | 261 | func NewNode(host Construct, scope IConstruct, id *string) Node { 262 | _init_.Initialize() 263 | 264 | if err := validateNewNodeParameters(host, scope, id); err != nil { 265 | panic(err) 266 | } 267 | j := jsiiProxy_Node{} 268 | 269 | _jsii_.Create( 270 | "constructs.Node", 271 | []interface{}{host, scope, id}, 272 | &j, 273 | ) 274 | 275 | return &j 276 | } 277 | 278 | func NewNode_Override(n Node, host Construct, scope IConstruct, id *string) { 279 | _init_.Initialize() 280 | 281 | _jsii_.Create( 282 | "constructs.Node", 283 | []interface{}{host, scope, id}, 284 | n, 285 | ) 286 | } 287 | 288 | func (j *jsiiProxy_Node)SetDefaultChild(val IConstruct) { 289 | _jsii_.Set( 290 | j, 291 | "defaultChild", 292 | val, 293 | ) 294 | } 295 | 296 | // Returns the node associated with a construct. 297 | // Deprecated: use `construct.node` instead 298 | func Node_Of(construct IConstruct) Node { 299 | _init_.Initialize() 300 | 301 | if err := validateNode_OfParameters(construct); err != nil { 302 | panic(err) 303 | } 304 | var returns Node 305 | 306 | _jsii_.StaticInvoke( 307 | "constructs.Node", 308 | "of", 309 | []interface{}{construct}, 310 | &returns, 311 | ) 312 | 313 | return returns 314 | } 315 | 316 | func Node_PATH_SEP() *string { 317 | _init_.Initialize() 318 | var returns *string 319 | _jsii_.StaticGet( 320 | "constructs.Node", 321 | "PATH_SEP", 322 | &returns, 323 | ) 324 | return returns 325 | } 326 | 327 | func (n *jsiiProxy_Node) AddDependency(deps ...IDependable) { 328 | args := []interface{}{} 329 | for _, a := range deps { 330 | args = append(args, a) 331 | } 332 | 333 | _jsii_.InvokeVoid( 334 | n, 335 | "addDependency", 336 | args, 337 | ) 338 | } 339 | 340 | func (n *jsiiProxy_Node) AddMetadata(type_ *string, data interface{}, options *MetadataOptions) { 341 | if err := n.validateAddMetadataParameters(type_, data, options); err != nil { 342 | panic(err) 343 | } 344 | _jsii_.InvokeVoid( 345 | n, 346 | "addMetadata", 347 | []interface{}{type_, data, options}, 348 | ) 349 | } 350 | 351 | func (n *jsiiProxy_Node) AddValidation(validation IValidation) { 352 | if err := n.validateAddValidationParameters(validation); err != nil { 353 | panic(err) 354 | } 355 | _jsii_.InvokeVoid( 356 | n, 357 | "addValidation", 358 | []interface{}{validation}, 359 | ) 360 | } 361 | 362 | func (n *jsiiProxy_Node) FindAll(order ConstructOrder) *[]IConstruct { 363 | var returns *[]IConstruct 364 | 365 | _jsii_.Invoke( 366 | n, 367 | "findAll", 368 | []interface{}{order}, 369 | &returns, 370 | ) 371 | 372 | return returns 373 | } 374 | 375 | func (n *jsiiProxy_Node) FindChild(id *string) IConstruct { 376 | if err := n.validateFindChildParameters(id); err != nil { 377 | panic(err) 378 | } 379 | var returns IConstruct 380 | 381 | _jsii_.Invoke( 382 | n, 383 | "findChild", 384 | []interface{}{id}, 385 | &returns, 386 | ) 387 | 388 | return returns 389 | } 390 | 391 | func (n *jsiiProxy_Node) GetAllContext(defaults *map[string]interface{}) interface{} { 392 | var returns interface{} 393 | 394 | _jsii_.Invoke( 395 | n, 396 | "getAllContext", 397 | []interface{}{defaults}, 398 | &returns, 399 | ) 400 | 401 | return returns 402 | } 403 | 404 | func (n *jsiiProxy_Node) GetContext(key *string) interface{} { 405 | if err := n.validateGetContextParameters(key); err != nil { 406 | panic(err) 407 | } 408 | var returns interface{} 409 | 410 | _jsii_.Invoke( 411 | n, 412 | "getContext", 413 | []interface{}{key}, 414 | &returns, 415 | ) 416 | 417 | return returns 418 | } 419 | 420 | func (n *jsiiProxy_Node) Lock() { 421 | _jsii_.InvokeVoid( 422 | n, 423 | "lock", 424 | nil, // no parameters 425 | ) 426 | } 427 | 428 | func (n *jsiiProxy_Node) SetContext(key *string, value interface{}) { 429 | if err := n.validateSetContextParameters(key, value); err != nil { 430 | panic(err) 431 | } 432 | _jsii_.InvokeVoid( 433 | n, 434 | "setContext", 435 | []interface{}{key, value}, 436 | ) 437 | } 438 | 439 | func (n *jsiiProxy_Node) TryFindChild(id *string) IConstruct { 440 | if err := n.validateTryFindChildParameters(id); err != nil { 441 | panic(err) 442 | } 443 | var returns IConstruct 444 | 445 | _jsii_.Invoke( 446 | n, 447 | "tryFindChild", 448 | []interface{}{id}, 449 | &returns, 450 | ) 451 | 452 | return returns 453 | } 454 | 455 | func (n *jsiiProxy_Node) TryGetContext(key *string) interface{} { 456 | if err := n.validateTryGetContextParameters(key); err != nil { 457 | panic(err) 458 | } 459 | var returns interface{} 460 | 461 | _jsii_.Invoke( 462 | n, 463 | "tryGetContext", 464 | []interface{}{key}, 465 | &returns, 466 | ) 467 | 468 | return returns 469 | } 470 | 471 | func (n *jsiiProxy_Node) TryRemoveChild(childName *string) *bool { 472 | if err := n.validateTryRemoveChildParameters(childName); err != nil { 473 | panic(err) 474 | } 475 | var returns *bool 476 | 477 | _jsii_.Invoke( 478 | n, 479 | "tryRemoveChild", 480 | []interface{}{childName}, 481 | &returns, 482 | ) 483 | 484 | return returns 485 | } 486 | 487 | func (n *jsiiProxy_Node) Validate() *[]*string { 488 | var returns *[]*string 489 | 490 | _jsii_.Invoke( 491 | n, 492 | "validate", 493 | nil, // no parameters 494 | &returns, 495 | ) 496 | 497 | return returns 498 | } 499 | 500 | --------------------------------------------------------------------------------