-
Notifications
You must be signed in to change notification settings - Fork 17
/
awscdk_BundlingDockerImage.go
170 lines (143 loc) · 3.86 KB
/
awscdk_BundlingDockerImage.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
// An experiment to bundle the entire CDK into a single module
package awscdk
import (
_init_ "github.com/aws/aws-cdk-go/awscdk/jsii"
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
)
// A Docker image used for asset bundling.
//
// Example:
// // The code below shows an example of how to instantiate this type.
// // The values are placeholders you should change.
// import monocdk "github.com/aws/aws-cdk-go/awscdk"
//
// bundlingDockerImage := monocdk.bundlingDockerImage.fromAsset(jsii.String("path"), &dockerBuildOptions{
// buildArgs: map[string]*string{
// "buildArgsKey": jsii.String("buildArgs"),
// },
// file: jsii.String("file"),
// platform: jsii.String("platform"),
// })
//
// Deprecated: use DockerImage.
type BundlingDockerImage interface {
// The Docker image.
// Deprecated: use DockerImage.
Image() *string
// Copies a file or directory out of the Docker image to the local filesystem.
//
// If `outputPath` is omitted the destination path is a temporary directory.
//
// Returns: the destination path.
// Deprecated: use DockerImage.
Cp(imagePath *string, outputPath *string) *string
// Runs a Docker image.
// Deprecated: use DockerImage.
Run(options *DockerRunOptions)
// Provides a stable representation of this image for JSON serialization.
//
// Returns: The overridden image name if set or image hash name in that order.
// Deprecated: use DockerImage.
ToJSON() *string
}
// The jsii proxy struct for BundlingDockerImage
type jsiiProxy_BundlingDockerImage struct {
_ byte // padding
}
func (j *jsiiProxy_BundlingDockerImage) Image() *string {
var returns *string
_jsii_.Get(
j,
"image",
&returns,
)
return returns
}
// Deprecated: use DockerImage.
func NewBundlingDockerImage(image *string, _imageHash *string) BundlingDockerImage {
_init_.Initialize()
if err := validateNewBundlingDockerImageParameters(image); err != nil {
panic(err)
}
j := jsiiProxy_BundlingDockerImage{}
_jsii_.Create(
"monocdk.BundlingDockerImage",
[]interface{}{image, _imageHash},
&j,
)
return &j
}
// Deprecated: use DockerImage.
func NewBundlingDockerImage_Override(b BundlingDockerImage, image *string, _imageHash *string) {
_init_.Initialize()
_jsii_.Create(
"monocdk.BundlingDockerImage",
[]interface{}{image, _imageHash},
b,
)
}
// Reference an image that's built directly from sources on disk.
// Deprecated: use DockerImage.fromBuild()
func BundlingDockerImage_FromAsset(path *string, options *DockerBuildOptions) BundlingDockerImage {
_init_.Initialize()
if err := validateBundlingDockerImage_FromAssetParameters(path, options); err != nil {
panic(err)
}
var returns BundlingDockerImage
_jsii_.StaticInvoke(
"monocdk.BundlingDockerImage",
"fromAsset",
[]interface{}{path, options},
&returns,
)
return returns
}
// Reference an image on DockerHub or another online registry.
// Deprecated: use DockerImage.
func BundlingDockerImage_FromRegistry(image *string) DockerImage {
_init_.Initialize()
if err := validateBundlingDockerImage_FromRegistryParameters(image); err != nil {
panic(err)
}
var returns DockerImage
_jsii_.StaticInvoke(
"monocdk.BundlingDockerImage",
"fromRegistry",
[]interface{}{image},
&returns,
)
return returns
}
func (b *jsiiProxy_BundlingDockerImage) Cp(imagePath *string, outputPath *string) *string {
if err := b.validateCpParameters(imagePath); err != nil {
panic(err)
}
var returns *string
_jsii_.Invoke(
b,
"cp",
[]interface{}{imagePath, outputPath},
&returns,
)
return returns
}
func (b *jsiiProxy_BundlingDockerImage) Run(options *DockerRunOptions) {
if err := b.validateRunParameters(options); err != nil {
panic(err)
}
_jsii_.InvokeVoid(
b,
"run",
[]interface{}{options},
)
}
func (b *jsiiProxy_BundlingDockerImage) ToJSON() *string {
var returns *string
_jsii_.Invoke(
b,
"toJSON",
nil, // no parameters
&returns,
)
return returns
}