Skip to content

Commit 8cc406e

Browse files
committed
replace DeploymentConfig[T] with bigcli.[T]
1 parent d511001 commit 8cc406e

File tree

1 file changed

+80
-80
lines changed

1 file changed

+80
-80
lines changed

codersdk/deployment.go

Lines changed: 80 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -118,43 +118,43 @@ type DeploymentConfig struct {
118118
GitAuth *DeploymentConfigField[[]GitAuthConfig] `json:"gitauth" typescript:",notnull"`
119119
Prometheus *PrometheusConfig `json:"prometheus" typescript:",notnull"`
120120
Pprof *PprofConfig `json:"pprof" typescript:",notnull"`
121-
ProxyTrustedHeaders *DeploymentConfigField[[]string] `json:"proxy_trusted_headers" typescript:",notnull"`
122-
ProxyTrustedOrigins *DeploymentConfigField[[]string] `json:"proxy_trusted_origins" typescript:",notnull"`
123-
CacheDirectory *DeploymentConfigField[string] `json:"cache_directory" typescript:",notnull"`
124-
InMemoryDatabase *DeploymentConfigField[bool] `json:"in_memory_database" typescript:",notnull"`
125-
PostgresURL *DeploymentConfigField[string] `json:"pg_connection_url" typescript:",notnull"`
121+
ProxyTrustedHeaders bigcli.Strings `json:"proxy_trusted_headers" typescript:",notnull"`
122+
ProxyTrustedOrigins bigcli.Strings `json:"proxy_trusted_origins" typescript:",notnull"`
123+
CacheDirectory bigcli.String `json:"cache_directory" typescript:",notnull"`
124+
InMemoryDatabase bigcli.Bool `json:"in_memory_database" typescript:",notnull"`
125+
PostgresURL bigcli.String `json:"pg_connection_url" typescript:",notnull"`
126126
OAuth2 *OAuth2Config `json:"oauth2" typescript:",notnull"`
127127
OIDC *OIDCConfig `json:"oidc" typescript:",notnull"`
128128
Telemetry *TelemetryConfig `json:"telemetry" typescript:",notnull"`
129129
TLS *TLSConfig `json:"tls" typescript:",notnull"`
130130
Trace *TraceConfig `json:"trace" typescript:",notnull"`
131-
SecureAuthCookie *DeploymentConfigField[bool] `json:"secure_auth_cookie" typescript:",notnull"`
132-
StrictTransportSecurity *DeploymentConfigField[int] `json:"strict_transport_security" typescript:",notnull"`
133-
StrictTransportSecurityOptions *DeploymentConfigField[[]string] `json:"strict_transport_security_options" typescript:",notnull"`
134-
SSHKeygenAlgorithm *DeploymentConfigField[string] `json:"ssh_keygen_algorithm" typescript:",notnull"`
135-
MetricsCacheRefreshInterval *DeploymentConfigField[time.Duration] `json:"metrics_cache_refresh_interval" typescript:",notnull"`
136-
AgentStatRefreshInterval *DeploymentConfigField[time.Duration] `json:"agent_stat_refresh_interval" typescript:",notnull"`
137-
AgentFallbackTroubleshootingURL *DeploymentConfigField[string] `json:"agent_fallback_troubleshooting_url" typescript:",notnull"`
138-
AuditLogging *DeploymentConfigField[bool] `json:"audit_logging" typescript:",notnull"`
139-
BrowserOnly *DeploymentConfigField[bool] `json:"browser_only" typescript:",notnull"`
140-
SCIMAPIKey *DeploymentConfigField[string] `json:"scim_api_key" typescript:",notnull"`
131+
SecureAuthCookie bigcli.Bool `json:"secure_auth_cookie" typescript:",notnull"`
132+
StrictTransportSecurity bigcli.Int64 `json:"strict_transport_security" typescript:",notnull"`
133+
StrictTransportSecurityOptions bigcli.Strings `json:"strict_transport_security_options" typescript:",notnull"`
134+
SSHKeygenAlgorithm bigcli.String `json:"ssh_keygen_algorithm" typescript:",notnull"`
135+
MetricsCacheRefreshInterval bigcli.Duration `json:"metrics_cache_refresh_interval" typescript:",notnull"`
136+
AgentStatRefreshInterval bigcli.Duration `json:"agent_stat_refresh_interval" typescript:",notnull"`
137+
AgentFallbackTroubleshootingURL bigcli.String `json:"agent_fallback_troubleshooting_url" typescript:",notnull"`
138+
AuditLogging bigcli.Bool `json:"audit_logging" typescript:",notnull"`
139+
BrowserOnly bigcli.Bool `json:"browser_only" typescript:",notnull"`
140+
SCIMAPIKey bigcli.String `json:"scim_api_key" typescript:",notnull"`
141141
Provisioner *ProvisionerConfig `json:"provisioner" typescript:",notnull"`
142142
RateLimit *RateLimitConfig `json:"rate_limit" typescript:",notnull"`
143-
Experiments *DeploymentConfigField[[]string] `json:"experiments" typescript:",notnull"`
144-
UpdateCheck *DeploymentConfigField[bool] `json:"update_check" typescript:",notnull"`
145-
MaxTokenLifetime *DeploymentConfigField[time.Duration] `json:"max_token_lifetime" typescript:",notnull"`
143+
Experiments bigcli.Strings `json:"experiments" typescript:",notnull"`
144+
UpdateCheck bigcli.Bool `json:"update_check" typescript:",notnull"`
145+
MaxTokenLifetime bigcli.Duration `json:"max_token_lifetime" typescript:",notnull"`
146146
Swagger *SwaggerConfig `json:"swagger" typescript:",notnull"`
147147
Logging *LoggingConfig `json:"logging" typescript:",notnull"`
148148
Dangerous *DangerousConfig `json:"dangerous" typescript:",notnull"`
149-
DisablePathApps *DeploymentConfigField[bool] `json:"disable_path_apps" typescript:",notnull"`
150-
SessionDuration *DeploymentConfigField[time.Duration] `json:"max_session_expiry" typescript:",notnull"`
151-
DisableSessionExpiryRefresh *DeploymentConfigField[bool] `json:"disable_session_expiry_refresh" typescript:",notnull"`
152-
DisablePasswordAuth *DeploymentConfigField[bool] `json:"disable_password_auth" typescript:",notnull"`
149+
DisablePathApps bigcli.Bool `json:"disable_path_apps" typescript:",notnull"`
150+
SessionDuration bigcli.Duration `json:"max_session_expiry" typescript:",notnull"`
151+
DisableSessionExpiryRefresh bigcli.Bool `json:"disable_session_expiry_refresh" typescript:",notnull"`
152+
DisablePasswordAuth bigcli.Bool `json:"disable_password_auth" typescript:",notnull"`
153153

154154
// DEPRECATED: Use HTTPAddress or TLS.Address instead.
155155
Address bigcli.BindAddress `json:"address" typescript:",notnull"`
156156
// DEPRECATED: Use Experiments instead.
157-
Experimental *DeploymentConfigField[bool] `json:"experimental" typescript:",notnull"`
157+
Experimental bigcli.Bool `json:"experimental" typescript:",notnull"`
158158
}
159159

