-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dependable.go
116 lines (98 loc) · 2.46 KB
/
Dependable.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
package constructs
import (
_init_ "github.com/aws/constructs-go/constructs/v10/jsii"
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
)
// Trait for IDependable.
//
// Traits are interfaces that are privately implemented by objects. Instead of
// showing up in the public interface of a class, they need to be queried
// explicitly. This is used to implement certain framework features that are
// not intended to be used by Construct consumers, and so should be hidden
// from accidental use.
//
// Example:
// // Usage
// const roots = Dependable.of(construct).dependencyRoots;
//
// // Definition
// Dependable.implement(construct, {
// dependencyRoots: [construct],
// });
//
// Experimental.
type Dependable interface {
// The set of constructs that form the root of this dependable.
//
// All resources under all returned constructs are included in the ordering
// dependency.
// Experimental.
DependencyRoots() *[]IConstruct
}
// The jsii proxy struct for Dependable
type jsiiProxy_Dependable struct {
_ byte // padding
}
func (j *jsiiProxy_Dependable) DependencyRoots() *[]IConstruct {
var returns *[]IConstruct
_jsii_.Get(
j,
"dependencyRoots",
&returns,
)
return returns
}
// Experimental.
func NewDependable_Override(d Dependable) {
_init_.Initialize()
_jsii_.Create(
"constructs.Dependable",
nil, // no parameters
d,
)
}
// Return the matching Dependable for the given class instance.
// Deprecated: use `of`.
func Dependable_Get(instance IDependable) Dependable {
_init_.Initialize()
if err := validateDependable_GetParameters(instance); err != nil {
panic(err)
}
var returns Dependable
_jsii_.StaticInvoke(
"constructs.Dependable",
"get",
[]interface{}{instance},
&returns,
)
return returns
}
// Turn any object into an IDependable.
// Experimental.
func Dependable_Implement(instance IDependable, trait Dependable) {
_init_.Initialize()
if err := validateDependable_ImplementParameters(instance, trait); err != nil {
panic(err)
}
_jsii_.StaticInvokeVoid(
"constructs.Dependable",
"implement",
[]interface{}{instance, trait},
)
}
// Return the matching Dependable for the given class instance.
// Experimental.
func Dependable_Of(instance IDependable) Dependable {
_init_.Initialize()
if err := validateDependable_OfParameters(instance); err != nil {
panic(err)
}
var returns Dependable
_jsii_.StaticInvoke(
"constructs.Dependable",
"of",
[]interface{}{instance},
&returns,
)
return returns
}