-
Notifications
You must be signed in to change notification settings - Fork 302
/
apps.gen.go
1331 lines (1188 loc) · 70.2 KB
/
apps.gen.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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by golang.org/x/tools/cmd/bundle. DO NOT EDIT.
// $ bundle -pkg godo -prefix ./dev/dist/godo
package godo
import (
"time"
)
// AppAlert Represents an alert configured for an app or component.
type AppAlert struct {
// The ID of the alert. This will be auto-generated by App Platform once the spec is submitted.
ID string `json:"id,omitempty"`
// Name of the component this alert applies to.
ComponentName string `json:"component_name,omitempty"`
Spec *AppAlertSpec `json:"spec,omitempty"`
// Email destinations for the alert when triggered.
Emails []string `json:"emails,omitempty"`
// Slack webhook destinations for the alert when triggered.
SlackWebhooks []*AppAlertSlackWebhook `json:"slack_webhooks,omitempty"`
Phase AppAlertPhase `json:"phase,omitempty"`
Progress *AppAlertProgress `json:"progress,omitempty"`
}
// AppAlertPhase the model 'AppAlertPhase'
type AppAlertPhase string
// List of AppAlertPhase
const (
AppAlertPhase_Unknown AppAlertPhase = "UNKNOWN"
AppAlertPhase_Pending AppAlertPhase = "PENDING"
AppAlertPhase_Configuring AppAlertPhase = "CONFIGURING"
AppAlertPhase_Active AppAlertPhase = "ACTIVE"
AppAlertPhase_Error AppAlertPhase = "ERROR"
)
// AppAlertProgress struct for AppAlertProgress
type AppAlertProgress struct {
Steps []*AppAlertProgressStep `json:"steps,omitempty"`
}
// AppAlertProgressStep struct for AppAlertProgressStep
type AppAlertProgressStep struct {
Name string `json:"name,omitempty"`
Status AppAlertProgressStepStatus `json:"status,omitempty"`
Steps []*AppAlertProgressStep `json:"steps,omitempty"`
StartedAt time.Time `json:"started_at,omitempty"`
EndedAt time.Time `json:"ended_at,omitempty"`
Reason *AppAlertProgressStepReason `json:"reason,omitempty"`
}
// AppAlertProgressStepReason struct for AppAlertProgressStepReason
type AppAlertProgressStepReason struct {
Code string `json:"code,omitempty"`
Message string `json:"message,omitempty"`
}
// AppAlertProgressStepStatus the model 'AppAlertProgressStepStatus'
type AppAlertProgressStepStatus string
// List of AppAlertProgressStepStatus
const (
AppAlertProgressStepStatus_Unknown AppAlertProgressStepStatus = "UNKNOWN"
AppAlertProgressStepStatus_Pending AppAlertProgressStepStatus = "PENDING"
AppAlertProgressStepStatus_Running AppAlertProgressStepStatus = "RUNNING"
AppAlertProgressStepStatus_Error AppAlertProgressStepStatus = "ERROR"
AppAlertProgressStepStatus_Success AppAlertProgressStepStatus = "SUCCESS"
)
// AppAlertSlackWebhook Configuration of a Slack alerting destination.
type AppAlertSlackWebhook struct {
// URL for the Slack webhook.
URL string `json:"url,omitempty"`
// Name of the Slack channel.
Channel string `json:"channel,omitempty"`
}
// App An application's configuration and status.
type App struct {
ID string `json:"id,omitempty"`
OwnerUUID string `json:"owner_uuid,omitempty"`
Spec *AppSpec `json:"spec"`
LastDeploymentActiveAt time.Time `json:"last_deployment_active_at,omitempty"`
DefaultIngress string `json:"default_ingress,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
ActiveDeployment *Deployment `json:"active_deployment,omitempty"`
InProgressDeployment *Deployment `json:"in_progress_deployment,omitempty"`
PendingDeployment *Deployment `json:"pending_deployment,omitempty"`
LastDeploymentCreatedAt time.Time `json:"last_deployment_created_at,omitempty"`
LiveURL string `json:"live_url,omitempty"`
Region *AppRegion `json:"region,omitempty"`
TierSlug string `json:"tier_slug,omitempty"`
LiveURLBase string `json:"live_url_base,omitempty"`
LiveDomain string `json:"live_domain,omitempty"`
Domains []*AppDomain `json:"domains,omitempty"`
PinnedDeployment *Deployment `json:"pinned_deployment,omitempty"`
BuildConfig *AppBuildConfig `json:"build_config,omitempty"`
// The id of the project for the app. This will be empty if there is a fleet (project) lookup failure.
ProjectID string `json:"project_id,omitempty"`
// The dedicated egress ip addresses associated with the app.
DedicatedIps []*AppDedicatedIp `json:"dedicated_ips,omitempty"`
}
// AppAlertSpec Configuration of an alert for the app or a individual component.
type AppAlertSpec struct {
Rule AppAlertSpecRule `json:"rule,omitempty"`
// Determines whether or not the alert is disabled.
Disabled bool `json:"disabled,omitempty"`
Operator AppAlertSpecOperator `json:"operator,omitempty"`
// The meaning is dependent upon the rule. It is used in conjunction with the operator and window to determine when an alert should trigger.
Value float32 `json:"value,omitempty"`
Window AppAlertSpecWindow `json:"window,omitempty"`
}
// AppAlertSpecOperator the model 'AppAlertSpecOperator'
type AppAlertSpecOperator string
// List of AppAlertSpecOperator
const (
AppAlertSpecOperator_UnspecifiedOperator AppAlertSpecOperator = "UNSPECIFIED_OPERATOR"
AppAlertSpecOperator_GreaterThan AppAlertSpecOperator = "GREATER_THAN"
AppAlertSpecOperator_LessThan AppAlertSpecOperator = "LESS_THAN"
)
// AppAlertSpecRule - CPU_UTILIZATION: Represents CPU for a given container instance. Only applicable at the component level. - MEM_UTILIZATION: Represents RAM for a given container instance. Only applicable at the component level. - RESTART_COUNT: Represents restart count for a given container instance. Only applicable at the component level. - DEPLOYMENT_FAILED: Represents whether a deployment has failed. Only applicable at the app level. - DEPLOYMENT_LIVE: Represents whether a deployment has succeeded. Only applicable at the app level. - DEPLOYMENT_STARTED: Represents whether a deployment has started. Only applicable at the app level. - DEPLOYMENT_CANCELED: Represents whether a deployment has been canceled. Only applicable at the app level. - DOMAIN_FAILED: Represents whether a domain configuration has failed. Only applicable at the app level. - DOMAIN_LIVE: Represents whether a domain configuration has succeeded. Only applicable at the app level. - FUNCTIONS_ACTIVATION_COUNT: Represents an activation count for a given functions instance. Only applicable to functions components. - FUNCTIONS_AVERAGE_DURATION_MS: Represents the average duration for function runtimes. Only applicable to functions components. - FUNCTIONS_ERROR_RATE_PER_MINUTE: Represents an error rate per minute for a given functions instance. Only applicable to functions components. - FUNCTIONS_AVERAGE_WAIT_TIME_MS: Represents the average wait time for functions. Only applicable to functions components. - FUNCTIONS_ERROR_COUNT: Represents an error count for a given functions instance. Only applicable to functions components. - FUNCTIONS_GB_RATE_PER_SECOND: Represents the rate of memory consumption (GB x seconds) for functions. Only applicable to functions components.
type AppAlertSpecRule string
// List of AppAlertSpecRule
const (
AppAlertSpecRule_UnspecifiedRule AppAlertSpecRule = "UNSPECIFIED_RULE"
AppAlertSpecRule_CPUUtilization AppAlertSpecRule = "CPU_UTILIZATION"
AppAlertSpecRule_MemUtilization AppAlertSpecRule = "MEM_UTILIZATION"
AppAlertSpecRule_RestartCount AppAlertSpecRule = "RESTART_COUNT"
AppAlertSpecRule_DeploymentFailed AppAlertSpecRule = "DEPLOYMENT_FAILED"
AppAlertSpecRule_DeploymentLive AppAlertSpecRule = "DEPLOYMENT_LIVE"
AppAlertSpecRule_DeploymentStarted AppAlertSpecRule = "DEPLOYMENT_STARTED"
AppAlertSpecRule_DeploymentCanceled AppAlertSpecRule = "DEPLOYMENT_CANCELED"
AppAlertSpecRule_DomainFailed AppAlertSpecRule = "DOMAIN_FAILED"
AppAlertSpecRule_DomainLive AppAlertSpecRule = "DOMAIN_LIVE"
AppAlertSpecRule_FunctionsActivationCount AppAlertSpecRule = "FUNCTIONS_ACTIVATION_COUNT"
AppAlertSpecRule_FunctionsAverageDurationMS AppAlertSpecRule = "FUNCTIONS_AVERAGE_DURATION_MS"
AppAlertSpecRule_FunctionsErrorRatePerMinute AppAlertSpecRule = "FUNCTIONS_ERROR_RATE_PER_MINUTE"
AppAlertSpecRule_FunctionsAverageWaitTimeMs AppAlertSpecRule = "FUNCTIONS_AVERAGE_WAIT_TIME_MS"
AppAlertSpecRule_FunctionsErrorCount AppAlertSpecRule = "FUNCTIONS_ERROR_COUNT"
AppAlertSpecRule_FunctionsGBRatePerSecond AppAlertSpecRule = "FUNCTIONS_GB_RATE_PER_SECOND"
)
// AppAlertSpecWindow the model 'AppAlertSpecWindow'
type AppAlertSpecWindow string
// List of AppAlertSpecWindow
const (
AppAlertSpecWindow_UnspecifiedWindow AppAlertSpecWindow = "UNSPECIFIED_WINDOW"
AppAlertSpecWindow_FiveMinutes AppAlertSpecWindow = "FIVE_MINUTES"
AppAlertSpecWindow_TenMinutes AppAlertSpecWindow = "TEN_MINUTES"
AppAlertSpecWindow_ThirtyMinutes AppAlertSpecWindow = "THIRTY_MINUTES"
AppAlertSpecWindow_OneHour AppAlertSpecWindow = "ONE_HOUR"
)
// AppAutoscalingSpec struct for AppAutoscalingSpec
type AppAutoscalingSpec struct {
// The minimum amount of instances for this component.
MinInstanceCount int64 `json:"min_instance_count,omitempty"`
// The maximum amount of instances for this component.
MaxInstanceCount int64 `json:"max_instance_count,omitempty"`
Metrics *AppAutoscalingSpecMetrics `json:"metrics,omitempty"`
}
// AppAutoscalingSpecMetricCPU struct for AppAutoscalingSpecMetricCPU
type AppAutoscalingSpecMetricCPU struct {
// The average target CPU utilization for the component.
Percent int64 `json:"percent,omitempty"`
}
// AppAutoscalingSpecMetrics struct for AppAutoscalingSpecMetrics
type AppAutoscalingSpecMetrics struct {
CPU *AppAutoscalingSpecMetricCPU `json:"cpu,omitempty"`
}
// AppBuildConfig struct for AppBuildConfig
type AppBuildConfig struct {
CNBVersioning *AppBuildConfigCNBVersioning `json:"cnb_versioning,omitempty"`
}
// AppBuildConfigCNBVersioning struct for AppBuildConfigCNBVersioning
type AppBuildConfigCNBVersioning struct {
// List of versioned buildpacks used for the application. Buildpacks are only versioned based on the major semver version, therefore exact versions will not be available at the app build config.
Buildpacks []*Buildpack `json:"buildpacks,omitempty"`
// A version id that represents the underlying CNB stack. The version of the stack indicates what buildpacks are supported.
StackID string `json:"stack_id,omitempty"`
}
// AppDatabaseSpec struct for AppDatabaseSpec
type AppDatabaseSpec struct {
// The database's name. The name must be unique across all components within the same app and cannot use capital letters.
Name string `json:"name"`
Engine AppDatabaseSpecEngine `json:"engine,omitempty"`
Version string `json:"version,omitempty"`
// Deprecated.
Size string `json:"size,omitempty"`
// Deprecated.
NumNodes int64 `json:"num_nodes,omitempty"`
// Whether this is a production or dev database.
Production bool `json:"production,omitempty"`
// The name of the underlying DigitalOcean DBaaS cluster. This is required for production databases. For dev databases, if cluster_name is not set, a new cluster will be provisioned.
ClusterName string `json:"cluster_name,omitempty"`
// The name of the MySQL or PostgreSQL database to configure.
DBName string `json:"db_name,omitempty"`
// The name of the MySQL or PostgreSQL user to configure.
DBUser string `json:"db_user,omitempty"`
}
// AppDatabaseSpecEngine the model 'AppDatabaseSpecEngine'
type AppDatabaseSpecEngine string
// List of AppDatabaseSpecEngine
const (
AppDatabaseSpecEngine_Unset AppDatabaseSpecEngine = "UNSET"
AppDatabaseSpecEngine_MySQL AppDatabaseSpecEngine = "MYSQL"
AppDatabaseSpecEngine_PG AppDatabaseSpecEngine = "PG"
AppDatabaseSpecEngine_Redis AppDatabaseSpecEngine = "REDIS"
AppDatabaseSpecEngine_MongoDB AppDatabaseSpecEngine = "MONGODB"
AppDatabaseSpecEngine_Kafka AppDatabaseSpecEngine = "KAFKA"
AppDatabaseSpecEngine_Opensearch AppDatabaseSpecEngine = "OPENSEARCH"
)
// AppDedicatedIp Represents a dedicated egress ip.
type AppDedicatedIp struct {
// The ip address of the dedicated egress ip.
Ip string `json:"ip,omitempty"`
// The id of the dedictated egress ip.
ID string `json:"id,omitempty"`
Status AppDedicatedIpStatus `json:"status,omitempty"`
}
// AppDedicatedIpStatus the model 'AppDedicatedIpStatus'
type AppDedicatedIpStatus string
// List of AppDedicatedIPStatus
const (
APPDEDICATEDIPSTATUS_Unknown AppDedicatedIpStatus = "UNKNOWN"
APPDEDICATEDIPSTATUS_Assigning AppDedicatedIpStatus = "ASSIGNING"
APPDEDICATEDIPSTATUS_Assigned AppDedicatedIpStatus = "ASSIGNED"
APPDEDICATEDIPSTATUS_Removed AppDedicatedIpStatus = "REMOVED"
)
// AppDomainSpec struct for AppDomainSpec
type AppDomainSpec struct {
Domain string `json:"domain"`
Type AppDomainSpecType `json:"type,omitempty"`
Wildcard bool `json:"wildcard,omitempty"`
// Optional. If the domain uses DigitalOcean DNS and you would like App Platform to automatically manage it for you, set this to the name of the domain on your account. For example, If the domain you are adding is `app.domain.com`, the zone could be `domain.com`.
Zone string `json:"zone,omitempty"`
Certificate string `json:"certificate,omitempty"`
// Optional. The minimum version of TLS a client application can use to access resources for the domain. Must be one of the following values wrapped within quotations: `\"1.2\"` or `\"1.3\"`.
MinimumTLSVersion string `json:"minimum_tls_version,omitempty"`
}
// AppDomainSpecType the model 'AppDomainSpecType'
type AppDomainSpecType string
// List of AppDomainSpecType
const (
AppDomainSpecType_Unspecified AppDomainSpecType = "UNSPECIFIED"
AppDomainSpecType_Default AppDomainSpecType = "DEFAULT"
AppDomainSpecType_Primary AppDomainSpecType = "PRIMARY"
AppDomainSpecType_Alias AppDomainSpecType = "ALIAS"
)
// AppEgressSpec Specification for app egress configurations.
type AppEgressSpec struct {
Type AppEgressSpecType `json:"type,omitempty"`
}
// AppEgressSpecType the model 'AppEgressSpecType'
type AppEgressSpecType string
// List of AppEgressSpecType
const (
APPEGRESSSPECTYPE_Autoassign AppEgressSpecType = "AUTOASSIGN"
APPEGRESSSPECTYPE_DedicatedIp AppEgressSpecType = "DEDICATED_IP"
)
// AppFunctionsSpec struct for AppFunctionsSpec
type AppFunctionsSpec struct {
// The name. Must be unique across all components within the same app.
Name string `json:"name"`
Git *GitSourceSpec `json:"git,omitempty"`
GitHub *GitHubSourceSpec `json:"github,omitempty"`
GitLab *GitLabSourceSpec `json:"gitlab,omitempty"`
// An optional path to the working directory to use for the build. Must be relative to the root of the repo.
SourceDir string `json:"source_dir,omitempty"`
// A list of environment variables made available to the component.
Envs []*AppVariableDefinition `json:"envs,omitempty"`
// (Deprecated) A list of HTTP routes that should be routed to this component.
Routes []*AppRouteSpec `json:"routes,omitempty"`
// A list of configured alerts the user has enabled.
Alerts []*AppAlertSpec `json:"alerts,omitempty"`
// A list of configured log forwarding destinations.
LogDestinations []*AppLogDestinationSpec `json:"log_destinations,omitempty"`
CORS *AppCORSPolicy `json:"cors,omitempty"`
}
// AppIngressSpec Specification for app ingress configurations.
type AppIngressSpec struct {
LoadBalancer AppIngressSpecLoadBalancer `json:"load_balancer,omitempty"`
LoadBalancerSize int64 `json:"load_balancer_size,omitempty"`
// Rules for configuring HTTP ingress for component routes, CORS, rewrites, and redirects.
Rules []*AppIngressSpecRule `json:"rules,omitempty"`
}
// AppIngressSpecLoadBalancer the model 'AppIngressSpecLoadBalancer'
type AppIngressSpecLoadBalancer string
// List of AppIngressSpecLoadBalancer
const (
AppIngressSpecLoadBalancer_Unknown AppIngressSpecLoadBalancer = "UNKNOWN"
AppIngressSpecLoadBalancer_DigitalOcean AppIngressSpecLoadBalancer = "DIGITALOCEAN"
)
// AppIngressSpecRule A rule that configures component routes, rewrites, redirects and cors.
type AppIngressSpecRule struct {
Match *AppIngressSpecRuleMatch `json:"match,omitempty"`
Component *AppIngressSpecRuleRoutingComponent `json:"component,omitempty"`
Redirect *AppIngressSpecRuleRoutingRedirect `json:"redirect,omitempty"`
CORS *AppCORSPolicy `json:"cors,omitempty"`
}
// AppIngressSpecRuleMatch The match configuration for a rule.
type AppIngressSpecRuleMatch struct {
Path *AppIngressSpecRuleStringMatch `json:"path,omitempty"`
}
// AppIngressSpecRuleRoutingComponent The component routing configuration.
type AppIngressSpecRuleRoutingComponent struct {
// The name of the component to route to.
Name string `json:"name,omitempty"`
// An optional flag to preserve the path that is forwarded to the backend service. By default, the HTTP request path will be trimmed from the left when forwarded to the component. For example, a component with `path=/api` will have requests to `/api/list` trimmed to `/list`. If this value is `true`, the path will remain `/api/list`. Note: this is not applicable for Functions Components and is mutually exclusive with `rewrite`.
PreservePathPrefix bool `json:"preserve_path_prefix,omitempty"`
// An optional field that will rewrite the path of the component to be what is specified here. By default, the HTTP request path will be trimmed from the left when forwarded to the component. For example, a component with `path=/api` will have requests to `/api/list` trimmed to `/list`. If you specified the rewrite to be `/v1/`, requests to `/api/list` would be rewritten to `/v1/list`. Note: this is mutually exclusive with `preserve_path_prefix`.
Rewrite string `json:"rewrite,omitempty"`
}
// AppIngressSpecRuleRoutingRedirect The redirect routing configuration.
type AppIngressSpecRuleRoutingRedirect struct {
// An optional URI path to redirect to. Note: if this is specified the whole URI of the original request will be overwritten to this value, irrespective of the original request URI being matched.
Uri string `json:"uri,omitempty"`
// The authority/host to redirect to. This can be a hostname or IP address. Note: use `port` to set the port.
Authority string `json:"authority,omitempty"`
// The port to redirect to.
Port int64 `json:"port,omitempty"`
// The scheme to redirect to. Supported values are `http` or `https`. Default: `https`.
Scheme string `json:"scheme,omitempty"`
// The redirect code to use. Defaults to `302`. Supported values are 300, 301, 302, 303, 304, 307, 308.
RedirectCode int64 `json:"redirect_code,omitempty"`
}
// AppIngressSpecRuleStringMatch The string match configuration.
type AppIngressSpecRuleStringMatch struct {
// Prefix-based match. For example, `/api` will match `/api`, `/api/`, and any nested paths such as `/api/v1/endpoint`.
Prefix string `json:"prefix,omitempty"`
}
// AppJobSpec struct for AppJobSpec
type AppJobSpec struct {
// The name. Must be unique across all components within the same app.
Name string `json:"name"`
Git *GitSourceSpec `json:"git,omitempty"`
GitHub *GitHubSourceSpec `json:"github,omitempty"`
Image *ImageSourceSpec `json:"image,omitempty"`
GitLab *GitLabSourceSpec `json:"gitlab,omitempty"`
// The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks.
DockerfilePath string `json:"dockerfile_path,omitempty"`
// An optional build command to run while building this component from source.
BuildCommand string `json:"build_command,omitempty"`
// An optional run command to override the component's default.
RunCommand string `json:"run_command,omitempty"`
// An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo.
SourceDir string `json:"source_dir,omitempty"`
// An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://www.digitalocean.com/docs/app-platform/).
EnvironmentSlug string `json:"environment_slug,omitempty"`
// A list of environment variables made available to the component.
Envs []*AppVariableDefinition `json:"envs,omitempty"`
// The instance size to use for this component.
InstanceSizeSlug string `json:"instance_size_slug,omitempty"`
InstanceCount int64 `json:"instance_count,omitempty"`
Kind AppJobSpecKind `json:"kind,omitempty"`
// A list of configured alerts which apply to the component.
Alerts []*AppAlertSpec `json:"alerts,omitempty"`
// A list of configured log forwarding destinations.
LogDestinations []*AppLogDestinationSpec `json:"log_destinations,omitempty"`
Termination *AppJobSpecTermination `json:"termination,omitempty"`
}
// AppJobSpecKind - UNSPECIFIED: Default job type, will auto-complete to POST_DEPLOY kind. - PRE_DEPLOY: Indicates a job that runs before an app deployment. - POST_DEPLOY: Indicates a job that runs after an app deployment. - FAILED_DEPLOY: Indicates a job that runs after a component fails to deploy.
type AppJobSpecKind string
// List of AppJobSpecKind
const (
AppJobSpecKind_Unspecified AppJobSpecKind = "UNSPECIFIED"
AppJobSpecKind_PreDeploy AppJobSpecKind = "PRE_DEPLOY"
AppJobSpecKind_PostDeploy AppJobSpecKind = "POST_DEPLOY"
AppJobSpecKind_FailedDeploy AppJobSpecKind = "FAILED_DEPLOY"
)
// AppJobSpecTermination struct for AppJobSpecTermination
type AppJobSpecTermination struct {
// The number of seconds to wait between sending a TERM signal to a container and issuing a KILL which causes immediate shutdown. Default: 120, Minimum 1, Maximum 600.
GracePeriodSeconds int32 `json:"grace_period_seconds,omitempty"`
}
// AppLogDestinationSpec struct for AppLogDestinationSpec
type AppLogDestinationSpec struct {
// Name of the log destination.
Name string `json:"name"`
Papertrail *AppLogDestinationSpecPapertrail `json:"papertrail,omitempty"`
Datadog *AppLogDestinationSpecDataDog `json:"datadog,omitempty"`
Logtail *AppLogDestinationSpecLogtail `json:"logtail,omitempty"`
OpenSearch *AppLogDestinationSpecOpenSearch `json:"open_search,omitempty"`
Endpoint string `json:"endpoint,omitempty"`
TLSInsecure bool `json:"tls_insecure,omitempty"`
Headers []*AppLogDestinationSpecHeader `json:"headers,omitempty"`
}
// AppLogDestinationSpecDataDog DataDog configuration.
type AppLogDestinationSpecDataDog struct {
// Datadog HTTP log intake endpoint.
Endpoint string `json:"endpoint,omitempty"`
// Datadog API key.
ApiKey string `json:"api_key"`
}
// AppLogDestinationSpecHeader struct for AppLogDestinationSpecHeader
type AppLogDestinationSpecHeader struct {
// The name
Key string `json:"key"`
// The header value.
Value string `json:"value,omitempty"`
}
// AppLogDestinationSpecLogtail Logtail configuration.
type AppLogDestinationSpecLogtail struct {
// Logtail token.
Token string `json:"token"`
}
// AppLogDestinationSpecOpenSearch OpenSearch configuration.
type AppLogDestinationSpecOpenSearch struct {
// OpenSearch API Endpoint. Only HTTPS is supported. Format: https://<host>:<port>. Cannot be specified if `cluster_name` is also specified.
Endpoint string `json:"endpoint,omitempty"`
BasicAuth *OpenSearchBasicAuth `json:"basic_auth,omitempty"`
// The index name to use for the logs. If not set, the default index name is \"logs\".
IndexName string `json:"index_name,omitempty"`
// The name of a DigitalOcean DBaaS OpenSearch cluster to use as a log forwarding destination. Cannot be specified if `endpoint` is also specified.
ClusterName string `json:"cluster_name,omitempty"`
}
// AppLogDestinationSpecPapertrail Papertrail configuration.
type AppLogDestinationSpecPapertrail struct {
// Papertrail syslog endpoint.
Endpoint string `json:"endpoint"`
}
// AppMaintenanceSpec struct for AppMaintenanceSpec
type AppMaintenanceSpec struct {
// Indicates whether maintenance mode should be enabled for the app.
Enabled bool `json:"enabled,omitempty"`
// Indicates whether the app should be archived. Setting this to true implies that enabled is set to true. Note that this feature is currently in closed beta.
Archive bool `json:"archive,omitempty"`
}
// AppRouteSpec struct for AppRouteSpec
type AppRouteSpec struct {
// (Deprecated) An HTTP path prefix. Paths must start with / and must be unique across all components within an app.
Path string `json:"path,omitempty"`
// (Deprecated) An optional flag to preserve the path that is forwarded to the backend service. By default, the HTTP request path will be trimmed from the left when forwarded to the component. For example, a component with `path=/api` will have requests to `/api/list` trimmed to `/list`. If this value is `true`, the path will remain `/api/list`. Note: this is not applicable for Functions Components.
PreservePathPrefix bool `json:"preserve_path_prefix,omitempty"`
}
// AppServiceSpec struct for AppServiceSpec
type AppServiceSpec struct {
// The name. Must be unique across all components within the same app.
Name string `json:"name"`
Git *GitSourceSpec `json:"git,omitempty"`
GitHub *GitHubSourceSpec `json:"github,omitempty"`
Image *ImageSourceSpec `json:"image,omitempty"`
GitLab *GitLabSourceSpec `json:"gitlab,omitempty"`
// The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks.
DockerfilePath string `json:"dockerfile_path,omitempty"`
// An optional build command to run while building this component from source.
BuildCommand string `json:"build_command,omitempty"`
// An optional run command to override the component's default.
RunCommand string `json:"run_command,omitempty"`
// An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo.
SourceDir string `json:"source_dir,omitempty"`
// An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://www.digitalocean.com/docs/app-platform/).
EnvironmentSlug string `json:"environment_slug,omitempty"`
// A list of environment variables made available to the component.
Envs []*AppVariableDefinition `json:"envs,omitempty"`
InstanceSizeSlug string `json:"instance_size_slug,omitempty"`
// The amount of instances that this component should be scaled to.
InstanceCount int64 `json:"instance_count,omitempty"`
Autoscaling *AppAutoscalingSpec `json:"autoscaling,omitempty"`
// The internal port on which this service's run command will listen. Default: 8080 If there is not an environment variable with the name `PORT`, one will be automatically added with its value set to the value of this field.
HTTPPort int64 `json:"http_port,omitempty"`
Protocol ServingProtocol `json:"protocol,omitempty"`
// (Deprecated) A list of HTTP routes that should be routed to this component.
Routes []*AppRouteSpec `json:"routes,omitempty"`
HealthCheck *AppServiceSpecHealthCheck `json:"health_check,omitempty"`
CORS *AppCORSPolicy `json:"cors,omitempty"`
// The ports on which this service will listen for internal traffic.
InternalPorts []int64 `json:"internal_ports,omitempty"`
// A list of configured alerts which apply to the component.
Alerts []*AppAlertSpec `json:"alerts,omitempty"`
// A list of configured log forwarding destinations.
LogDestinations []*AppLogDestinationSpec `json:"log_destinations,omitempty"`
Termination *AppServiceSpecTermination `json:"termination,omitempty"`
}
// AppServiceSpecHealthCheck struct for AppServiceSpecHealthCheck
type AppServiceSpecHealthCheck struct {
// Deprecated. Use http_path instead.
Path string `json:"path,omitempty"`
// The number of seconds to wait before beginning health checks. Default: 0 seconds, Minimum 0, Maximum 3600.
InitialDelaySeconds int32 `json:"initial_delay_seconds,omitempty"`
// The number of seconds to wait between health checks. Default: 10 seconds, Minimum 1, Maximum 300.
PeriodSeconds int32 `json:"period_seconds,omitempty"`
// The number of seconds after which the check times out. Default: 1 second, Minimum 1, Maximum 120.
TimeoutSeconds int32 `json:"timeout_seconds,omitempty"`
// The number of successful health checks before considered healthy. Default: 1, Minimum 1, Maximum 50.
SuccessThreshold int32 `json:"success_threshold,omitempty"`
// The number of failed health checks before considered unhealthy. Default: 9, Minimum 1, Maximum 50.
FailureThreshold int32 `json:"failure_threshold,omitempty"`
// The route path used for the HTTP health check ping. If not set, the HTTP health check will be disabled and a TCP health check used instead.
HTTPPath string `json:"http_path,omitempty"`
// The port on which the health check will be performed. If not set, the health check will be performed on the component's http_port.
Port int64 `json:"port,omitempty"`
}
// AppServiceSpecTermination struct for AppServiceSpecTermination
type AppServiceSpecTermination struct {
// The number of seconds to wait between selecting a container instance for termination and issuing the TERM signal. Selecting a container instance for termination begins an asynchronous drain of new requests on upstream load-balancers. Default: 15 seconds, Minimum 1, Maximum 110.
DrainSeconds int32 `json:"drain_seconds,omitempty"`
// The number of seconds to wait between sending a TERM signal to a container and issuing a KILL which causes immediate shutdown. Default: 120, Minimum 1, Maximum 600.
GracePeriodSeconds int32 `json:"grace_period_seconds,omitempty"`
}
// AppSpec The desired configuration of an application.
type AppSpec struct {
// The name of the app. Must be unique across all apps in the same account.
Name string `json:"name"`
// Workloads which expose publicly-accessible HTTP services.
Services []*AppServiceSpec `json:"services,omitempty"`
// Content which can be rendered to static web assets.
StaticSites []*AppStaticSiteSpec `json:"static_sites,omitempty"`
// Workloads which do not expose publicly-accessible HTTP services.
Workers []*AppWorkerSpec `json:"workers,omitempty"`
// Pre and post deployment workloads which do not expose publicly-accessible HTTP routes.
Jobs []*AppJobSpec `json:"jobs,omitempty"`
// Workloads which expose publicly-accessible HTTP services via Functions Components.
Functions []*AppFunctionsSpec `json:"functions,omitempty"`
// Database instances which can provide persistence to workloads within the application.
Databases []*AppDatabaseSpec `json:"databases,omitempty"`
// A set of hostnames where the application will be available.
Domains []*AppDomainSpec `json:"domains,omitempty"`
Region string `json:"region,omitempty"`
// A list of environment variables made available to all components in the app.
Envs []*AppVariableDefinition `json:"envs,omitempty"`
// A list of alerts which apply to the app.
Alerts []*AppAlertSpec `json:"alerts,omitempty"`
Ingress *AppIngressSpec `json:"ingress,omitempty"`
Egress *AppEgressSpec `json:"egress,omitempty"`
Features []string `json:"features,omitempty"`
Maintenance *AppMaintenanceSpec `json:"maintenance,omitempty"`
}
// AppStaticSiteSpec struct for AppStaticSiteSpec
type AppStaticSiteSpec struct {
// The name. Must be unique across all components within the same app.
Name string `json:"name"`
Git *GitSourceSpec `json:"git,omitempty"`
GitHub *GitHubSourceSpec `json:"github,omitempty"`
GitLab *GitLabSourceSpec `json:"gitlab,omitempty"`
// The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks.
DockerfilePath string `json:"dockerfile_path,omitempty"`
// An optional build command to run while building this component from source.
BuildCommand string `json:"build_command,omitempty"`
// An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo.
SourceDir string `json:"source_dir,omitempty"`
// An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://www.digitalocean.com/docs/app-platform/).
EnvironmentSlug string `json:"environment_slug,omitempty"`
// An optional path to where the built assets will be located, relative to the build context. If not set, App Platform will automatically scan for these directory names: `_static`, `dist`, `public`, `build`.
OutputDir string `json:"output_dir,omitempty"`
IndexDocument string `json:"index_document,omitempty"`
// The name of the error document to use when serving this static site. Default: 404.html. If no such file exists within the built assets, App Platform will supply one.
ErrorDocument string `json:"error_document,omitempty"`
// A list of environment variables made available to the component.
Envs []*AppVariableDefinition `json:"envs,omitempty"`
// (Deprecated) A list of HTTP routes that should be routed to this component.
Routes []*AppRouteSpec `json:"routes,omitempty"`
CORS *AppCORSPolicy `json:"cors,omitempty"`
// The name of the document to use as the fallback for any requests to documents that are not found when serving this static site. Only 1 of `catchall_document` or `error_document` can be set.
CatchallDocument string `json:"catchall_document,omitempty"`
}
// AppVariableDefinition struct for AppVariableDefinition
type AppVariableDefinition struct {
// The name
Key string `json:"key"`
// The value. If the type is `SECRET`, the value will be encrypted on first submission. On following submissions, the encrypted value should be used.
Value string `json:"value,omitempty"`
Scope AppVariableScope `json:"scope,omitempty"`
Type AppVariableType `json:"type,omitempty"`
}
// AppWorkerSpec struct for AppWorkerSpec
type AppWorkerSpec struct {
// The name. Must be unique across all components within the same app.
Name string `json:"name"`
Git *GitSourceSpec `json:"git,omitempty"`
GitHub *GitHubSourceSpec `json:"github,omitempty"`
Image *ImageSourceSpec `json:"image,omitempty"`
GitLab *GitLabSourceSpec `json:"gitlab,omitempty"`
// The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks.
DockerfilePath string `json:"dockerfile_path,omitempty"`
// An optional build command to run while building this component from source.
BuildCommand string `json:"build_command,omitempty"`
// An optional run command to override the component's default.
RunCommand string `json:"run_command,omitempty"`
// An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo.
SourceDir string `json:"source_dir,omitempty"`
// An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://www.digitalocean.com/docs/app-platform/).
EnvironmentSlug string `json:"environment_slug,omitempty"`
// A list of environment variables made available to the component.
Envs []*AppVariableDefinition `json:"envs,omitempty"`
// The instance size to use for this component.
InstanceSizeSlug string `json:"instance_size_slug,omitempty"`
InstanceCount int64 `json:"instance_count,omitempty"`
Autoscaling *AppAutoscalingSpec `json:"autoscaling,omitempty"`
// A list of configured alerts which apply to the component.
Alerts []*AppAlertSpec `json:"alerts,omitempty"`
// A list of configured log forwarding destinations.
LogDestinations []*AppLogDestinationSpec `json:"log_destinations,omitempty"`
Termination *AppWorkerSpecTermination `json:"termination,omitempty"`
}
// AppWorkerSpecTermination struct for AppWorkerSpecTermination
type AppWorkerSpecTermination struct {
// The number of seconds to wait between sending a TERM signal to a container and issuing a KILL which causes immediate shutdown. Default: 120, Minimum 1, Maximum 600.
GracePeriodSeconds int32 `json:"grace_period_seconds,omitempty"`
}
// Buildpack struct for Buildpack
type Buildpack struct {
// The ID of the buildpack.
ID string `json:"id,omitempty"`
// Full semver version string.
Version string `json:"version,omitempty"`
// The major version line that the buildpack is pinned to. Example: a value of `1` indicates that the buildpack is pinned to versions `>=1.0.0 and <2.0.0`.
MajorVersion int32 `json:"major_version,omitempty"`
// Indicates whether the buildpack is on the latest major version line available.
Latest bool `json:"latest,omitempty"`
// A human friendly name.
Name string `json:"name,omitempty"`
// A description of the buildpack's purpose and steps performed at build time.
Description []string `json:"description,omitempty"`
// A link to the buildpack's documentation.
DocsLink string `json:"docs_link,omitempty"`
}
// DeploymentCauseDetailsAutoscalerAction struct for DeploymentCauseDetailsAutoscalerAction
type DeploymentCauseDetailsAutoscalerAction struct {
// Marker for the deployment being autoscaled. Necessary because the generation tooling can't handle empty messages.
Autoscaled bool `json:"autoscaled,omitempty"`
}
// DeploymentCauseDetailsDigitalOceanUser struct for DeploymentCauseDetailsDigitalOceanUser
type DeploymentCauseDetailsDigitalOceanUser struct {
UUID string `json:"uuid,omitempty"`
Email string `json:"email,omitempty"`
FullName string `json:"full_name,omitempty"`
}
// DeploymentCauseDetailsDigitalOceanUserAction struct for DeploymentCauseDetailsDigitalOceanUserAction
type DeploymentCauseDetailsDigitalOceanUserAction struct {
User *DeploymentCauseDetailsDigitalOceanUser `json:"user,omitempty"`
Name DeploymentCauseDetailsDigitalOceanUserActionName `json:"name,omitempty"`
}
// DeploymentCauseDetailsDOCRPush struct for DeploymentCauseDetailsDOCRPush
type DeploymentCauseDetailsDOCRPush struct {
// The registry name.
Registry string `json:"registry,omitempty"`
// The repository name.
Repository string `json:"repository,omitempty"`
// The repository tag.
Tag string `json:"tag,omitempty"`
// OCI Image digest.
ImageDigest string `json:"image_digest,omitempty"`
}
// DeploymentCauseDetailsGitPush struct for DeploymentCauseDetailsGitPush
type DeploymentCauseDetailsGitPush struct {
GitHub *GitHubSourceSpec `json:"github,omitempty"`
GitLab *GitLabSourceSpec `json:"gitlab,omitempty"`
Username string `json:"username,omitempty"`
CommitAuthor string `json:"commit_author,omitempty"`
CommitSHA string `json:"commit_sha,omitempty"`
CommitMessage string `json:"commit_message,omitempty"`
}
// AppCORSPolicy struct for AppCORSPolicy
type AppCORSPolicy struct {
// The set of allowed CORS origins. This configures the Access-Control-Allow-Origin header.
AllowOrigins []*AppStringMatch `json:"allow_origins,omitempty"`
// The set of allowed HTTP methods. This configures the Access-Control-Allow-Methods header.
AllowMethods []string `json:"allow_methods,omitempty"`
// The set of allowed HTTP request headers. This configures the Access-Control-Allow-Headers header.
AllowHeaders []string `json:"allow_headers,omitempty"`
// The set of HTTP response headers that browsers are allowed to access. This configures the Access-Control-Expose-Headers header.
ExposeHeaders []string `json:"expose_headers,omitempty"`
// An optional duration specifying how long browsers can cache the results of a preflight request. This configures the Access-Control-Max-Age header. Example: `5h30m`.
MaxAge string `json:"max_age,omitempty"`
// Whether browsers should expose the response to the client-side JavaScript code when the request's credentials mode is `include`. This configures the Access-Control-Allow-Credentials header.
AllowCredentials bool `json:"allow_credentials,omitempty"`
}
// AppCreateRequest struct for AppCreateRequest
type AppCreateRequest struct {
Spec *AppSpec `json:"spec"`
// Optional. The UUID of the project the app should be assigned.
ProjectID string `json:"project_id,omitempty"`
}
// DeployTemplate struct for DeployTemplate
type DeployTemplate struct {
Spec *AppSpec `json:"spec,omitempty"`
}
// Deployment struct for Deployment
type Deployment struct {
ID string `json:"id,omitempty"`
Spec *AppSpec `json:"spec,omitempty"`
Services []*DeploymentService `json:"services,omitempty"`
StaticSites []*DeploymentStaticSite `json:"static_sites,omitempty"`
Workers []*DeploymentWorker `json:"workers,omitempty"`
Jobs []*DeploymentJob `json:"jobs,omitempty"`
Functions []*DeploymentFunctions `json:"functions,omitempty"`
PhaseLastUpdatedAt time.Time `json:"phase_last_updated_at,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
Cause string `json:"cause,omitempty"`
ClonedFrom string `json:"cloned_from,omitempty"`
Progress *DeploymentProgress `json:"progress,omitempty"`
Phase DeploymentPhase `json:"phase,omitempty"`
TierSlug string `json:"tier_slug,omitempty"`
PreviousDeploymentID string `json:"previous_deployment_id,omitempty"`
CauseDetails *DeploymentCauseDetails `json:"cause_details,omitempty"`
LoadBalancerID string `json:"load_balancer_id,omitempty"`
Timing *DeploymentTiming `json:"timing,omitempty"`
}
// DeploymentCauseDetails struct for DeploymentCauseDetails
type DeploymentCauseDetails struct {
DigitalOceanUserAction *DeploymentCauseDetailsDigitalOceanUserAction `json:"digitalocean_user_action,omitempty"`
GitPush *DeploymentCauseDetailsGitPush `json:"git_push,omitempty"`
DOCRPush *DeploymentCauseDetailsDOCRPush `json:"docr_push,omitempty"`
Internal bool `json:"internal,omitempty"`
Autoscaler *DeploymentCauseDetailsAutoscalerAction `json:"autoscaler,omitempty"`
Type DeploymentCauseDetailsType `json:"type,omitempty"`
}
// DeploymentCauseDetailsType - MANUAL: A deployment that was manually created - DEPLOY_ON_PUSH: A deployment that was automatically created by a Deploy on Push hook - MAINTENANCE: A deployment created for App Platform maintenance - MANUAL_ROLLBACK: A rollback deployment that was manually created - AUTO_ROLLBACK: An automatic rollback deployment created as a result of a previous deployment failing - UPDATE_DATABASE_TRUSTED_SOURCES: A deployment that was created due to an update in database trusted sources. - AUTOSCALED: A deployment that was created due to an autoscaler update.
type DeploymentCauseDetailsType string
// List of DeploymentCauseDetailsType
const (
DeploymentCauseDetailsType_Unknown DeploymentCauseDetailsType = "UNKNOWN"
DeploymentCauseDetailsType_Manual DeploymentCauseDetailsType = "MANUAL"
DeploymentCauseDetailsType_DeployOnPush DeploymentCauseDetailsType = "DEPLOY_ON_PUSH"
DeploymentCauseDetailsType_Maintenance DeploymentCauseDetailsType = "MAINTENANCE"
DeploymentCauseDetailsType_ManualRollback DeploymentCauseDetailsType = "MANUAL_ROLLBACK"
DeploymentCauseDetailsType_AutoRollback DeploymentCauseDetailsType = "AUTO_ROLLBACK"
DeploymentCauseDetailsType_UpdateDatabaseTrustedSources DeploymentCauseDetailsType = "UPDATE_DATABASE_TRUSTED_SOURCES"
DeploymentCauseDetailsType_Autoscaled DeploymentCauseDetailsType = "AUTOSCALED"
)
// DeploymentFunctions struct for DeploymentFunctions
type DeploymentFunctions struct {
Name string `json:"name,omitempty"`
// The commit hash of the repository that was used to build this functions component.
SourceCommitHash string `json:"source_commit_hash,omitempty"`
// The namespace where the functions are deployed.
Namespace string `json:"namespace,omitempty"`
}
// DeploymentJob struct for DeploymentJob
type DeploymentJob struct {
Name string `json:"name,omitempty"`
SourceCommitHash string `json:"source_commit_hash,omitempty"`
// The list of resolved buildpacks used for a given deployment component.
Buildpacks []*Buildpack `json:"buildpacks,omitempty"`
}
// DeploymentPhase the model 'DeploymentPhase'
type DeploymentPhase string
// List of DeploymentPhase
const (
DeploymentPhase_Unknown DeploymentPhase = "UNKNOWN"
DeploymentPhase_PendingBuild DeploymentPhase = "PENDING_BUILD"
DeploymentPhase_Building DeploymentPhase = "BUILDING"
DeploymentPhase_PendingDeploy DeploymentPhase = "PENDING_DEPLOY"
DeploymentPhase_Deploying DeploymentPhase = "DEPLOYING"
DeploymentPhase_Active DeploymentPhase = "ACTIVE"
DeploymentPhase_Superseded DeploymentPhase = "SUPERSEDED"
DeploymentPhase_Error DeploymentPhase = "ERROR"
DeploymentPhase_Canceled DeploymentPhase = "CANCELED"
)
// DeploymentProgress struct for DeploymentProgress
type DeploymentProgress struct {
PendingSteps int32 `json:"pending_steps,omitempty"`
RunningSteps int32 `json:"running_steps,omitempty"`
SuccessSteps int32 `json:"success_steps,omitempty"`
ErrorSteps int32 `json:"error_steps,omitempty"`
TotalSteps int32 `json:"total_steps,omitempty"`
Steps []*DeploymentProgressStep `json:"steps,omitempty"`
SummarySteps []*DeploymentProgressStep `json:"summary_steps,omitempty"`
}
// DeploymentProgressStep struct for DeploymentProgressStep
type DeploymentProgressStep struct {
Name string `json:"name,omitempty"`
Status DeploymentProgressStepStatus `json:"status,omitempty"`
Steps []*DeploymentProgressStep `json:"steps,omitempty"`
StartedAt time.Time `json:"started_at,omitempty"`
EndedAt time.Time `json:"ended_at,omitempty"`
Reason *DeploymentProgressStepReason `json:"reason,omitempty"`
ComponentName string `json:"component_name,omitempty"`
// The base of a human-readable description of the step intended to be combined with the component name for presentation. For example: `message_base` = \"Building service\" `component_name` = \"api\"
MessageBase string `json:"message_base,omitempty"`
}
// DeploymentProgressStepReason struct for DeploymentProgressStepReason
type DeploymentProgressStepReason struct {
Code string `json:"code,omitempty"`
Message string `json:"message,omitempty"`
}
// DeploymentProgressStepStatus the model 'DeploymentProgressStepStatus'
type DeploymentProgressStepStatus string
// List of DeploymentProgressStepStatus
const (
DeploymentProgressStepStatus_Unknown DeploymentProgressStepStatus = "UNKNOWN"
DeploymentProgressStepStatus_Pending DeploymentProgressStepStatus = "PENDING"
DeploymentProgressStepStatus_Running DeploymentProgressStepStatus = "RUNNING"
DeploymentProgressStepStatus_Error DeploymentProgressStepStatus = "ERROR"
DeploymentProgressStepStatus_Success DeploymentProgressStepStatus = "SUCCESS"
)
// DeploymentService struct for DeploymentService
type DeploymentService struct {
Name string `json:"name,omitempty"`
SourceCommitHash string `json:"source_commit_hash,omitempty"`
// The list of resolved buildpacks used for a given deployment component.
Buildpacks []*Buildpack `json:"buildpacks,omitempty"`
}
// DeploymentStaticSite struct for DeploymentStaticSite
type DeploymentStaticSite struct {
Name string `json:"name,omitempty"`
SourceCommitHash string `json:"source_commit_hash,omitempty"`
// The list of resolved buildpacks used for a given deployment component.
Buildpacks []*Buildpack `json:"buildpacks,omitempty"`
}
// DeploymentTiming struct for DeploymentTiming
type DeploymentTiming struct {
// Pending describes the time spent waiting for the build to begin. This may include delays related to build concurrency limits.
Pending string `json:"pending,omitempty"`
// BuildTotal describes total time between the start of the build and its completion.
BuildTotal string `json:"build_total,omitempty"`
// BuildBillable describes the time spent executing the build. As builds may run concurrently this may be greater than the build total.
BuildBillable string `json:"build_billable,omitempty"`
// Components breaks down billable build time by component.
Components []*DeploymentTimingComponent `json:"components,omitempty"`
// DatabaseProvision describes the time spent creating databases.
DatabaseProvision string `json:"database_provision,omitempty"`
// Deploying is time spent starting containers and waiting for health checks to pass.
Deploying string `json:"deploying,omitempty"`
}
// DeploymentTimingComponent struct for DeploymentTimingComponent
type DeploymentTimingComponent struct {
// Name of the component.
Name string `json:"name,omitempty"`
// BuildBillable is the billable build time for this component.
BuildBillable string `json:"build_billable,omitempty"`
}
// DeploymentWorker struct for DeploymentWorker
type DeploymentWorker struct {
Name string `json:"name,omitempty"`
SourceCommitHash string `json:"source_commit_hash,omitempty"`
// The list of resolved buildpacks used for a given deployment component.
Buildpacks []*Buildpack `json:"buildpacks,omitempty"`
}
// DetectRequest struct for DetectRequest
type DetectRequest struct {
Git *GitSourceSpec `json:"git,omitempty"`
GitHub *GitHubSourceSpec `json:"github,omitempty"`
GitLab *GitLabSourceSpec `json:"gitlab,omitempty"`
// An optional commit hash to use instead of the branch specified in the source spec.
CommitSHA string `json:"commit_sha,omitempty"`
// An optional path to the working directory for the detection process.
SourceDir string `json:"source_dir,omitempty"`
}
// DetectResponse struct for DetectResponse
type DetectResponse struct {
Components []*DetectResponseComponent `json:"components,omitempty"`
Template *DeployTemplate `json:"template,omitempty"`
TemplateFound bool `json:"template_found,omitempty"`
TemplateValid bool `json:"template_valid,omitempty"`
TemplateError string `json:"template_error,omitempty"`
// Whether or not the underlying detection is still pending. If true, the request can be retried as-is until this field is false and the response contains the detection result.
Pending bool `json:"pending,omitempty"`
}
// DetectResponseComponent struct for DetectResponseComponent
type DetectResponseComponent struct {
Strategy DetectResponseType `json:"strategy,omitempty"`
Types []string `json:"types,omitempty"`
// A list of Dockerfiles that were found for this component. The recommendation is to use the first Dockerfile.
Dockerfiles []string `json:"dockerfiles,omitempty"`
BuildCommand string `json:"build_command,omitempty"`
RunCommand string `json:"run_command,omitempty"`
EnvironmentSlug string `json:"environment_slug,omitempty"`
// A list of HTTP ports that this component may listen on. The recommendation is to use the last port in the list.
HTTPPorts []int64 `json:"http_ports,omitempty"`
EnvVars []*AppVariableDefinition `json:"env_vars,omitempty"`
// List of serverless packages detected.
ServerlessPackages []*DetectResponseServerlessPackage `json:"serverless_packages,omitempty"`
SourceDir string `json:"source_dir,omitempty"`
// The list of detected buildpacks that will be used for the component build.
Buildpacks []*Buildpack `json:"buildpacks,omitempty"`
}
// DetectResponseServerlessFunction struct for DetectResponseServerlessFunction
type DetectResponseServerlessFunction struct {
// Name of the function.
Name string `json:"name,omitempty"`
// Package that the function belongs to.
Package string `json:"package,omitempty"`
// Runtime detected for the function.
Runtime string `json:"runtime,omitempty"`
Limits *DetectResponseServerlessFunctionLimits `json:"limits,omitempty"`
}
// DetectResponseServerlessFunctionLimits struct for DetectResponseServerlessFunctionLimits
type DetectResponseServerlessFunctionLimits struct {
// Timeout for function invocation in milliseconds.
Timeout string `json:"timeout,omitempty"`
// Max memory allocation for function invocation in megabytes.
Memory string `json:"memory,omitempty"`
// Max log size usage for function invocation in kilobytes.
Logs string `json:"logs,omitempty"`
}
// DetectResponseServerlessPackage struct for DetectResponseServerlessPackage
type DetectResponseServerlessPackage struct {
// Name of the serverless package.
Name string `json:"name,omitempty"`
// List of functions detected in the serverless package.
Functions []*DetectResponseServerlessFunction `json:"functions,omitempty"`
}
// DetectResponseType the model 'DetectResponseType'
type DetectResponseType string
// List of DetectResponseType
const (
DetectResponseType_Unspecified DetectResponseType = "UNSPECIFIED"
DetectResponseType_Dockerfile DetectResponseType = "DOCKERFILE"
DetectResponseType_Buildpack DetectResponseType = "BUILDPACK"
DetectResponseType_HTML DetectResponseType = "HTML"
DetectResponseType_Serverless DetectResponseType = "SERVERLESS"
)
// DeploymentCauseDetailsDigitalOceanUserActionName the model 'CauseDetailsDigitalOceanUserActionName'
type DeploymentCauseDetailsDigitalOceanUserActionName string
// List of DeploymentCauseDetailsDigitalOceanUserActionName
const (
DeploymentCauseDetailsDigitalOceanUserActionName_Unknown DeploymentCauseDetailsDigitalOceanUserActionName = "UNKNOWN"
DeploymentCauseDetailsDigitalOceanUserActionName_CreateDeployment DeploymentCauseDetailsDigitalOceanUserActionName = "CREATE_DEPLOYMENT"