-
Notifications
You must be signed in to change notification settings - Fork 0
/
uggly.pb.go
2218 lines (1974 loc) · 73.1 KB
/
uggly.pb.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 protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.19.4
// source: uggly.proto
package uggly
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type Cookie_SameSite int32
const (
Cookie_STRICT Cookie_SameSite = 0 // cookie only sent to same site that set it
Cookie_NONE Cookie_SameSite = 1 // cookie can be sent cross site but only if Secure is set
)
// Enum value maps for Cookie_SameSite.
var (
Cookie_SameSite_name = map[int32]string{
0: "STRICT",
1: "NONE",
}
Cookie_SameSite_value = map[string]int32{
"STRICT": 0,
"NONE": 1,
}
)
func (x Cookie_SameSite) Enum() *Cookie_SameSite {
p := new(Cookie_SameSite)
*p = x
return p
}
func (x Cookie_SameSite) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Cookie_SameSite) Descriptor() protoreflect.EnumDescriptor {
return file_uggly_proto_enumTypes[0].Descriptor()
}
func (Cookie_SameSite) Type() protoreflect.EnumType {
return &file_uggly_proto_enumTypes[0]
}
func (x Cookie_SameSite) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Cookie_SameSite.Descriptor instead.
func (Cookie_SameSite) EnumDescriptor() ([]byte, []int) {
return file_uggly_proto_rawDescGZIP(), []int{15, 0}
}
// DivBox is a core element of the protocol. No content can exist
//outside of a DivBox. It requires that some basic properties are included
//such as fill and border geometry but the rawContents property is open
//to fill with whatever content is desired.
type DivBox struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,9,opt,name=name,proto3" json:"name,omitempty"` // the name of the divBox. Used when attaching TextBlobs and forms
Border bool `protobuf:"varint,10,opt,name=border,proto3" json:"border,omitempty"` // whether the div should add a border
// the width of the border, will stay inside the stated overall dimensions
// and work its way inward
BorderW int32 `protobuf:"varint,11,opt,name=borderW,proto3" json:"borderW,omitempty"`
// The character to use as a border character (e.g., "#") but represented as rune
// For example, in Python this would be 'ord("#")' and Go it would be
// []rune("#")[0]
BorderChar int32 `protobuf:"varint,12,opt,name=borderChar,proto3" json:"borderChar,omitempty"`
// if the DivBox should be filled with a char as a texture. Follows same
// rune rules as borderChar.
FillChar int32 `protobuf:"varint,14,opt,name=fillChar,proto3" json:"fillChar,omitempty"`
StartX int32 `protobuf:"varint,15,opt,name=startX,proto3" json:"startX,omitempty"` // position on the X axis where the box should start
StartY int32 `protobuf:"varint,16,opt,name=startY,proto3" json:"startY,omitempty"` // position on the Y axis where the box should start
Width int32 `protobuf:"varint,17,opt,name=width,proto3" json:"width,omitempty"` // overall width of the box
Height int32 `protobuf:"varint,18,opt,name=Height,proto3" json:"Height,omitempty"` // overall height of the box
BorderSt *Style `protobuf:"bytes,20,opt,name=borderSt,proto3" json:"borderSt,omitempty"` // style to use when rendering border char
FillSt *Style `protobuf:"bytes,21,opt,name=fillSt,proto3" json:"fillSt,omitempty"` // style to use when rendering fill char
}
func (x *DivBox) Reset() {
*x = DivBox{}
if protoimpl.UnsafeEnabled {
mi := &file_uggly_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DivBox) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DivBox) ProtoMessage() {}
func (x *DivBox) ProtoReflect() protoreflect.Message {
mi := &file_uggly_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DivBox.ProtoReflect.Descriptor instead.
func (*DivBox) Descriptor() ([]byte, []int) {
return file_uggly_proto_rawDescGZIP(), []int{0}
}
func (x *DivBox) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *DivBox) GetBorder() bool {
if x != nil {
return x.Border
}
return false
}
func (x *DivBox) GetBorderW() int32 {
if x != nil {
return x.BorderW
}
return 0
}
func (x *DivBox) GetBorderChar() int32 {
if x != nil {
return x.BorderChar
}
return 0
}
func (x *DivBox) GetFillChar() int32 {
if x != nil {
return x.FillChar
}
return 0
}
func (x *DivBox) GetStartX() int32 {
if x != nil {
return x.StartX
}
return 0
}
func (x *DivBox) GetStartY() int32 {
if x != nil {
return x.StartY
}
return 0
}
func (x *DivBox) GetWidth() int32 {
if x != nil {
return x.Width
}
return 0
}
func (x *DivBox) GetHeight() int32 {
if x != nil {
return x.Height
}
return 0
}
func (x *DivBox) GetBorderSt() *Style {
if x != nil {
return x.BorderSt
}
return nil
}
func (x *DivBox) GetFillSt() *Style {
if x != nil {
return x.FillSt
}
return nil
}
// TextBlob is a special kind of element that natively understands
//text blocks intended for human readability. Obviously it has a content
//property but also understands things like text style and text wrap when
//the text is larger than the width of the container it was assigned to.
//
//A TextBlob can be assigned to multiple Divs in case you wanted to re-use
//text in multiple places for some reason.
type TextBlob struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The actual content. Could be almost any length but be aware
// of the size of the containing div.
Content string `protobuf:"bytes,10,opt,name=content,proto3" json:"content,omitempty"`
Wrap bool `protobuf:"varint,11,opt,name=wrap,proto3" json:"wrap,omitempty"` // whether or not the text should wrap if it exceeds the width of it's divbox
Style *Style `protobuf:"bytes,12,opt,name=style,proto3" json:"style,omitempty"`
DivNames []string `protobuf:"bytes,15,rep,name=divNames,proto3" json:"divNames,omitempty"` // the divs this text should be attached to. Generally it's just one.
}
func (x *TextBlob) Reset() {
*x = TextBlob{}
if protoimpl.UnsafeEnabled {
mi := &file_uggly_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TextBlob) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TextBlob) ProtoMessage() {}
func (x *TextBlob) ProtoReflect() protoreflect.Message {
mi := &file_uggly_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TextBlob.ProtoReflect.Descriptor instead.
func (*TextBlob) Descriptor() ([]byte, []int) {
return file_uggly_proto_rawDescGZIP(), []int{1}
}
func (x *TextBlob) GetContent() string {
if x != nil {
return x.Content
}
return ""
}
func (x *TextBlob) GetWrap() bool {
if x != nil {
return x.Wrap
}
return false
}
func (x *TextBlob) GetStyle() *Style {
if x != nil {
return x.Style
}
return nil
}
func (x *TextBlob) GetDivNames() []string {
if x != nil {
return x.DivNames
}
return nil
}
// Style is a base property used in divBox fill, border fill, and textboxes
//with fg being foreground color, bg being background color, and attr
//being text attributes like strikethrough and underline.
//
//It's essentially a passthrough of the capabilities of tcell's style
//https://github.com/gdamore/tcell/blob/master/style.go
type Style struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Fg string `protobuf:"bytes,10,opt,name=fg,proto3" json:"fg,omitempty"` // a string representation of the color for the foreground (i.e., text)
Bg string `protobuf:"bytes,11,opt,name=bg,proto3" json:"bg,omitempty"` // a string representation of the color for the background
// attr would be things like underline or bold if the client terminal supports it.
// Experimentation with this has proven that '4' is the only dependable value
Attr string `protobuf:"bytes,12,opt,name=attr,proto3" json:"attr,omitempty"`
}
func (x *Style) Reset() {
*x = Style{}
if protoimpl.UnsafeEnabled {
mi := &file_uggly_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Style) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Style) ProtoMessage() {}
func (x *Style) ProtoReflect() protoreflect.Message {
mi := &file_uggly_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Style.ProtoReflect.Descriptor instead.
func (*Style) Descriptor() ([]byte, []int) {
return file_uggly_proto_rawDescGZIP(), []int{2}
}
func (x *Style) GetFg() string {
if x != nil {
return x.Fg
}
return ""
}
func (x *Style) GetBg() string {
if x != nil {
return x.Bg
}
return ""
}
func (x *Style) GetAttr() string {
if x != nil {
return x.Attr
}
return ""
}
// Link contains information about keyboard shortcuts
// and destinations for actions. The client will determine
// from context whether a Link is to a server page or is
// to be used to pass polling context to a Form that it
// already receieved in a PageResponse.
type Link struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// a repeat of the keystroke used in the parent KeyStroke
// TODO: not sure what happens if they don't match
KeyStroke string `protobuf:"bytes,10,opt,name=keyStroke,proto3" json:"keyStroke,omitempty"`
// the name of the page to be requested in the new PageRequest
PageName string `protobuf:"bytes,11,opt,name=pageName,proto3" json:"pageName,omitempty"`
Server string `protobuf:"bytes,12,opt,name=server,proto3" json:"server,omitempty"` // the server to be used in the new PageRequest
Port string `protobuf:"bytes,13,opt,name=port,proto3" json:"port,omitempty"` // the port to be used in the new PageRequest
Secure bool `protobuf:"varint,16,opt,name=secure,proto3" json:"secure,omitempty"` // whether or not the new PageRequest should be secure (TLS)
Stream bool `protobuf:"varint,17,opt,name=stream,proto3" json:"stream,omitempty"` // whether or not the new PageRequest is a stream
}
func (x *Link) Reset() {
*x = Link{}
if protoimpl.UnsafeEnabled {
mi := &file_uggly_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Link) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Link) ProtoMessage() {}
func (x *Link) ProtoReflect() protoreflect.Message {
mi := &file_uggly_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Link.ProtoReflect.Descriptor instead.
func (*Link) Descriptor() ([]byte, []int) {
return file_uggly_proto_rawDescGZIP(), []int{3}
}
func (x *Link) GetKeyStroke() string {
if x != nil {
return x.KeyStroke
}
return ""
}
func (x *Link) GetPageName() string {
if x != nil {
return x.PageName
}
return ""
}
func (x *Link) GetServer() string {
if x != nil {
return x.Server
}
return ""
}
func (x *Link) GetPort() string {
if x != nil {
return x.Port
}
return ""
}
func (x *Link) GetSecure() bool {
if x != nil {
return x.Secure
}
return false
}
func (x *Link) GetStream() bool {
if x != nil {
return x.Stream
}
return false
}
// If a KeyStroke is of type DivScroll
// then this contains information about which
// DivBox to scroll and whether or not the direction
// is down = true or down = false (e.g., 'up')
//
// WARNING: Not currently implemented in 'uggly-client'
type DivScroll struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
DivName string `protobuf:"bytes,10,opt,name=divName,proto3" json:"divName,omitempty"`
Down bool `protobuf:"varint,11,opt,name=down,proto3" json:"down,omitempty"`
}
func (x *DivScroll) Reset() {
*x = DivScroll{}
if protoimpl.UnsafeEnabled {
mi := &file_uggly_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DivScroll) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DivScroll) ProtoMessage() {}
func (x *DivScroll) ProtoReflect() protoreflect.Message {
mi := &file_uggly_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DivScroll.ProtoReflect.Descriptor instead.
func (*DivScroll) Descriptor() ([]byte, []int) {
return file_uggly_proto_rawDescGZIP(), []int{4}
}
func (x *DivScroll) GetDivName() string {
if x != nil {
return x.DivName
}
return ""
}
func (x *DivScroll) GetDown() bool {
if x != nil {
return x.Down
}
return false
}
// If a KeyStroke is of type FormActivation
// then this contains the name of the form which
// should be activated for that keystroke
type FormActivation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
FormName string `protobuf:"bytes,10,opt,name=formName,proto3" json:"formName,omitempty"`
}
func (x *FormActivation) Reset() {
*x = FormActivation{}
if protoimpl.UnsafeEnabled {
mi := &file_uggly_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FormActivation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FormActivation) ProtoMessage() {}
func (x *FormActivation) ProtoReflect() protoreflect.Message {
mi := &file_uggly_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FormActivation.ProtoReflect.Descriptor instead.
func (*FormActivation) Descriptor() ([]byte, []int) {
return file_uggly_proto_rawDescGZIP(), []int{5}
}
func (x *FormActivation) GetFormName() string {
if x != nil {
return x.FormName
}
return ""
}
// KeyStroke indicates an action that will be executed when the keyStroke
// is prssed by the client. This could be one of Link (e.g., new PageRequest),
// DivScroll (indicates the client should attempt to re-render textblobs that
// exceed their containing DivBox's capacity), or FormActivation which would
// look for a form with the given name on the client's current page.
type KeyStroke struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// a string representation of a key on a keyboard. For rune keys
// (e.g., "j") simply use the single character. For more complex
// keys refer to the string representation from the tcell package:
// https://github.com/gdamore/tcell/blob/master/key.go#L83
//
// The client may have certain keys reserved that will never be
// honored. In the current "uggly-client" this includes:
// F1, F2, F3, F4, F5, F6, F7, and F10
KeyStroke string `protobuf:"bytes,10,opt,name=keyStroke,proto3" json:"keyStroke,omitempty"`
// Types that are assignable to Action:
// *KeyStroke_Link
// *KeyStroke_DivScroll
// *KeyStroke_FormActivation
Action isKeyStroke_Action `protobuf_oneof:"Action"`
}
func (x *KeyStroke) Reset() {
*x = KeyStroke{}
if protoimpl.UnsafeEnabled {
mi := &file_uggly_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *KeyStroke) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*KeyStroke) ProtoMessage() {}
func (x *KeyStroke) ProtoReflect() protoreflect.Message {
mi := &file_uggly_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use KeyStroke.ProtoReflect.Descriptor instead.
func (*KeyStroke) Descriptor() ([]byte, []int) {
return file_uggly_proto_rawDescGZIP(), []int{6}
}
func (x *KeyStroke) GetKeyStroke() string {
if x != nil {
return x.KeyStroke
}
return ""
}
func (m *KeyStroke) GetAction() isKeyStroke_Action {
if m != nil {
return m.Action
}
return nil
}
func (x *KeyStroke) GetLink() *Link {
if x, ok := x.GetAction().(*KeyStroke_Link); ok {
return x.Link
}
return nil
}
func (x *KeyStroke) GetDivScroll() *DivScroll {
if x, ok := x.GetAction().(*KeyStroke_DivScroll); ok {
return x.DivScroll
}
return nil
}
func (x *KeyStroke) GetFormActivation() *FormActivation {
if x, ok := x.GetAction().(*KeyStroke_FormActivation); ok {
return x.FormActivation
}
return nil
}
type isKeyStroke_Action interface {
isKeyStroke_Action()
}
type KeyStroke_Link struct {
Link *Link `protobuf:"bytes,20,opt,name=link,proto3,oneof"`
}
type KeyStroke_DivScroll struct {
DivScroll *DivScroll `protobuf:"bytes,21,opt,name=divScroll,proto3,oneof"`
}
type KeyStroke_FormActivation struct {
FormActivation *FormActivation `protobuf:"bytes,22,opt,name=formActivation,proto3,oneof"`
}
func (*KeyStroke_Link) isKeyStroke_Action() {}
func (*KeyStroke_DivScroll) isKeyStroke_Action() {}
func (*KeyStroke_FormActivation) isKeyStroke_Action() {}
// TextBox contains the properties sent by the server
// for the client to render.
type TextBox struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// the name of this textBox. Will be used as the key in the key:value
// during submission
Name string `protobuf:"bytes,10,opt,name=name,proto3" json:"name,omitempty"`
// the order in which this field will activate when user is tabbing
// through form fields
TabOrder int32 `protobuf:"varint,11,opt,name=tabOrder,proto3" json:"tabOrder,omitempty"`
DefaultValue string `protobuf:"bytes,12,opt,name=defaultValue,proto3" json:"defaultValue,omitempty"` // the default value that will be placed in the box
// a description of the text box (e.g., "passwords should include special chars")
// which can optionally be drawn to the left of the textbox
Description string `protobuf:"bytes,13,opt,name=description,proto3" json:"description,omitempty"`
PositionX int32 `protobuf:"varint,14,opt,name=positionX,proto3" json:"positionX,omitempty"` // relative within DivBox
PositionY int32 `protobuf:"varint,15,opt,name=positionY,proto3" json:"positionY,omitempty"` // relative within DivBox
Height int32 `protobuf:"varint,16,opt,name=height,proto3" json:"height,omitempty"` // currently textBoxes only utilize a single line
Width int32 `protobuf:"varint,17,opt,name=width,proto3" json:"width,omitempty"` // text that goes beyond the width will horozontially scroll to fit
// style for the cursor within the box. ForeGround color is meaningless
StyleCursor *Style `protobuf:"bytes,18,opt,name=styleCursor,proto3" json:"styleCursor,omitempty"`
// style for the box fill or background. Foreground and Background should probably
// match styleText so as not to clash
StyleFill *Style `protobuf:"bytes,19,opt,name=styleFill,proto3" json:"styleFill,omitempty"`
// style of the text that is being typed into box.
StyleText *Style `protobuf:"bytes,20,opt,name=styleText,proto3" json:"styleText,omitempty"`
// style for the description that is rendered to the left of the box
StyleDescription *Style `protobuf:"bytes,21,opt,name=styleDescription,proto3" json:"styleDescription,omitempty"`
// whether or not to render the description. Design consideration:
// This will be rendered as far to the left of the textBox's positionX
// attribute as to fit the description.
ShowDescription bool `protobuf:"varint,22,opt,name=showDescription,proto3" json:"showDescription,omitempty"`
// whether or not this field is a password, e.g, it's contents will be hidden
// while typing
Password bool `protobuf:"varint,23,opt,name=password,proto3" json:"password,omitempty"`
}
func (x *TextBox) Reset() {
*x = TextBox{}
if protoimpl.UnsafeEnabled {
mi := &file_uggly_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TextBox) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TextBox) ProtoMessage() {}
func (x *TextBox) ProtoReflect() protoreflect.Message {
mi := &file_uggly_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TextBox.ProtoReflect.Descriptor instead.
func (*TextBox) Descriptor() ([]byte, []int) {
return file_uggly_proto_rawDescGZIP(), []int{7}
}
func (x *TextBox) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *TextBox) GetTabOrder() int32 {
if x != nil {
return x.TabOrder
}
return 0
}
func (x *TextBox) GetDefaultValue() string {
if x != nil {
return x.DefaultValue
}
return ""
}
func (x *TextBox) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *TextBox) GetPositionX() int32 {
if x != nil {
return x.PositionX
}
return 0
}
func (x *TextBox) GetPositionY() int32 {
if x != nil {
return x.PositionY
}
return 0
}
func (x *TextBox) GetHeight() int32 {
if x != nil {
return x.Height
}
return 0
}
func (x *TextBox) GetWidth() int32 {
if x != nil {
return x.Width
}
return 0
}
func (x *TextBox) GetStyleCursor() *Style {
if x != nil {
return x.StyleCursor
}
return nil
}
func (x *TextBox) GetStyleFill() *Style {
if x != nil {
return x.StyleFill
}
return nil
}
func (x *TextBox) GetStyleText() *Style {
if x != nil {
return x.StyleText
}
return nil
}
func (x *TextBox) GetStyleDescription() *Style {
if x != nil {
return x.StyleDescription
}
return nil
}
func (x *TextBox) GetShowDescription() bool {
if x != nil {
return x.ShowDescription
}
return false
}
func (x *TextBox) GetPassword() bool {
if x != nil {
return x.Password
}
return false
}
// The Form is sent by the server to the client
// as part of the PageResponse. It contains
// the Form name, the DivBox it should be placed
// within (TextBox PositionX and Y coordinates
// are relative to the containing DivBox) and a
// list of the TextBox's included in this form.
// It also supports a parameter for a Link that can
// be used as a return address when this Form is
// submitted in a PageRequest
type Form struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The name of the form. This will be used in formActivation keystrokes and
// for atributing formData in PageRequests
Name string `protobuf:"bytes,10,opt,name=name,proto3" json:"name,omitempty"`
// the DivName that the form should be rendered within. All of the elements of
// the form will be rendered relative to this divBox
DivName string `protobuf:"bytes,11,opt,name=divName,proto3" json:"divName,omitempty"`
// The textboxes to be included in this form
TextBoxes []*TextBox `protobuf:"bytes,12,rep,name=textBoxes,proto3" json:"textBoxes,omitempty"`
// The link that this form will call when the form's submit action
// (e.g., 'enter') is triggered
SubmitLink *Link `protobuf:"bytes,13,opt,name=submitLink,proto3" json:"submitLink,omitempty"`
}
func (x *Form) Reset() {
*x = Form{}
if protoimpl.UnsafeEnabled {
mi := &file_uggly_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Form) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Form) ProtoMessage() {}
func (x *Form) ProtoReflect() protoreflect.Message {
mi := &file_uggly_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Form.ProtoReflect.Descriptor instead.
func (*Form) Descriptor() ([]byte, []int) {
return file_uggly_proto_rawDescGZIP(), []int{8}
}
func (x *Form) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Form) GetDivName() string {
if x != nil {
return x.DivName
}
return ""
}
func (x *Form) GetTextBoxes() []*TextBox {
if x != nil {
return x.TextBoxes
}
return nil
}
func (x *Form) GetSubmitLink() *Link {
if x != nil {
return x.SubmitLink
}
return nil
}
// FormData contains the form name and any
// TextBoxData that was in the form when
// the FormData was sent in the PageRequest
type FormData struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,10,opt,name=name,proto3" json:"name,omitempty"`
TextBoxData []*TextBoxData `protobuf:"bytes,11,rep,name=textBoxData,proto3" json:"textBoxData,omitempty"`
}
func (x *FormData) Reset() {
*x = FormData{}
if protoimpl.UnsafeEnabled {
mi := &file_uggly_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FormData) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FormData) ProtoMessage() {}
func (x *FormData) ProtoReflect() protoreflect.Message {
mi := &file_uggly_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FormData.ProtoReflect.Descriptor instead.
func (*FormData) Descriptor() ([]byte, []int) {
return file_uggly_proto_rawDescGZIP(), []int{9}
}
func (x *FormData) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *FormData) GetTextBoxData() []*TextBoxData {
if x != nil {
return x.TextBoxData
}
return nil
}
// TextBoxData contains the text box's field
// name and whatever contents were in it
// when the PageRequest was sent with FormData
type TextBoxData struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields