/
AssetSource.go
177 lines (147 loc) · 3.79 KB
/
AssetSource.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
package awscdkapprunneralpha
import (
_init_ "github.com/aws/aws-cdk-go/awscdkapprunneralpha/v2/jsii"
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
"github.com/aws/constructs-go/constructs/v10"
)
// Represents the source from local assets.
//
// Example:
// // The code below shows an example of how to instantiate this type.
// // The values are placeholders you should change.
// import apprunner_alpha "github.com/aws/aws-cdk-go/awscdkapprunneralpha"
// import "github.com/aws/aws-cdk-go/awscdk"
//
// var dockerImageAsset dockerImageAsset
// var secret secret
//
// assetSource := apprunner_alpha.NewAssetSource(&AssetProps{
// Asset: dockerImageAsset,
//
// // the properties below are optional
// ImageConfiguration: &ImageConfiguration{
// Environment: map[string]*string{
// "environmentKey": jsii.String("environment"),
// },
// EnvironmentSecrets: map[string]*secret{
// "environmentSecretsKey": secret,
// },
// EnvironmentVariables: map[string]*string{
// "environmentVariablesKey": jsii.String("environmentVariables"),
// },
// Port: jsii.Number(123),
// StartCommand: jsii.String("startCommand"),
// },
// })
//
// Experimental.
type AssetSource interface {
Source
// Called when the Job is initialized to allow this object to bind.
// Experimental.
Bind(_scope constructs.Construct) *SourceConfig
}
// The jsii proxy struct for AssetSource
type jsiiProxy_AssetSource struct {
jsiiProxy_Source
}
// Experimental.
func NewAssetSource(props *AssetProps) AssetSource {
_init_.Initialize()
if err := validateNewAssetSourceParameters(props); err != nil {
panic(err)
}
j := jsiiProxy_AssetSource{}
_jsii_.Create(
"@aws-cdk/aws-apprunner-alpha.AssetSource",
[]interface{}{props},
&j,
)
return &j
}
// Experimental.
func NewAssetSource_Override(a AssetSource, props *AssetProps) {
_init_.Initialize()
_jsii_.Create(
"@aws-cdk/aws-apprunner-alpha.AssetSource",
[]interface{}{props},
a,
)
}
// Source from local assets.
// Experimental.
func AssetSource_FromAsset(props *AssetProps) AssetSource {
_init_.Initialize()
if err := validateAssetSource_FromAssetParameters(props); err != nil {
panic(err)
}
var returns AssetSource
_jsii_.StaticInvoke(
"@aws-cdk/aws-apprunner-alpha.AssetSource",
"fromAsset",
[]interface{}{props},
&returns,
)
return returns
}
// Source from the ECR repository.
// Experimental.
func AssetSource_FromEcr(props *EcrProps) EcrSource {
_init_.Initialize()
if err := validateAssetSource_FromEcrParameters(props); err != nil {
panic(err)
}
var returns EcrSource
_jsii_.StaticInvoke(
"@aws-cdk/aws-apprunner-alpha.AssetSource",
"fromEcr",
[]interface{}{props},
&returns,
)
return returns
}
// Source from the ECR Public repository.
// Experimental.
func AssetSource_FromEcrPublic(props *EcrPublicProps) EcrPublicSource {
_init_.Initialize()
if err := validateAssetSource_FromEcrPublicParameters(props); err != nil {
panic(err)
}
var returns EcrPublicSource
_jsii_.StaticInvoke(
"@aws-cdk/aws-apprunner-alpha.AssetSource",
"fromEcrPublic",
[]interface{}{props},
&returns,
)
return returns
}
// Source from the GitHub repository.
// Experimental.
func AssetSource_FromGitHub(props *GithubRepositoryProps) GithubSource {
_init_.Initialize()
if err := validateAssetSource_FromGitHubParameters(props); err != nil {
panic(err)
}
var returns GithubSource
_jsii_.StaticInvoke(
"@aws-cdk/aws-apprunner-alpha.AssetSource",
"fromGitHub",
[]interface{}{props},
&returns,
)
return returns
}
func (a *jsiiProxy_AssetSource) Bind(_scope constructs.Construct) *SourceConfig {
if err := a.validateBindParameters(_scope); err != nil {
panic(err)
}
var returns *SourceConfig
_jsii_.Invoke(
a,
"bind",
[]interface{}{_scope},
&returns,
)
return returns
}