-
Notifications
You must be signed in to change notification settings - Fork 1
/
App.go
232 lines (199 loc) · 4.58 KB
/
App.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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
package cdk8s
import (
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
_init_ "github.com/cdk8s-team/cdk8s-core-go/cdk8s/jsii"
"github.com/aws/constructs-go/constructs/v3"
"github.com/cdk8s-team/cdk8s-core-go/cdk8s/internal"
)
// Represents a cdk8s application.
type App interface {
constructs.Construct
// Returns all the charts in this app, sorted topologically.
Charts() *[]Chart
// The output directory into which manifests will be synthesized.
Outdir() *string
// The file extension to use for rendered YAML files.
// Default: .k8s.yaml
//
OutputFileExtension() *string
// Resolvers used by this app.
//
// This includes both custom resolvers
// passed by the `resolvers` property, as well as built-in resolvers.
Resolvers() *[]IResolver
// How to divide the YAML output into files.
// Default: YamlOutputType.FILE_PER_CHART
//
YamlOutputType() YamlOutputType
// Perform final modifications before synthesis.
//
// This method can be implemented by derived constructs in order to perform
// final changes before synthesis. prepare() will be called after child
// constructs have been prepared.
//
// This is an advanced framework feature. Only use this if you
// understand the implications.
OnPrepare()
// Allows this construct to emit artifacts into the cloud assembly during synthesis.
//
// This method is usually implemented by framework-level constructs such as `Stack` and `Asset`
// as they participate in synthesizing the cloud assembly.
OnSynthesize(session constructs.ISynthesisSession)
// Validate the current construct.
//
// This method can be implemented by derived constructs in order to perform
// validation logic. It is called on all constructs before synthesis.
//
// Returns: An array of validation error messages, or an empty array if there the construct is valid.
// Deprecated: use `Node.addValidation()` to subscribe validation functions on this construct
// instead of overriding this method.
OnValidate() *[]*string
// Synthesizes all manifests to the output directory.
Synth()
// Synthesizes the app into a YAML string.
//
// Returns: A string with all YAML objects across all charts in this app.
SynthYaml() *string
// Returns a string representation of this construct.
ToString() *string
}
// The jsii proxy struct for App
type jsiiProxy_App struct {
internal.Type__constructsConstruct
}
func (j *jsiiProxy_App) Charts() *[]Chart {
var returns *[]Chart
_jsii_.Get(
j,
"charts",
&returns,
)
return returns
}
func (j *jsiiProxy_App) Outdir() *string {
var returns *string
_jsii_.Get(
j,
"outdir",
&returns,
)
return returns
}
func (j *jsiiProxy_App) OutputFileExtension() *string {
var returns *string
_jsii_.Get(
j,
"outputFileExtension",
&returns,
)
return returns
}
func (j *jsiiProxy_App) Resolvers() *[]IResolver {
var returns *[]IResolver
_jsii_.Get(
j,
"resolvers",
&returns,
)
return returns
}
func (j *jsiiProxy_App) YamlOutputType() YamlOutputType {
var returns YamlOutputType
_jsii_.Get(
j,
"yamlOutputType",
&returns,
)
return returns
}
// Defines an app.
func NewApp(props *AppProps) App {
_init_.Initialize()
if err := validateNewAppParameters(props); err != nil {
panic(err)
}
j := jsiiProxy_App{}
_jsii_.Create(
"cdk8s.App",
[]interface{}{props},
&j,
)
return &j
}
// Defines an app.
func NewApp_Override(a App, props *AppProps) {
_init_.Initialize()
_jsii_.Create(
"cdk8s.App",
[]interface{}{props},
a,
)
}
func App_Of(c constructs.IConstruct) App {
_init_.Initialize()
if err := validateApp_OfParameters(c); err != nil {
panic(err)
}
var returns App
_jsii_.StaticInvoke(
"cdk8s.App",
"of",
[]interface{}{c},
&returns,
)
return returns
}
func (a *jsiiProxy_App) OnPrepare() {
_jsii_.InvokeVoid(
a,
"onPrepare",
nil, // no parameters
)
}
func (a *jsiiProxy_App) OnSynthesize(session constructs.ISynthesisSession) {
if err := a.validateOnSynthesizeParameters(session); err != nil {
panic(err)
}
_jsii_.InvokeVoid(
a,
"onSynthesize",
[]interface{}{session},
)
}
func (a *jsiiProxy_App) OnValidate() *[]*string {
var returns *[]*string
_jsii_.Invoke(
a,
"onValidate",
nil, // no parameters
&returns,
)
return returns
}
func (a *jsiiProxy_App) Synth() {
_jsii_.InvokeVoid(
a,
"synth",
nil, // no parameters
)
}
func (a *jsiiProxy_App) SynthYaml() *string {
var returns *string
_jsii_.Invoke(
a,
"synthYaml",
nil, // no parameters
&returns,
)
return returns
}
func (a *jsiiProxy_App) ToString() *string {
var returns *string
_jsii_.Invoke(
a,
"toString",
nil, // no parameters
&returns,
)
return returns
}