-
Notifications
You must be signed in to change notification settings - Fork 80
Expand file tree
/
Copy pathcommands.gen.go
More file actions
1929 lines (1788 loc) · 98.3 KB
/
commands.gen.go
File metadata and controls
1929 lines (1788 loc) · 98.3 KB
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. DO NOT EDIT.
package temporalcli
import (
"github.com/mattn/go-isatty"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"os"
"time"
)
var hasHighlighting = isatty.IsTerminal(os.Stdout.Fd())
type TemporalCommand struct {
Command cobra.Command
Env string
EnvFile string
LogLevel StringEnum
LogFormat StringEnum
Output StringEnum
TimeFormat StringEnum
Color StringEnum
NoJsonShorthandPayloads bool
}
func NewTemporalCommand(cctx *CommandContext) *TemporalCommand {
var s TemporalCommand
s.Command.Use = "temporal"
s.Command.Short = "Temporal command-line interface and development server."
s.Command.Long = ""
s.Command.Args = cobra.NoArgs
s.Command.AddCommand(&NewTemporalActivityCommand(cctx, &s).Command)
s.Command.AddCommand(&NewTemporalBatchCommand(cctx, &s).Command)
s.Command.AddCommand(&NewTemporalCloudCommand(cctx, &s).Command)
s.Command.AddCommand(&NewTemporalEnvCommand(cctx, &s).Command)
s.Command.AddCommand(&NewTemporalOperatorCommand(cctx, &s).Command)
s.Command.AddCommand(&NewTemporalServerCommand(cctx, &s).Command)
s.Command.AddCommand(&NewTemporalTaskQueueCommand(cctx, &s).Command)
s.Command.AddCommand(&NewTemporalWorkflowCommand(cctx, &s).Command)
s.Command.PersistentFlags().StringVar(&s.Env, "env", "default", "Environment to read environment-specific flags from.")
cctx.BindFlagEnvVar(s.Command.PersistentFlags().Lookup("env"), "TEMPORAL_ENV")
s.Command.PersistentFlags().StringVar(&s.EnvFile, "env-file", "", "File to read all environments (defaults to `$HOME/.config/temporalio/temporal.yaml`).")
s.LogLevel = NewStringEnum([]string{"debug", "info", "warn", "error", "never"}, "info")
s.Command.PersistentFlags().Var(&s.LogLevel, "log-level", "Log level. Accepted values: debug, info, warn, error, never.")
s.LogFormat = NewStringEnum([]string{"text", "json"}, "text")
s.Command.PersistentFlags().Var(&s.LogFormat, "log-format", "Log format. Accepted values: text, json.")
s.Output = NewStringEnum([]string{"text", "json", "jsonl"}, "text")
s.Command.PersistentFlags().VarP(&s.Output, "output", "o", "Data output format. Accepted values: text, json, jsonl.")
s.TimeFormat = NewStringEnum([]string{"relative", "iso", "raw"}, "relative")
s.Command.PersistentFlags().Var(&s.TimeFormat, "time-format", "Time format. Accepted values: relative, iso, raw.")
s.Color = NewStringEnum([]string{"always", "never", "auto"}, "auto")
s.Command.PersistentFlags().Var(&s.Color, "color", "Set coloring. Accepted values: always, never, auto.")
s.Command.PersistentFlags().BoolVar(&s.NoJsonShorthandPayloads, "no-json-shorthand-payloads", false, "Always all payloads as raw payloads even if they are JSON.")
s.initCommand(cctx)
return &s
}
type TemporalActivityCommand struct {
Parent *TemporalCommand
Command cobra.Command
ClientOptions
}
func NewTemporalActivityCommand(cctx *CommandContext, parent *TemporalCommand) *TemporalActivityCommand {
var s TemporalActivityCommand
s.Parent = parent
s.Command.Use = "activity"
s.Command.Short = "Complete or fail an Activity."
s.Command.Long = ""
s.Command.Args = cobra.NoArgs
s.Command.AddCommand(&NewTemporalActivityCompleteCommand(cctx, &s).Command)
s.Command.AddCommand(&NewTemporalActivityFailCommand(cctx, &s).Command)
s.ClientOptions.buildFlags(cctx, s.Command.PersistentFlags())
return &s
}
type TemporalActivityCompleteCommand struct {
Parent *TemporalActivityCommand
Command cobra.Command
WorkflowReferenceOptions
ActivityId string
Identity string
Result string
}
func NewTemporalActivityCompleteCommand(cctx *CommandContext, parent *TemporalActivityCommand) *TemporalActivityCompleteCommand {
var s TemporalActivityCompleteCommand
s.Parent = parent
s.Command.DisableFlagsInUseLine = true
s.Command.Use = "complete [flags]"
s.Command.Short = "Complete an Activity."
if hasHighlighting {
s.Command.Long = "Complete an Activity.\n\n\x1b[1mtemporal activity complete --activity-id=MyActivityId --workflow-id=MyWorkflowId --result='{\"MyResultKey\": \"MyResultVal\"}'\x1b[0m"
} else {
s.Command.Long = "Complete an Activity.\n\n`temporal activity complete --activity-id=MyActivityId --workflow-id=MyWorkflowId --result='{\"MyResultKey\": \"MyResultVal\"}'`"
}
s.Command.Args = cobra.NoArgs
s.WorkflowReferenceOptions.buildFlags(cctx, s.Command.Flags())
s.Command.Flags().StringVar(&s.ActivityId, "activity-id", "", "The Activity to be completed.")
_ = cobra.MarkFlagRequired(s.Command.Flags(), "activity-id")
s.Command.Flags().StringVar(&s.Identity, "identity", "", "Identity of user submitting this request.")
s.Command.Flags().StringVar(&s.Result, "result", "", "The result with which to complete the Activity (JSON).")
_ = cobra.MarkFlagRequired(s.Command.Flags(), "result")
s.Command.Run = func(c *cobra.Command, args []string) {
if err := s.run(cctx, args); err != nil {
cctx.Options.Fail(err)
}
}
return &s
}
type TemporalActivityFailCommand struct {
Parent *TemporalActivityCommand
Command cobra.Command
WorkflowReferenceOptions
ActivityId string
Detail string
Identity string
Reason string
}
func NewTemporalActivityFailCommand(cctx *CommandContext, parent *TemporalActivityCommand) *TemporalActivityFailCommand {
var s TemporalActivityFailCommand
s.Parent = parent
s.Command.DisableFlagsInUseLine = true
s.Command.Use = "fail [flags]"
s.Command.Short = "Fail an Activity."
if hasHighlighting {
s.Command.Long = "Fail an Activity.\n\n\x1b[1mtemporal activity fail --activity-id=MyActivityId --workflow-id=MyWorkflowId\x1b[0m"
} else {
s.Command.Long = "Fail an Activity.\n\n`temporal activity fail --activity-id=MyActivityId --workflow-id=MyWorkflowId`"
}
s.Command.Args = cobra.NoArgs
s.WorkflowReferenceOptions.buildFlags(cctx, s.Command.Flags())
s.Command.Flags().StringVar(&s.ActivityId, "activity-id", "", "The Activity to be failed.")
_ = cobra.MarkFlagRequired(s.Command.Flags(), "activity-id")
s.Command.Flags().StringVar(&s.Detail, "detail", "", "JSON data describing reason for failing the Activity.")
s.Command.Flags().StringVar(&s.Identity, "identity", "", "Identity of user submitting this request.")
s.Command.Flags().StringVar(&s.Reason, "reason", "", "Reason for failing the Activity.")
s.Command.Run = func(c *cobra.Command, args []string) {
if err := s.run(cctx, args); err != nil {
cctx.Options.Fail(err)
}
}
return &s
}
type TemporalBatchCommand struct {
Parent *TemporalCommand
Command cobra.Command
ClientOptions
}
func NewTemporalBatchCommand(cctx *CommandContext, parent *TemporalCommand) *TemporalBatchCommand {
var s TemporalBatchCommand
s.Parent = parent
s.Command.Use = "batch"
s.Command.Short = "Manage Batch Jobs"
s.Command.Long = "Batch commands change multiple Workflow Executions."
s.Command.Args = cobra.NoArgs
s.Command.AddCommand(&NewTemporalBatchDescribeCommand(cctx, &s).Command)
s.Command.AddCommand(&NewTemporalBatchListCommand(cctx, &s).Command)
s.Command.AddCommand(&NewTemporalBatchTerminateCommand(cctx, &s).Command)
s.ClientOptions.buildFlags(cctx, s.Command.PersistentFlags())
return &s
}
type TemporalBatchDescribeCommand struct {
Parent *TemporalBatchCommand
Command cobra.Command
JobId string
}
func NewTemporalBatchDescribeCommand(cctx *CommandContext, parent *TemporalBatchCommand) *TemporalBatchDescribeCommand {
var s TemporalBatchDescribeCommand
s.Parent = parent
s.Command.DisableFlagsInUseLine = true
s.Command.Use = "describe [flags]"
s.Command.Short = "Show Batch Job progress."
if hasHighlighting {
s.Command.Long = "The temporal batch describe command shows the progress of an ongoing Batch Job.\n\n\x1b[1mtemporal batch describe --job-id=MyJobId\x1b[0m"
} else {
s.Command.Long = "The temporal batch describe command shows the progress of an ongoing Batch Job.\n\n`temporal batch describe --job-id=MyJobId`"
}
s.Command.Args = cobra.NoArgs
s.Command.Flags().StringVar(&s.JobId, "job-id", "", "The Batch Job Id to describe.")
_ = cobra.MarkFlagRequired(s.Command.Flags(), "job-id")
s.Command.Run = func(c *cobra.Command, args []string) {
if err := s.run(cctx, args); err != nil {
cctx.Options.Fail(err)
}
}
return &s
}
type TemporalBatchListCommand struct {
Parent *TemporalBatchCommand
Command cobra.Command
Limit int
}
func NewTemporalBatchListCommand(cctx *CommandContext, parent *TemporalBatchCommand) *TemporalBatchListCommand {
var s TemporalBatchListCommand
s.Parent = parent
s.Command.DisableFlagsInUseLine = true
s.Command.Use = "list [flags]"
s.Command.Short = "List all Batch Jobs"
if hasHighlighting {
s.Command.Long = "The temporal batch list command returns all Batch Jobs.\nBatch Jobs can be returned for an entire Cluster or a single Namespace.\n\n\x1b[1mtemporal batch list --namespace=MyNamespace\x1b[0m"
} else {
s.Command.Long = "The temporal batch list command returns all Batch Jobs.\nBatch Jobs can be returned for an entire Cluster or a single Namespace.\n\n`temporal batch list --namespace=MyNamespace`"
}
s.Command.Args = cobra.NoArgs
s.Command.Flags().IntVar(&s.Limit, "limit", 0, "Limit the number of items to print.")
s.Command.Run = func(c *cobra.Command, args []string) {
if err := s.run(cctx, args); err != nil {
cctx.Options.Fail(err)
}
}
return &s
}
type TemporalBatchTerminateCommand struct {
Parent *TemporalBatchCommand
Command cobra.Command
JobId string
Reason string
}
func NewTemporalBatchTerminateCommand(cctx *CommandContext, parent *TemporalBatchCommand) *TemporalBatchTerminateCommand {
var s TemporalBatchTerminateCommand
s.Parent = parent
s.Command.DisableFlagsInUseLine = true
s.Command.Use = "terminate [flags]"
s.Command.Short = "Terminate a Batch Job"
if hasHighlighting {
s.Command.Long = "The temporal batch terminate command terminates a Batch Job with the provided Job Id.\nFor future reference, provide a reason for terminating the Batch Job.\n\n\x1b[1mtemporal batch terminate --job-id=MyJobId --reason=JobReason\x1b[0m"
} else {
s.Command.Long = "The temporal batch terminate command terminates a Batch Job with the provided Job Id.\nFor future reference, provide a reason for terminating the Batch Job.\n\n`temporal batch terminate --job-id=MyJobId --reason=JobReason`"
}
s.Command.Args = cobra.NoArgs
s.Command.Flags().StringVar(&s.JobId, "job-id", "", "The Batch Job Id to terminate.")
_ = cobra.MarkFlagRequired(s.Command.Flags(), "job-id")
s.Command.Flags().StringVar(&s.Reason, "reason", "", "Reason for terminating the Batch Job.")
_ = cobra.MarkFlagRequired(s.Command.Flags(), "reason")
s.Command.Run = func(c *cobra.Command, args []string) {
if err := s.run(cctx, args); err != nil {
cctx.Options.Fail(err)
}
}
return &s
}
type TemporalCloudCommand struct {
Parent *TemporalCommand
Command cobra.Command
}
func NewTemporalCloudCommand(cctx *CommandContext, parent *TemporalCommand) *TemporalCloudCommand {
var s TemporalCloudCommand
s.Parent = parent
s.Command.Use = "cloud"
s.Command.Short = "Manage Temporal Cloud."
s.Command.Long = "Commands to manage Temporal cloud."
s.Command.Args = cobra.NoArgs
s.Command.AddCommand(&NewTemporalCloudLoginCommand(cctx, &s).Command)
s.Command.AddCommand(&NewTemporalCloudLogoutCommand(cctx, &s).Command)
return &s
}
type TemporalCloudLoginCommand struct {
Parent *TemporalCloudCommand
Command cobra.Command
Domain string
Audience string
ClientId string
DisablePopUp bool
NoPersist bool
}
func NewTemporalCloudLoginCommand(cctx *CommandContext, parent *TemporalCloudCommand) *TemporalCloudLoginCommand {
var s TemporalCloudLoginCommand
s.Parent = parent
s.Command.DisableFlagsInUseLine = true
s.Command.Use = "login [flags]"
s.Command.Short = "Login as a cloud user."
if hasHighlighting {
s.Command.Long = "Login as a cloud user. This will open a browser to allow login. The token will then be used for all \x1b[1m--cloud\x1b[0m calls that\ndon't otherwise specify a \x1b[1m--api-key\x1b[0m or \x1b[1m--tls-*\x1b[0m options."
} else {
s.Command.Long = "Login as a cloud user. This will open a browser to allow login. The token will then be used for all `--cloud` calls that\ndon't otherwise specify a `--api-key` or `--tls-*` options."
}
s.Command.Args = cobra.NoArgs
s.Command.Flags().StringVar(&s.Domain, "domain", "", "Domain for login.")
s.Command.Flags().Lookup("domain").Hidden = true
s.Command.Flags().StringVar(&s.Audience, "audience", "", "Audience for login.")
s.Command.Flags().Lookup("audience").Hidden = true
s.Command.Flags().StringVar(&s.ClientId, "client-id", "", "Client ID for login.")
s.Command.Flags().Lookup("client-id").Hidden = true
s.Command.Flags().BoolVar(&s.DisablePopUp, "disable-pop-up", false, "Disable the browser pop-up.")
s.Command.Flags().BoolVar(&s.NoPersist, "no-persist", false, "Show the generated token in output and do not persist to a config.")
s.Command.Run = func(c *cobra.Command, args []string) {
if err := s.run(cctx, args); err != nil {
cctx.Options.Fail(err)
}
}
return &s
}
type TemporalCloudLogoutCommand struct {
Parent *TemporalCloudCommand
Command cobra.Command
Domain string
DisablePopUp bool
}
func NewTemporalCloudLogoutCommand(cctx *CommandContext, parent *TemporalCloudCommand) *TemporalCloudLogoutCommand {
var s TemporalCloudLogoutCommand
s.Parent = parent
s.Command.DisableFlagsInUseLine = true
s.Command.Use = "logout [flags]"
s.Command.Short = "Logout a cloud user."
s.Command.Long = "Logout a cloud user. This will open a browser to allow logout even if a login may not be present."
s.Command.Args = cobra.NoArgs
s.Command.Flags().StringVar(&s.Domain, "domain", "", "Domain for login.")
s.Command.Flags().Lookup("domain").Hidden = true
s.Command.Flags().BoolVar(&s.DisablePopUp, "disable-pop-up", false, "Disable the browser pop-up.")
s.Command.Run = func(c *cobra.Command, args []string) {
if err := s.run(cctx, args); err != nil {
cctx.Options.Fail(err)
}
}
return &s
}
type TemporalEnvCommand struct {
Parent *TemporalCommand
Command cobra.Command
}
func NewTemporalEnvCommand(cctx *CommandContext, parent *TemporalCommand) *TemporalEnvCommand {
var s TemporalEnvCommand
s.Parent = parent
s.Command.Use = "env"
s.Command.Short = "Manage environments."
s.Command.Long = "Use the '--env <env name>' option with other commands to point the CLI at a different Temporal Server instance. If --env\nis not passed, the 'default' environment is used."
s.Command.Args = cobra.NoArgs
s.Command.AddCommand(&NewTemporalEnvDeleteCommand(cctx, &s).Command)
s.Command.AddCommand(&NewTemporalEnvGetCommand(cctx, &s).Command)
s.Command.AddCommand(&NewTemporalEnvListCommand(cctx, &s).Command)
s.Command.AddCommand(&NewTemporalEnvSetCommand(cctx, &s).Command)
return &s
}
type TemporalEnvDeleteCommand struct {
Parent *TemporalEnvCommand
Command cobra.Command
}
func NewTemporalEnvDeleteCommand(cctx *CommandContext, parent *TemporalEnvCommand) *TemporalEnvDeleteCommand {
var s TemporalEnvDeleteCommand
s.Parent = parent
s.Command.DisableFlagsInUseLine = true
s.Command.Use = "delete [flags] [environment or property]"
s.Command.Short = "Delete an environment or environment property."
if hasHighlighting {
s.Command.Long = "\x1b[1mtemporal env delete [environment or property]\x1b[0m\n\nDelete an environment or just a single property:\n\n\x1b[1mtemporal env delete prod\x1b[0m\n\x1b[1mtemporal env delete prod.tls-cert-path\x1b[0m"
} else {
s.Command.Long = "`temporal env delete [environment or property]`\n\nDelete an environment or just a single property:\n\n`temporal env delete prod`\n`temporal env delete prod.tls-cert-path`"
}
s.Command.Args = cobra.ExactArgs(1)
s.Command.Run = func(c *cobra.Command, args []string) {
if err := s.run(cctx, args); err != nil {
cctx.Options.Fail(err)
}
}
return &s
}
type TemporalEnvGetCommand struct {
Parent *TemporalEnvCommand
Command cobra.Command
}
func NewTemporalEnvGetCommand(cctx *CommandContext, parent *TemporalEnvCommand) *TemporalEnvGetCommand {
var s TemporalEnvGetCommand
s.Parent = parent
s.Command.DisableFlagsInUseLine = true
s.Command.Use = "get [flags] [environment or property]"
s.Command.Short = "Print environment properties."
if hasHighlighting {
s.Command.Long = "\x1b[1mtemporal env get [environment or property]\x1b[0m\n\nPrint all properties of the 'prod' environment:\n\n\x1b[1mtemporal env get prod\x1b[0m\n\ntls-cert-path /home/my-user/certs/client.cert\ntls-key-path /home/my-user/certs/client.key\naddress temporal.example.com:7233\nnamespace someNamespace\n\nPrint a single property:\n\n\x1b[1mtemporal env get prod.tls-key-path\x1b[0m\n\ntls-key-path /home/my-user/certs/cluster.key"
} else {
s.Command.Long = "`temporal env get [environment or property]`\n\nPrint all properties of the 'prod' environment:\n\n`temporal env get prod`\n\ntls-cert-path /home/my-user/certs/client.cert\ntls-key-path /home/my-user/certs/client.key\naddress temporal.example.com:7233\nnamespace someNamespace\n\nPrint a single property:\n\n`temporal env get prod.tls-key-path`\n\ntls-key-path /home/my-user/certs/cluster.key"
}
s.Command.Args = cobra.ExactArgs(1)
s.Command.Run = func(c *cobra.Command, args []string) {
if err := s.run(cctx, args); err != nil {
cctx.Options.Fail(err)
}
}
return &s
}
type TemporalEnvListCommand struct {
Parent *TemporalEnvCommand
Command cobra.Command
}
func NewTemporalEnvListCommand(cctx *CommandContext, parent *TemporalEnvCommand) *TemporalEnvListCommand {
var s TemporalEnvListCommand
s.Parent = parent
s.Command.DisableFlagsInUseLine = true
s.Command.Use = "list [flags]"
s.Command.Short = "Print all environments."
s.Command.Long = "List all environments."
s.Command.Args = cobra.NoArgs
s.Command.Run = func(c *cobra.Command, args []string) {
if err := s.run(cctx, args); err != nil {
cctx.Options.Fail(err)
}
}
return &s
}
type TemporalEnvSetCommand struct {
Parent *TemporalEnvCommand
Command cobra.Command
}
func NewTemporalEnvSetCommand(cctx *CommandContext, parent *TemporalEnvCommand) *TemporalEnvSetCommand {
var s TemporalEnvSetCommand
s.Parent = parent
s.Command.DisableFlagsInUseLine = true
s.Command.Use = "set [flags] [environment.property name] [property value]"
s.Command.Short = "Set environment properties."
if hasHighlighting {
s.Command.Long = "\x1b[1mtemporal env set [environment.property name] [property value]\x1b[0m\n\nProperty names match CLI option names, for example '--address' and '--tls-cert-path':\n\n\x1b[1mtemporal env set prod.address 127.0.0.1:7233\x1b[0m\n\x1b[1mtemporal env set prod.tls-cert-path /home/my-user/certs/cluster.cert\x1b[0m"
} else {
s.Command.Long = "`temporal env set [environment.property name] [property value]`\n\nProperty names match CLI option names, for example '--address' and '--tls-cert-path':\n\n`temporal env set prod.address 127.0.0.1:7233`\n`temporal env set prod.tls-cert-path /home/my-user/certs/cluster.cert`"
}
s.Command.Args = cobra.ExactArgs(2)
s.Command.Run = func(c *cobra.Command, args []string) {
if err := s.run(cctx, args); err != nil {
cctx.Options.Fail(err)
}
}
return &s
}
type TemporalOperatorCommand struct {
Parent *TemporalCommand
Command cobra.Command
ClientOptions
}
func NewTemporalOperatorCommand(cctx *CommandContext, parent *TemporalCommand) *TemporalOperatorCommand {
var s TemporalOperatorCommand
s.Parent = parent
s.Command.Use = "operator"
s.Command.Short = "Manage a Temporal deployment."
if hasHighlighting {
s.Command.Long = "Operator commands enable actions on Namespaces, Search Attributes, and Temporal Clusters. These actions are performed through subcommands.\n\nTo run an Operator command, \x1b[1mrun temporal operator [command] [subcommand] [command options]\x1b[0m"
} else {
s.Command.Long = "Operator commands enable actions on Namespaces, Search Attributes, and Temporal Clusters. These actions are performed through subcommands.\n\nTo run an Operator command, `run temporal operator [command] [subcommand] [command options]`"
}
s.Command.Args = cobra.NoArgs
s.Command.AddCommand(&NewTemporalOperatorClusterCommand(cctx, &s).Command)
s.Command.AddCommand(&NewTemporalOperatorNamespaceCommand(cctx, &s).Command)
s.Command.AddCommand(&NewTemporalOperatorSearchAttributeCommand(cctx, &s).Command)
s.ClientOptions.buildFlags(cctx, s.Command.PersistentFlags())
return &s
}
type TemporalOperatorClusterCommand struct {
Parent *TemporalOperatorCommand
Command cobra.Command
}
func NewTemporalOperatorClusterCommand(cctx *CommandContext, parent *TemporalOperatorCommand) *TemporalOperatorClusterCommand {
var s TemporalOperatorClusterCommand
s.Parent = parent
s.Command.Use = "cluster"
s.Command.Short = "Operations for running a Temporal Cluster."
if hasHighlighting {
s.Command.Long = "Cluster commands enable actions on Temporal Clusters.\n\nCluster commands follow this syntax: \x1b[1mtemporal operator cluster [command] [command options]\x1b[0m"
} else {
s.Command.Long = "Cluster commands enable actions on Temporal Clusters.\n\nCluster commands follow this syntax: `temporal operator cluster [command] [command options]`"
}
s.Command.Args = cobra.NoArgs
s.Command.AddCommand(&NewTemporalOperatorClusterDescribeCommand(cctx, &s).Command)
s.Command.AddCommand(&NewTemporalOperatorClusterHealthCommand(cctx, &s).Command)
s.Command.AddCommand(&NewTemporalOperatorClusterListCommand(cctx, &s).Command)
s.Command.AddCommand(&NewTemporalOperatorClusterRemoveCommand(cctx, &s).Command)
s.Command.AddCommand(&NewTemporalOperatorClusterSystemCommand(cctx, &s).Command)
s.Command.AddCommand(&NewTemporalOperatorClusterUpsertCommand(cctx, &s).Command)
return &s
}
type TemporalOperatorClusterDescribeCommand struct {
Parent *TemporalOperatorClusterCommand
Command cobra.Command
Detail bool
}
func NewTemporalOperatorClusterDescribeCommand(cctx *CommandContext, parent *TemporalOperatorClusterCommand) *TemporalOperatorClusterDescribeCommand {
var s TemporalOperatorClusterDescribeCommand
s.Parent = parent
s.Command.DisableFlagsInUseLine = true
s.Command.Use = "describe [flags]"
s.Command.Short = "Describe a cluster"
if hasHighlighting {
s.Command.Long = "\x1b[1mtemporal operator cluster describe\x1b[0m command shows information about the Cluster."
} else {
s.Command.Long = "`temporal operator cluster describe` command shows information about the Cluster."
}
s.Command.Args = cobra.NoArgs
s.Command.Flags().BoolVar(&s.Detail, "detail", false, "Prints extra details.")
s.Command.Run = func(c *cobra.Command, args []string) {
if err := s.run(cctx, args); err != nil {
cctx.Options.Fail(err)
}
}
return &s
}
type TemporalOperatorClusterHealthCommand struct {
Parent *TemporalOperatorClusterCommand
Command cobra.Command
}
func NewTemporalOperatorClusterHealthCommand(cctx *CommandContext, parent *TemporalOperatorClusterCommand) *TemporalOperatorClusterHealthCommand {
var s TemporalOperatorClusterHealthCommand
s.Parent = parent
s.Command.DisableFlagsInUseLine = true
s.Command.Use = "health [flags]"
s.Command.Short = "Checks the health of a cluster"
if hasHighlighting {
s.Command.Long = "\x1b[1mtemporal operator cluster health\x1b[0m command checks the health of the Frontend Service."
} else {
s.Command.Long = "`temporal operator cluster health` command checks the health of the Frontend Service."
}
s.Command.Args = cobra.NoArgs
s.Command.Run = func(c *cobra.Command, args []string) {
if err := s.run(cctx, args); err != nil {
cctx.Options.Fail(err)
}
}
return &s
}
type TemporalOperatorClusterListCommand struct {
Parent *TemporalOperatorClusterCommand
Command cobra.Command
Limit int
}
func NewTemporalOperatorClusterListCommand(cctx *CommandContext, parent *TemporalOperatorClusterCommand) *TemporalOperatorClusterListCommand {
var s TemporalOperatorClusterListCommand
s.Parent = parent
s.Command.DisableFlagsInUseLine = true
s.Command.Use = "list [flags]"
s.Command.Short = "List all clusters"
if hasHighlighting {
s.Command.Long = "\x1b[1mtemporal operator cluster list\x1b[0m command prints a list of all remote Clusters on the system."
} else {
s.Command.Long = "`temporal operator cluster list` command prints a list of all remote Clusters on the system."
}
s.Command.Args = cobra.NoArgs
s.Command.Flags().IntVar(&s.Limit, "limit", 0, "Limit the number of items to print.")
s.Command.Run = func(c *cobra.Command, args []string) {
if err := s.run(cctx, args); err != nil {
cctx.Options.Fail(err)
}
}
return &s
}
type TemporalOperatorClusterRemoveCommand struct {
Parent *TemporalOperatorClusterCommand
Command cobra.Command
Name string
}
func NewTemporalOperatorClusterRemoveCommand(cctx *CommandContext, parent *TemporalOperatorClusterCommand) *TemporalOperatorClusterRemoveCommand {
var s TemporalOperatorClusterRemoveCommand
s.Parent = parent
s.Command.DisableFlagsInUseLine = true
s.Command.Use = "remove [flags]"
s.Command.Short = "Remove a cluster"
if hasHighlighting {
s.Command.Long = "\x1b[1mtemporal operator cluster remove\x1b[0m command removes a remote Cluster from the system."
} else {
s.Command.Long = "`temporal operator cluster remove` command removes a remote Cluster from the system."
}
s.Command.Args = cobra.NoArgs
s.Command.Flags().StringVar(&s.Name, "name", "", "Name of cluster.")
_ = cobra.MarkFlagRequired(s.Command.Flags(), "name")
s.Command.Run = func(c *cobra.Command, args []string) {
if err := s.run(cctx, args); err != nil {
cctx.Options.Fail(err)
}
}
return &s
}
type TemporalOperatorClusterSystemCommand struct {
Parent *TemporalOperatorClusterCommand
Command cobra.Command
}
func NewTemporalOperatorClusterSystemCommand(cctx *CommandContext, parent *TemporalOperatorClusterCommand) *TemporalOperatorClusterSystemCommand {
var s TemporalOperatorClusterSystemCommand
s.Parent = parent
s.Command.DisableFlagsInUseLine = true
s.Command.Use = "system [flags]"
s.Command.Short = "Provide system info"
if hasHighlighting {
s.Command.Long = "\x1b[1mtemporal operator cluster system\x1b[0m command provides information about the system the Cluster is running on. This information can be used to diagnose problems occurring in the Temporal Server."
} else {
s.Command.Long = "`temporal operator cluster system` command provides information about the system the Cluster is running on. This information can be used to diagnose problems occurring in the Temporal Server."
}
s.Command.Args = cobra.NoArgs
s.Command.Run = func(c *cobra.Command, args []string) {
if err := s.run(cctx, args); err != nil {
cctx.Options.Fail(err)
}
}
return &s
}
type TemporalOperatorClusterUpsertCommand struct {
Parent *TemporalOperatorClusterCommand
Command cobra.Command
FrontendAddress string
EnableConnection bool
}
func NewTemporalOperatorClusterUpsertCommand(cctx *CommandContext, parent *TemporalOperatorClusterCommand) *TemporalOperatorClusterUpsertCommand {
var s TemporalOperatorClusterUpsertCommand
s.Parent = parent
s.Command.DisableFlagsInUseLine = true
s.Command.Use = "upsert [flags]"
s.Command.Short = "Add a remote"
if hasHighlighting {
s.Command.Long = "\x1b[1mtemporal operator cluster upsert\x1b[0m command allows the user to add or update a remote Cluster."
} else {
s.Command.Long = "`temporal operator cluster upsert` command allows the user to add or update a remote Cluster."
}
s.Command.Args = cobra.NoArgs
s.Command.Flags().StringVar(&s.FrontendAddress, "frontend-address", "", "IP address to bind the frontend service to.")
_ = cobra.MarkFlagRequired(s.Command.Flags(), "frontend-address")
s.Command.Flags().BoolVar(&s.EnableConnection, "enable-connection", false, "enable cross cluster connection.")
s.Command.Run = func(c *cobra.Command, args []string) {
if err := s.run(cctx, args); err != nil {
cctx.Options.Fail(err)
}
}
return &s
}
type TemporalOperatorNamespaceCommand struct {
Parent *TemporalOperatorCommand
Command cobra.Command
}
func NewTemporalOperatorNamespaceCommand(cctx *CommandContext, parent *TemporalOperatorCommand) *TemporalOperatorNamespaceCommand {
var s TemporalOperatorNamespaceCommand
s.Parent = parent
s.Command.Use = "namespace"
s.Command.Short = "Operations performed on Namespaces."
if hasHighlighting {
s.Command.Long = "Namespace commands perform operations on Namespaces contained in the Temporal Cluster.\n\nCluster commands follow this syntax: \x1b[1mtemporal operator namespace [command] [command options]\x1b[0m"
} else {
s.Command.Long = "Namespace commands perform operations on Namespaces contained in the Temporal Cluster.\n\nCluster commands follow this syntax: `temporal operator namespace [command] [command options]`"
}
s.Command.Args = cobra.NoArgs
s.Command.AddCommand(&NewTemporalOperatorNamespaceCreateCommand(cctx, &s).Command)
s.Command.AddCommand(&NewTemporalOperatorNamespaceDeleteCommand(cctx, &s).Command)
s.Command.AddCommand(&NewTemporalOperatorNamespaceDescribeCommand(cctx, &s).Command)
s.Command.AddCommand(&NewTemporalOperatorNamespaceListCommand(cctx, &s).Command)
s.Command.AddCommand(&NewTemporalOperatorNamespaceUpdateCommand(cctx, &s).Command)
return &s
}
type TemporalOperatorNamespaceCreateCommand struct {
Parent *TemporalOperatorNamespaceCommand
Command cobra.Command
ActiveCluster string
Cluster []string
Data string
Description string
Email string
Global bool
HistoryArchivalState StringEnum
HistoryUri string
Retention time.Duration
VisibilityArchivalState StringEnum
VisibilityUri string
}
func NewTemporalOperatorNamespaceCreateCommand(cctx *CommandContext, parent *TemporalOperatorNamespaceCommand) *TemporalOperatorNamespaceCreateCommand {
var s TemporalOperatorNamespaceCreateCommand
s.Parent = parent
s.Command.DisableFlagsInUseLine = true
s.Command.Use = "create [flags] [namespace]"
s.Command.Short = "Registers a new Namespace."
if hasHighlighting {
s.Command.Long = "The temporal operator namespace create command creates a new Namespace on the Server.\nNamespaces can be created on the active Cluster, or any named Cluster.\n\x1b[1mtemporal operator namespace create --cluster=MyCluster example-1\x1b[0m\n\nGlobal Namespaces can also be created.\n\x1b[1mtemporal operator namespace create --global example-2\x1b[0m\n\nOther settings, such as retention and Visibility Archival State, can be configured as needed.\nFor example, the Visibility Archive can be set on a separate URI.\n\x1b[1mtemporal operator namespace create --retention=5 --visibility-archival-state=enabled --visibility-uri=some-uri example-3\x1b[0m"
} else {
s.Command.Long = "The temporal operator namespace create command creates a new Namespace on the Server.\nNamespaces can be created on the active Cluster, or any named Cluster.\n`temporal operator namespace create --cluster=MyCluster example-1`\n\nGlobal Namespaces can also be created.\n`temporal operator namespace create --global example-2`\n\nOther settings, such as retention and Visibility Archival State, can be configured as needed.\nFor example, the Visibility Archive can be set on a separate URI.\n`temporal operator namespace create --retention=5 --visibility-archival-state=enabled --visibility-uri=some-uri example-3`"
}
s.Command.Args = cobra.ExactArgs(1)
s.Command.Flags().StringVar(&s.ActiveCluster, "active-cluster", "", "Active cluster name.")
s.Command.Flags().StringArrayVar(&s.Cluster, "cluster", nil, "Cluster names.")
s.Command.Flags().StringVar(&s.Data, "data", "", "Namespace data in key=value format. Use JSON for values.")
s.Command.Flags().StringVar(&s.Description, "description", "", "Namespace description.")
s.Command.Flags().StringVar(&s.Email, "email", "", "Owner email.")
s.Command.Flags().BoolVar(&s.Global, "global", false, "Whether the namespace is a global namespace.")
s.HistoryArchivalState = NewStringEnum([]string{"disabled", "enabled"}, "disabled")
s.Command.Flags().Var(&s.HistoryArchivalState, "history-archival-state", "History archival state. Accepted values: disabled, enabled.")
s.Command.Flags().StringVar(&s.HistoryUri, "history-uri", "", "Optionally specify history archival URI (cannot be changed after first time archival is enabled).")
s.Command.Flags().DurationVar(&s.Retention, "retention", 259200000*time.Millisecond, "Length of time a closed Workflow is preserved before deletion.")
s.VisibilityArchivalState = NewStringEnum([]string{"disabled", "enabled"}, "disabled")
s.Command.Flags().Var(&s.VisibilityArchivalState, "visibility-archival-state", "Visibility archival state. Accepted values: disabled, enabled.")
s.Command.Flags().StringVar(&s.VisibilityUri, "visibility-uri", "", "Optionally specify visibility archival URI (cannot be changed after first time archival is enabled).")
s.Command.Run = func(c *cobra.Command, args []string) {
if err := s.run(cctx, args); err != nil {
cctx.Options.Fail(err)
}
}
return &s
}
type TemporalOperatorNamespaceDeleteCommand struct {
Parent *TemporalOperatorNamespaceCommand
Command cobra.Command
Yes bool
}
func NewTemporalOperatorNamespaceDeleteCommand(cctx *CommandContext, parent *TemporalOperatorNamespaceCommand) *TemporalOperatorNamespaceDeleteCommand {
var s TemporalOperatorNamespaceDeleteCommand
s.Parent = parent
s.Command.DisableFlagsInUseLine = true
s.Command.Use = "delete [flags] [namespace]"
s.Command.Short = "Deletes an existing Namespace."
s.Command.Long = "The temporal operator namespace delete command deletes a given Namespace from the system."
s.Command.Args = cobra.ExactArgs(1)
s.Command.Flags().BoolVarP(&s.Yes, "yes", "y", false, "Confirm prompt to perform deletion.")
s.Command.Run = func(c *cobra.Command, args []string) {
if err := s.run(cctx, args); err != nil {
cctx.Options.Fail(err)
}
}
return &s
}
type TemporalOperatorNamespaceDescribeCommand struct {
Parent *TemporalOperatorNamespaceCommand
Command cobra.Command
NamespaceId string
}
func NewTemporalOperatorNamespaceDescribeCommand(cctx *CommandContext, parent *TemporalOperatorNamespaceCommand) *TemporalOperatorNamespaceDescribeCommand {
var s TemporalOperatorNamespaceDescribeCommand
s.Parent = parent
s.Command.DisableFlagsInUseLine = true
s.Command.Use = "describe [flags] [namespace]"
s.Command.Short = "Describe a Namespace by its name or ID."
if hasHighlighting {
s.Command.Long = "The temporal operator namespace describe command provides Namespace information.\nNamespaces are identified by Namespace ID.\n\n\x1b[1mtemporal operator namespace describe --namespace-id=some-namespace-id\x1b[0m\n\x1b[1mtemporal operator namespace describe example-namespace-name\x1b[0m"
} else {
s.Command.Long = "The temporal operator namespace describe command provides Namespace information.\nNamespaces are identified by Namespace ID.\n\n`temporal operator namespace describe --namespace-id=some-namespace-id`\n`temporal operator namespace describe example-namespace-name`"
}
s.Command.Args = cobra.MaximumNArgs(1)
s.Command.Flags().StringVar(&s.NamespaceId, "namespace-id", "", "Namespace ID.")
s.Command.Run = func(c *cobra.Command, args []string) {
if err := s.run(cctx, args); err != nil {
cctx.Options.Fail(err)
}
}
return &s
}
type TemporalOperatorNamespaceListCommand struct {
Parent *TemporalOperatorNamespaceCommand
Command cobra.Command
}
func NewTemporalOperatorNamespaceListCommand(cctx *CommandContext, parent *TemporalOperatorNamespaceCommand) *TemporalOperatorNamespaceListCommand {
var s TemporalOperatorNamespaceListCommand
s.Parent = parent
s.Command.DisableFlagsInUseLine = true
s.Command.Use = "list [flags]"
s.Command.Short = "List all Namespaces."
s.Command.Long = "The temporal operator namespace list command lists all Namespaces on the Server."
s.Command.Args = cobra.NoArgs
s.Command.Run = func(c *cobra.Command, args []string) {
if err := s.run(cctx, args); err != nil {
cctx.Options.Fail(err)
}
}
return &s
}
type TemporalOperatorNamespaceUpdateCommand struct {
Parent *TemporalOperatorNamespaceCommand
Command cobra.Command
ActiveCluster string
Cluster []string
Data []string
Description string
Email string
PromoteGlobal bool
HistoryArchivalState StringEnum
HistoryUri string
Retention time.Duration
VisibilityArchivalState StringEnum
VisibilityUri string
}
func NewTemporalOperatorNamespaceUpdateCommand(cctx *CommandContext, parent *TemporalOperatorNamespaceCommand) *TemporalOperatorNamespaceUpdateCommand {
var s TemporalOperatorNamespaceUpdateCommand
s.Parent = parent
s.Command.DisableFlagsInUseLine = true
s.Command.Use = "update [flags] [namespace]"
s.Command.Short = "Updates a Namespace."
if hasHighlighting {
s.Command.Long = "The temporal operator namespace update command updates a Namespace.\n\nNamespaces can be assigned a different active Cluster.\n\x1b[1mtemporal operator namespace update --active-cluster=NewActiveCluster\x1b[0m\n\nNamespaces can also be promoted to global Namespaces.\n\x1b[1mtemporal operator namespace update --promote-global\x1b[0m\n\nAny Archives that were previously enabled or disabled can be changed through this command.\nHowever, URI values for archival states cannot be changed after the states are enabled.\n\x1b[1mtemporal operator namespace update --history-archival-state=enabled --visibility-archival-state=disabled\x1b[0m"
} else {
s.Command.Long = "The temporal operator namespace update command updates a Namespace.\n\nNamespaces can be assigned a different active Cluster.\n`temporal operator namespace update --active-cluster=NewActiveCluster`\n\nNamespaces can also be promoted to global Namespaces.\n`temporal operator namespace update --promote-global`\n\nAny Archives that were previously enabled or disabled can be changed through this command.\nHowever, URI values for archival states cannot be changed after the states are enabled.\n`temporal operator namespace update --history-archival-state=enabled --visibility-archival-state=disabled`"
}
s.Command.Args = cobra.ExactArgs(1)
s.Command.Flags().StringVar(&s.ActiveCluster, "active-cluster", "", "Active cluster name.")
s.Command.Flags().StringArrayVar(&s.Cluster, "cluster", nil, "Cluster names.")
s.Command.Flags().StringArrayVar(&s.Data, "data", nil, "Namespace data in key=value format. Use JSON for values.")
s.Command.Flags().StringVar(&s.Description, "description", "", "Namespace description.")
s.Command.Flags().StringVar(&s.Email, "email", "", "Owner email.")
s.Command.Flags().BoolVar(&s.PromoteGlobal, "promote-global", false, "Promote local namespace to global namespace.")
s.HistoryArchivalState = NewStringEnum([]string{"disabled", "enabled"}, "")
s.Command.Flags().Var(&s.HistoryArchivalState, "history-archival-state", "History archival state. Accepted values: disabled, enabled.")
s.Command.Flags().StringVar(&s.HistoryUri, "history-uri", "", "Optionally specify history archival URI (cannot be changed after first time archival is enabled).")
s.Command.Flags().DurationVar(&s.Retention, "retention", 0, "Length of time a closed Workflow is preserved before deletion.")
s.VisibilityArchivalState = NewStringEnum([]string{"disabled", "enabled"}, "")
s.Command.Flags().Var(&s.VisibilityArchivalState, "visibility-archival-state", "Visibility archival state. Accepted values: disabled, enabled.")
s.Command.Flags().StringVar(&s.VisibilityUri, "visibility-uri", "", "Optionally specify visibility archival URI (cannot be changed after first time archival is enabled).")
s.Command.Run = func(c *cobra.Command, args []string) {
if err := s.run(cctx, args); err != nil {
cctx.Options.Fail(err)
}
}
return &s
}
type TemporalOperatorSearchAttributeCommand struct {
Parent *TemporalOperatorCommand
Command cobra.Command
}
func NewTemporalOperatorSearchAttributeCommand(cctx *CommandContext, parent *TemporalOperatorCommand) *TemporalOperatorSearchAttributeCommand {
var s TemporalOperatorSearchAttributeCommand
s.Parent = parent
s.Command.Use = "search-attribute"
s.Command.Short = "Operations applying to Search Attributes"
s.Command.Long = "Search Attribute commands enable operations for the creation, listing, and removal of Search Attributes."
s.Command.Args = cobra.NoArgs
s.Command.AddCommand(&NewTemporalOperatorSearchAttributeCreateCommand(cctx, &s).Command)
s.Command.AddCommand(&NewTemporalOperatorSearchAttributeListCommand(cctx, &s).Command)
s.Command.AddCommand(&NewTemporalOperatorSearchAttributeRemoveCommand(cctx, &s).Command)
return &s
}
type TemporalOperatorSearchAttributeCreateCommand struct {
Parent *TemporalOperatorSearchAttributeCommand
Command cobra.Command
Name []string
Type []string
}
func NewTemporalOperatorSearchAttributeCreateCommand(cctx *CommandContext, parent *TemporalOperatorSearchAttributeCommand) *TemporalOperatorSearchAttributeCreateCommand {
var s TemporalOperatorSearchAttributeCreateCommand
s.Parent = parent
s.Command.DisableFlagsInUseLine = true
s.Command.Use = "create [flags]"
s.Command.Short = "Adds one or more custom Search Attributes"
if hasHighlighting {
s.Command.Long = "\x1b[1mtemporal operator search-attribute create\x1b[0m command adds one or more custom Search Attributes."
} else {
s.Command.Long = "`temporal operator search-attribute create` command adds one or more custom Search Attributes."
}
s.Command.Args = cobra.NoArgs
s.Command.Flags().StringArrayVar(&s.Name, "name", nil, "Search Attribute name.")
_ = cobra.MarkFlagRequired(s.Command.Flags(), "name")
s.Command.Flags().StringArrayVar(&s.Type, "type", nil, "Search Attribute type. Accepted values: Text, Keyword, Int, Double, Bool, Datetime, KeywordList.")
_ = cobra.MarkFlagRequired(s.Command.Flags(), "type")
s.Command.Run = func(c *cobra.Command, args []string) {
if err := s.run(cctx, args); err != nil {
cctx.Options.Fail(err)
}
}
return &s
}
type TemporalOperatorSearchAttributeListCommand struct {
Parent *TemporalOperatorSearchAttributeCommand
Command cobra.Command
}
func NewTemporalOperatorSearchAttributeListCommand(cctx *CommandContext, parent *TemporalOperatorSearchAttributeCommand) *TemporalOperatorSearchAttributeListCommand {
var s TemporalOperatorSearchAttributeListCommand
s.Parent = parent
s.Command.DisableFlagsInUseLine = true
s.Command.Use = "list [flags]"
s.Command.Short = "Lists all Search Attributes that can be used in list Workflow Queries"
if hasHighlighting {
s.Command.Long = "\x1b[1mtemporal operator search-attribute list\x1b[0m displays a list of all Search Attributes."
} else {
s.Command.Long = "`temporal operator search-attribute list` displays a list of all Search Attributes."
}
s.Command.Args = cobra.NoArgs
s.Command.Run = func(c *cobra.Command, args []string) {
if err := s.run(cctx, args); err != nil {
cctx.Options.Fail(err)
}
}
return &s
}
type TemporalOperatorSearchAttributeRemoveCommand struct {
Parent *TemporalOperatorSearchAttributeCommand
Command cobra.Command
Name []string
Yes bool
}
func NewTemporalOperatorSearchAttributeRemoveCommand(cctx *CommandContext, parent *TemporalOperatorSearchAttributeCommand) *TemporalOperatorSearchAttributeRemoveCommand {
var s TemporalOperatorSearchAttributeRemoveCommand
s.Parent = parent
s.Command.DisableFlagsInUseLine = true
s.Command.Use = "remove [flags]"
s.Command.Short = "Removes custom search attribute metadata only"
if hasHighlighting {
s.Command.Long = "\x1b[1mtemporal operator search-attribute remove\x1b[0m command removes custom Search Attribute metadata."
} else {
s.Command.Long = "`temporal operator search-attribute remove` command removes custom Search Attribute metadata."
}
s.Command.Args = cobra.NoArgs
s.Command.Flags().StringArrayVar(&s.Name, "name", nil, "Search Attribute name.")
_ = cobra.MarkFlagRequired(s.Command.Flags(), "name")
s.Command.Flags().BoolVarP(&s.Yes, "yes", "y", false, "Confirm prompt to perform deletion.")
s.Command.Run = func(c *cobra.Command, args []string) {
if err := s.run(cctx, args); err != nil {
cctx.Options.Fail(err)
}
}
return &s
}
type TemporalServerCommand struct {
Parent *TemporalCommand
Command cobra.Command
}
func NewTemporalServerCommand(cctx *CommandContext, parent *TemporalCommand) *TemporalServerCommand {
var s TemporalServerCommand
s.Parent = parent
s.Command.Use = "server"
s.Command.Short = "Run Temporal Server."
if hasHighlighting {
s.Command.Long = "Start a development version of Temporal Server:\n\n\x1b[1mtemporal server start-dev\x1b[0m"
} else {
s.Command.Long = "Start a development version of Temporal Server:\n\n`temporal server start-dev`"
}
s.Command.Args = cobra.NoArgs
s.Command.AddCommand(&NewTemporalServerStartDevCommand(cctx, &s).Command)
return &s
}
type TemporalServerStartDevCommand struct {
Parent *TemporalServerCommand
Command cobra.Command
DbFilename string
Namespace []string
Port int
HttpPort int
MetricsPort int
UiPort int
Headless bool
Ip string
UiIp string
UiAssetPath string
UiCodecEndpoint string
SqlitePragma []string
DynamicConfigValue []string
LogConfig bool
LogLevelServer StringEnum