-
Notifications
You must be signed in to change notification settings - Fork 170
/
generate_types.go
172 lines (146 loc) · 4.24 KB
/
generate_types.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
package apphost
import "github.com/azure/azure-dev/cli/azd/pkg/custommaps"
type genAppInsight struct{}
type genStorageAccount struct {
Blobs []string
Tables []string
Queues []string
}
type genCosmosAccount struct {
Databases []string
}
type genServiceBus struct {
Queues []string
Topics []string
}
type genContainerAppEnvironmentServices struct {
Type string
}
type genKeyVault struct {
// when true, the bicep definition for tags is not generated
NoTags bool
// when provided, the principalId from the user provisioning the key vault gets read access
ReadAccessPrincipalId bool
}
type genContainerApp struct {
Volumes []*Volume
}
type genContainerAppIngressPort struct {
External bool
TargetPort int
}
type genContainerAppIngressAdditionalPortMappings struct {
genContainerAppIngressPort
ExposedPort int
}
type genContainerAppIngress struct {
genContainerAppIngressPort
Transport string
AllowInsecure bool
AdditionalPortMappings []genContainerAppIngressAdditionalPortMappings
}
type genContainer struct {
Image string
Env map[string]string
Bindings custommaps.WithOrder[Binding]
Inputs map[string]Input
Volumes []*Volume
}
type genDockerfile struct {
Path string
Context string
Env map[string]string
Bindings custommaps.WithOrder[Binding]
BuildArgs map[string]string
Args []string
}
type genProject struct {
Path string
Env map[string]string
Args []string
Bindings custommaps.WithOrder[Binding]
}
type genAppConfig struct{}
type genDapr struct {
AppId string
Application string
AppPort *int
AppProtocol *string
DaprHttpMaxRequestSize *int
DaprHttpReadBufferSize *int
EnableApiLogging *bool
LogLevel *string
}
type genDaprComponentMetadata struct {
SecretKeyRef *string
Value *string
}
type genDaprComponentSecret struct {
Value string
}
type genDaprComponent struct {
Metadata map[string]genDaprComponentMetadata
Secrets map[string]genDaprComponentSecret
Type string
Version string
}
type genSqlServer struct {
Databases []string
}
type genOutputParameter struct {
Type string
Value string
}
type genBicepModules struct {
Path string
Params map[string]string
}
type genBicepTemplateContext struct {
HasContainerRegistry bool
HasContainerEnvironment bool
HasDaprStore bool
HasLogAnalyticsWorkspace bool
RequiresPrincipalId bool
RequiresStorageVolume bool
AspireDashboard bool
AppInsights map[string]genAppInsight
ServiceBuses map[string]genServiceBus
StorageAccounts map[string]genStorageAccount
KeyVaults map[string]genKeyVault
ContainerAppEnvironmentServices map[string]genContainerAppEnvironmentServices
ContainerApps map[string]genContainerApp
AppConfigs map[string]genAppConfig
DaprComponents map[string]genDaprComponent
CosmosDbAccounts map[string]genCosmosAccount
SqlServers map[string]genSqlServer
InputParameters map[string]Input
OutputParameters map[string]genOutputParameter
OutputSecretParameters map[string]genOutputParameter
BicepModules map[string]genBicepModules
// parameters to be passed from main.bicep to resources.bicep
mappedParameters []string
}
type genContainerAppManifestTemplateContext struct {
Name string
Ingress *genContainerAppIngress
Env map[string]string
Secrets map[string]string
KeyVaultSecrets map[string]string
Dapr *genContainerAppManifestTemplateContextDapr
AutoConfigureDataProtection bool
Args []string
Volumes []*Volume
}
type genProjectFileContext struct {
Name string
Services map[string]string
}
type genContainerAppManifestTemplateContextDapr struct {
AppId string
AppPort *int
AppProtocol *string
EnableApiLogging *bool
HttpMaxRequestSize *int
HttpReadBufferSize *int
LogLevel *string
}