160160
type DERP struct {
@@ -163,79 +163,79 @@ type DERP struct {
163163
}
164164

165165
type DERPServerConfig struct {
166-
Enable *DeploymentConfigField[bool] `json:"enable" typescript:",notnull"`
167-
RegionID *DeploymentConfigField[int] `json:"region_id" typescript:",notnull"`
168-
RegionCode *DeploymentConfigField[string] `json:"region_code" typescript:",notnull"`
169-
RegionName *DeploymentConfigField[string] `json:"region_name" typescript:",notnull"`
170-
STUNAddresses *DeploymentConfigField[[]string] `json:"stun_addresses" typescript:",notnull"`
171-
RelayURL *DeploymentConfigField[string] `json:"relay_url" typescript:",notnull"`
166+
Enable bigcli.Bool `json:"enable" typescript:",notnull"`
167+
RegionID bigcli.Int64 `json:"region_id" typescript:",notnull"`
168+
RegionCode bigcli.String `json:"region_code" typescript:",notnull"`
169+
RegionName bigcli.String `json:"region_name" typescript:",notnull"`
170+
STUNAddresses bigcli.Strings `json:"stun_addresses" typescript:",notnull"`
171+
RelayURL bigcli.String `json:"relay_url" typescript:",notnull"`
172172
}
173173

174174
type DERPConfig struct {
175-
URL *DeploymentConfigField[string] `json:"url" typescript:",notnull"`
176-
Path *DeploymentConfigField[string] `json:"path" typescript:",notnull"`
175+
URL bigcli.String `json:"url" typescript:",notnull"`
176+
Path bigcli.String `json:"path" typescript:",notnull"`
177177
}
178178

179179
type PrometheusConfig struct {
180-
Enable *DeploymentConfigField[bool] `json:"enable" typescript:",notnull"`
181-
Address *DeploymentConfigField[string] `json:"address" typescript:",notnull"`
180+
Enable bigcli.Bool `json:"enable" typescript:",notnull"`
181+
Address bigcli.String `json:"address" typescript:",notnull"`
182182
}
183183

184184
type PprofConfig struct {
185-
Enable *DeploymentConfigField[bool] `json:"enable" typescript:",notnull"`
186-
Address *DeploymentConfigField[string] `json:"address" typescript:",notnull"`
185+
Enable bigcli.Bool `json:"enable" typescript:",notnull"`
186+
Address bigcli.String `json:"address" typescript:",notnull"`
187187
}
188188

189189
type OAuth2Config struct {
190190
Github *OAuth2GithubConfig `json:"github" typescript:",notnull"`
191191
}
192192

193193
type OAuth2GithubConfig struct {
194-
ClientID *DeploymentConfigField[string] `json:"client_id" typescript:",notnull"`
195-
ClientSecret *DeploymentConfigField[string] `json:"client_secret" typescript:",notnull"`
196-
AllowedOrgs *DeploymentConfigField[[]string] `json:"allowed_orgs" typescript:",notnull"`
197-
AllowedTeams *DeploymentConfigField[[]string] `json:"allowed_teams" typescript:",notnull"`
198-
AllowSignups *DeploymentConfigField[bool] `json:"allow_signups" typescript:",notnull"`
199-
AllowEveryone *DeploymentConfigField[bool] `json:"allow_everyone" typescript:",notnull"`
200-
EnterpriseBaseURL *DeploymentConfigField[string] `json:"enterprise_base_url" typescript:",notnull"`
194+
ClientID bigcli.String `json:"client_id" typescript:",notnull"`
195+
ClientSecret bigcli.String `json:"client_secret" typescript:",notnull"`
196+
AllowedOrgs bigcli.Strings `json:"allowed_orgs" typescript:",notnull"`
197+
AllowedTeams bigcli.Strings `json:"allowed_teams" typescript:",notnull"`
198+
AllowSignups bigcli.Bool `json:"allow_signups" typescript:",notnull"`
199+
AllowEveryone bigcli.Bool `json:"allow_everyone" typescript:",notnull"`
200+
EnterpriseBaseURL bigcli.String `json:"enterprise_base_url" typescript:",notnull"`
201201
}
202202

203203
type OIDCConfig struct {
204-
AllowSignups *DeploymentConfigField[bool] `json:"allow_signups" typescript:",notnull"`
205-
ClientID *DeploymentConfigField[string] `json:"client_id" typescript:",notnull"`
206-
ClientSecret *DeploymentConfigField[string] `json:"client_secret" typescript:",notnull"`
207-
EmailDomain *DeploymentConfigField[[]string] `json:"email_domain" typescript:",notnull"`
208-
IssuerURL *DeploymentConfigField[string] `json:"issuer_url" typescript:",notnull"`
209-
Scopes *DeploymentConfigField[[]string] `json:"scopes" typescript:",notnull"`
210-
IgnoreEmailVerified *DeploymentConfigField[bool] `json:"ignore_email_verified" typescript:",notnull"`
211-
UsernameField *DeploymentConfigField[string] `json:"username_field" typescript:",notnull"`
212-
SignInText *DeploymentConfigField[string] `json:"sign_in_text" typescript:",notnull"`
213-
IconURL *DeploymentConfigField[string] `json:"icon_url" typescript:",notnull"`
204+
AllowSignups bigcli.Bool `json:"allow_signups" typescript:",notnull"`
205+
ClientID bigcli.String `json:"client_id" typescript:",notnull"`
206+
ClientSecret bigcli.String `json:"client_secret" typescript:",notnull"`
207+
EmailDomain bigcli.Strings `json:"email_domain" typescript:",notnull"`
208+
IssuerURL bigcli.String `json:"issuer_url" typescript:",notnull"`
209+
Scopes bigcli.Strings `json:"scopes" typescript:",notnull"`
210+
IgnoreEmailVerified bigcli.Bool `json:"ignore_email_verified" typescript:",notnull"`
211+
UsernameField bigcli.String `json:"username_field" typescript:",notnull"`
212+
SignInText bigcli.String `json:"sign_in_text" typescript:",notnull"`
213+
IconURL bigcli.String `json:"icon_url" typescript:",notnull"`
214214
}
215215

216216
type TelemetryConfig struct {
217-
Enable *DeploymentConfigField[bool] `json:"enable" typescript:",notnull"`
218-
Trace *DeploymentConfigField[bool] `json:"trace" typescript:",notnull"`
219-
URL *DeploymentConfigField[string] `json:"url" typescript:",notnull"`
217+
Enable bigcli.Bool `json:"enable" typescript:",notnull"`
218+
Trace bigcli.Bool `json:"trace" typescript:",notnull"`
219+
URL bigcli.String `json:"url" typescript:",notnull"`
220220
}
221221

222222
type TLSConfig struct {
223-
Enable bigcli.Bool `json:"enable" typescript:",notnull"`
224-
Address bigcli.BindAddress `json:"address" typescript:",notnull"`
225-
RedirectHTTP *DeploymentConfigField[bool] `json:"redirect_http" typescript:",notnull"`
226-
CertFiles *DeploymentConfigField[[]string] `json:"cert_file" typescript:",notnull"`
227-
ClientAuth *DeploymentConfigField[string] `json:"client_auth" typescript:",notnull"`
228-
ClientCAFile *DeploymentConfigField[string] `json:"client_ca_file" typescript:",notnull"`
229-
KeyFiles *DeploymentConfigField[[]string] `json:"key_file" typescript:",notnull"`
230-
MinVersion *DeploymentConfigField[string] `json:"min_version" typescript:",notnull"`
231-
ClientCertFile *DeploymentConfigField[string] `json:"client_cert_file" typescript:",notnull"`
232-
ClientKeyFile *DeploymentConfigField[string] `json:"client_key_file" typescript:",notnull"`
223+
Enable bigcli.Bool `json:"enable" typescript:",notnull"`
224+
Address bigcli.BindAddress `json:"address" typescript:",notnull"`
225+
RedirectHTTP bigcli.Bool `json:"redirect_http" typescript:",notnull"`
226+
CertFiles bigcli.Strings `json:"cert_file" typescript:",notnull"`
227+
ClientAuth bigcli.String `json:"client_auth" typescript:",notnull"`
228+
ClientCAFile bigcli.String `json:"client_ca_file" typescript:",notnull"`
229+
KeyFiles bigcli.Strings `json:"key_file" typescript:",notnull"`
230+
MinVersion bigcli.String `json:"min_version" typescript:",notnull"`
231+
ClientCertFile bigcli.String `json:"client_cert_file" typescript:",notnull"`
232+
ClientKeyFile bigcli.String `json:"client_key_file" typescript:",notnull"`
233233
}
234234

235235
type TraceConfig struct {
236-
Enable *DeploymentConfigField[bool] `json:"enable" typescript:",notnull"`
237-
HoneycombAPIKey *DeploymentConfigField[string] `json:"honeycomb_api_key" typescript:",notnull"`
238-
CaptureLogs *DeploymentConfigField[bool] `json:"capture_logs" typescript:",notnull"`
236+
Enable bigcli.Bool `json:"enable" typescript:",notnull"`
237+
HoneycombAPIKey bigcli.String `json:"honeycomb_api_key" typescript:",notnull"`
238+
CaptureLogs bigcli.Bool `json:"capture_logs" typescript:",notnull"`
239239
}
240240

241241
type GitAuthConfig struct {
@@ -252,30 +252,30 @@ type GitAuthConfig struct {
252252
}
253253

254254
type ProvisionerConfig struct {
255-
Daemons *DeploymentConfigField[int] `json:"daemons" typescript:",notnull"`
256-
DaemonPollInterval *DeploymentConfigField[time.Duration] `json:"daemon_poll_interval" typescript:",notnull"`
257-
DaemonPollJitter *DeploymentConfigField[time.Duration] `json:"daemon_poll_jitter" typescript:",notnull"`
258-
ForceCancelInterval *DeploymentConfigField[time.Duration] `json:"force_cancel_interval" typescript:",notnull"`
255+
Daemons bigcli.Int64 `json:"daemons" typescript:",notnull"`
256+
DaemonPollInterval bigcli.Duration `json:"daemon_poll_interval" typescript:",notnull"`
257+
DaemonPollJitter bigcli.Duration `json:"daemon_poll_jitter" typescript:",notnull"`
258+
ForceCancelInterval bigcli.Duration `json:"force_cancel_interval" typescript:",notnull"`
259259
}
260260

261261
type RateLimitConfig struct {
262-
DisableAll *DeploymentConfigField[bool] `json:"disable_all" typescript:",notnull"`
263-
API *DeploymentConfigField[int] `json:"api" typescript:",notnull"`
262+
DisableAll bigcli.Bool `json:"disable_all" typescript:",notnull"`
263+
API bigcli.Int64 `json:"api" typescript:",notnull"`
264264
}
265265

266266
type SwaggerConfig struct {
267-
Enable *DeploymentConfigField[bool] `json:"enable" typescript:",notnull"`
267+
Enable bigcli.Bool `json:"enable" typescript:",notnull"`
268268
}
269269

270270
type LoggingConfig struct {
271-
Human *DeploymentConfigField[string] `json:"human" typescript:",notnull"`
272-
JSON *DeploymentConfigField[string] `json:"json" typescript:",notnull"`
273-
Stackdriver *DeploymentConfigField[string] `json:"stackdriver" typescript:",notnull"`
271+
Human bigcli.String `json:"human" typescript:",notnull"`
272+
JSON bigcli.String `json:"json" typescript:",notnull"`
273+
Stackdriver bigcli.String `json:"stackdriver" typescript:",notnull"`
274274
}
275275

276276
type DangerousConfig struct {
277-
AllowPathAppSharing *DeploymentConfigField[bool] `json:"allow_path_app_sharing" typescript:",notnull"`
278-
AllowPathAppSiteOwnerAccess *DeploymentConfigField[bool] `json:"allow_path_app_site_owner_access" typescript:",notnull"`
277+
AllowPathAppSharing bigcli.Bool `json:"allow_path_app_sharing" typescript:",notnull"`
278+
AllowPathAppSiteOwnerAccess bigcli.Bool `json:"allow_path_app_site_owner_access" typescript:",notnull"`
279279
}
280280

281281
type Flaggable interface {

0 commit comments

Comments
 (0)