-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathstdlib-docs-rep.yaml
5933 lines (5933 loc) · 156 KB
/
stdlib-docs-rep.yaml
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
modules:
arrays:
name: arrays
namespace: ''
functions:
- token: APPEND
file_name: arrays/append.go
line_number: 15
doc:
desc: APPEND appends a new item to an array and returns a new array with a
given element. If ``uniqueOnly`` is set to true, then will add the item
only if it's unique.
params:
- name: arr
type:
- Any[]
desc: Target array.
optional: false
default_value:
- name: item
type:
- Any
desc: Target value to add.
optional: false
default_value:
returns:
name:
type:
- Any[]
desc: New array.
- token: FIRST
file_name: arrays/first.go
line_number: 13
doc:
desc: FIRST returns a first element from a given array.
params:
- name: arr
type:
- Any[]
desc: Target array.
optional: false
default_value:
returns:
name:
type:
- Any
desc: First element in a given array.
- token: FLATTEN
file_name: arrays/flatten.go
line_number: 18
doc:
desc: FLATTEN turns an array of arrays into a flat array. All array elements
in array will be expanded in the result array. Non-array elements are added
as they are. The function will recurse into sub-arrays up to the specified
depth. Duplicates will not be removed.
params:
- name: arr
type:
- Any[]
desc: Target array.
optional: false
default_value:
- name: depth
type:
- Int
desc: Depth level.
optional: true
default_value:
returns:
name:
type:
- Any[]
desc: Flat array.
- token: INTERSECTION
file_name: arrays/intersection.go
line_number: 15
doc:
desc: INTERSECTION return the intersection of all arrays specified. The result
is an array of values that occur in all arguments. The element order is
random. Duplicates are removed.
params:
- name: arrays
type:
- Any[], repeated
desc: An arbitrary number of arrays as multiple arguments (at least 2).
optional: false
default_value:
returns:
name:
type:
- Any[]
desc: A single array with only the elements, which exist in all provided
arrays.
- token: LAST
file_name: arrays/last.go
line_number: 13
doc:
desc: LAST returns the last element of an array.
params:
- name: array
type:
- Any[]
desc: The target array.
optional: false
default_value:
returns:
name:
type:
- Any
desc: Last element of an array.
- token: MINUS
file_name: arrays/minus.go
line_number: 14
doc:
desc: MINUS return the difference of all arrays specified. The order of the
result array is undefined and should not be relied on. Duplicates will be
removed.
params:
- name: arrays
type:
- Any[], repeated
desc: An arbitrary number of arrays as multiple arguments (at least 2).
optional: false
default_value:
returns:
name:
type:
- Any[]
desc: An array of values that occur in the first array, but not in any of
the subsequent arrays.
- token: NTH
file_name: arrays/nth.go
line_number: 16
doc:
desc: NTH returns the element of an array at a given position. It is the same
as anyArray[position] for positive positions, but does not support negative
positions. If position is negative or beyond the upper bound of the array,
then NONE will be returned.
params:
- name: array
type:
- Any[]
desc: An array with elements of arbitrary type.
optional: false
default_value:
- name: index
type:
- Int
desc: Position of desired element in array, positions start at 0.
optional: false
default_value:
returns:
name:
type:
- Any
desc: The array element at the given position.
- token: OUTERSECTION
file_name: arrays/outersection.go
line_number: 12
doc:
desc: OUTERSECTION return the values that occur only once across all arrays
specified. The element order is random.
params:
- name: arrays
type:
- Any[], repeated
desc: An arbitrary number of arrays as multiple arguments (at least 2).
optional: false
default_value:
returns:
name:
type:
- Any[]
desc: A single array with only the elements that exist only once across
all provided arrays.
- token: POP
file_name: arrays/pop.go
line_number: 13
doc:
desc: POP returns a new array without last element.
params:
- name: array
type:
- Any[]
desc: Target array.
optional: false
default_value:
returns:
name:
type:
- Any[]
desc: Copy of an array without last element.
- token: POSITION
file_name: arrays/position.go
line_number: 15
doc:
desc: POSITION returns a value indicating whether an element is contained
in array. Optionally returns its position.
params:
- name: array
type:
- Any[]
desc: The source array.
optional: false
default_value:
- name: value
type:
- Any
desc: The target value.
optional: false
default_value:
- name: position
type:
- Boolean
desc: Boolean value which indicates whether to return item's position.
optional: true
default_value: 'False'
returns:
name:
type:
- Boolean
- Int
desc: A value indicating whether an element is contained in array.
- token: PUSH
file_name: arrays/push.go
line_number: 15
doc:
desc: PUSH create a new array with appended value.
params:
- name: array
type:
- Any[]
desc: Source array.
optional: false
default_value:
- name: value
type:
- Any
desc: Target value.
optional: false
default_value:
- name: unique
type:
- Boolean
desc: Read indicating whether to do uniqueness check.
optional: true
default_value: 'False'
returns:
name:
type:
- Any[]
desc: A new array with appended value.
- token: REMOVE_NTH
file_name: arrays/remove_nth.go
line_number: 14
doc:
desc: REMOVE_NTH returns a new array without an element by a given position.
params:
- name: array
type:
- Any[]
desc: Source array.
optional: false
default_value:
- name: position
type:
- Int
desc: Target element position.
optional: false
default_value:
returns:
name:
type:
- Any[]
desc: A new array without an element by a given position.
- token: REMOVE_VALUE
file_name: arrays/remove_value.go
line_number: 16
doc:
desc: REMOVE_VALUE returns a new array with removed all occurrences of value
in a given array. Optionally with a limit to the number of removals.
params:
- name: array
type:
- Any[]
desc: Source array.
optional: false
default_value:
- name: value
type:
- Any
desc: Target value.
optional: false
default_value:
- name: limit
type:
- Int
desc: A limit to the number of removals.
optional: true
default_value:
returns:
name:
type:
- Any[]
desc: A new array with removed all occurrences of value in a given array.
- token: REMOVE_VALUES
file_name: arrays/remove_values.go
line_number: 14
doc:
desc: REMOVE_VALUES returns a new array with removed all occurrences of values
in a given array.
params:
- name: array
type:
- Any[]
desc: Source array.
optional: false
default_value:
- name: values
type:
- Any[]
desc: Target values.
optional: false
default_value:
returns:
name:
type:
- Any[]
desc: A new array with removed all occurrences of values in a given array.
- token: SHIFT
file_name: arrays/shift.go
line_number: 13
doc:
desc: SHIFT returns a new array without the first element.
params:
- name: array
type:
- Any[]
desc: Target array.
optional: false
default_value:
returns:
name:
type:
- Any[]
desc: Copy of an array without the first element.
- token: SLICE
file_name: arrays/slice.go
line_number: 15
doc:
desc: SLICE returns a new sliced array.
params:
- name: array
type:
- Any[]
desc: Source array.
optional: false
default_value:
- name: start
type:
- Int
desc: Start position of extraction.
optional: false
default_value:
- name: length
type:
- Int
desc: Read indicating how many elements to extract.
optional: true
default_value:
returns:
name:
type:
- Any[]
desc: Sliced array.
- token: SORTED
file_name: arrays/sorted.go
line_number: 14
doc:
desc: SORTED sorts all elements in anyArray. The function will use the default
comparison order for FQL value types.
params:
- name: array
type:
- Any[]
desc: Target array.
optional: false
default_value:
returns:
name:
type:
- Any[]
desc: Sorted array.
- token: SORTED_UNIQUE
file_name: arrays/sorted_unique.go
line_number: 15
doc:
desc: SORTED_UNIQUE sorts all elements in anyArray. The function will use
the default comparison order for FQL value types. Additionally, the values
in the result array will be made unique
params:
- name: array
type:
- Any[]
desc: Target array.
optional: false
default_value:
returns:
name:
type:
- Any[]
desc: Sorted array.
- token: UNION
file_name: arrays/union.go
line_number: 13
doc:
desc: UNION returns the union of all passed arrays.
params:
- name: arrays
type:
- Any[], repeated
desc: List of arrays to combine.
optional: false
default_value:
returns:
name:
type:
- Any[]
desc: All array elements combined in a single array, in any order.
- token: UNION_DISTINCT
file_name: arrays/union_distinct.go
line_number: 13
doc:
desc: UNION_DISTINCT returns the union of all passed arrays with unique values.
params:
- name: arrays
type:
- Any[], repeated
desc: List of arrays to combine.
optional: false
default_value:
returns:
name:
type:
- Any[]
desc: All unique array elements combined in a single array, in any order.
- token: UNIQUE
file_name: arrays/unique.go
line_number: 13
doc:
desc: UNIQUE returns all unique elements from a given array.
params:
- name: array
type:
- Any[]
desc: Target array.
optional: false
default_value:
returns:
name:
type:
- Any[]
desc: New array without duplicates.
- token: UNSHIFT
file_name: arrays/unshift.go
line_number: 15
doc:
desc: UNSHIFT prepends value to a given array.
params:
- name: array
type:
- Any[]
desc: Target array.
optional: false
default_value:
- name: value
type:
- Any
desc: Target value to prepend.
optional: false
default_value:
- name: unique
type:
- Boolean
desc: Optional value indicating whether a value must be unique to be prepended.
default is false.
optional: true
default_value: 'False'
returns:
name:
type:
- Any[]
desc: New array with prepended value.
collections:
name: collections
namespace: ''
functions:
- token: INCLUDES
file_name: collections/include.go
line_number: 14
doc:
desc: INCLUDES checks whether a container includes a given value.
params:
- name: haystack
type:
- String
- Any[]
- Object
- Iterable
desc: The value container.
optional: false
default_value:
- name: needle
type:
- Any
desc: The target value to assert.
optional: false
default_value:
returns:
name:
type:
- Boolean
desc: A boolean value that indicates whether a container contains a given
value.
- token: LENGTH
file_name: collections/length.go
line_number: 14
doc:
desc: LENGTH returns the length of a measurable value.
params:
- name: value
type:
- Measurable
desc: The value to measure.
optional: false
default_value:
returns:
name:
type:
- Int
desc: The length of the value.
- token: REVERSE
file_name: collections/reverse.go
line_number: 13
doc:
desc: REVERSE returns the reverse of a given string or array value.
params:
- name: value
type:
- String
- Any[]
desc: The string or array to reverse.
optional: false
default_value:
returns:
name:
type:
- String
- Any[]
desc: A reversed version of a given value.
datetime:
name: datetime
namespace: ''
functions:
- token: DATE
file_name: datetime/date.go
line_number: 14
doc:
desc: DATE converts RFC3339 date time string to DateTime object.
params:
- name: time
type:
- String
desc: String in rfc3339 format.
optional: false
default_value:
returns:
name:
type:
- DateTime
desc: New datetime object derived from timestring.
- token: DATE_ADD
file_name: datetime/add_subtract.go
line_number: 30
doc:
desc: 'DATE_ADD adds amount given in unit to date. The following units are
available: * y, year, year * m, month, months * w, week, weeks * d, day,
days * h, hour, hours * i, minute, minutes * s, second, seconds * f, millisecond,
milliseconds'
params:
- name: date
type:
- DateTime
desc: Source date.
optional: false
default_value:
- name: amount
type:
- Int
desc: Amount of units
optional: false
default_value:
- name: unit
type:
- String
desc: Unit.
optional: false
default_value:
returns:
name:
type:
- DateTime
desc: Calculated date.
- token: DATE_COMPARE
file_name: datetime/compare.go
line_number: 17
doc:
desc: DATE_COMPARE checks if two partial dates match.
params:
- name: date1
type:
- DateTime
desc: First date.
optional: false
default_value:
- name: date2
type:
- DateTime
desc: Second date.
optional: false
default_value:
- name: unitRangeStart
type:
- String
desc: Unit to start from.
optional: false
default_value:
- name: unitRangeEnd
type:
- String
desc: Unit to end with. error will be returned if unitrangestart unit less
that unitrangeend.
optional: true
default_value: '"millisecond"'
returns:
name:
type:
- Boolean
desc: True if the dates match, else false.
- token: DATE_DAY
file_name: datetime/day.go
line_number: 13
doc:
desc: DATE_DAY returns the day of date as a number.
params:
- name: date
type:
- DateTime
desc: Source datetime.
optional: false
default_value:
returns:
name:
type:
- Int
desc: A day number.
- token: DATE_DAYOFWEEK
file_name: datetime/dayofweek.go
line_number: 13
doc:
desc: DATE_DAYOFWEEK returns number of the weekday from the date. Sunday is
the 0th day of week.
params:
- name: date
type:
- DateTime
desc: Source datetime.
optional: false
default_value:
returns:
name:
type:
- Int
desc: Number of the weekday.
- token: DATE_DAYOFYEAR
file_name: datetime/dayofyear.go
line_number: 14
doc:
desc: DATE_DAYOFYEAR returns the day of year number of date. The return value
range from 1 to 365 (366 in a leap year).
params:
- name: date
type:
- DateTime
desc: Source datetime.
optional: false
default_value:
returns:
name:
type:
- Int
desc: A day of year number.
- token: DATE_DAYS_IN_MONTH
file_name: datetime/daysinmonth.go
line_number: 29
doc:
desc: DATE_DAYS_IN_MONTH returns the number of days in the month of date.
params:
- name: date
type:
- DateTime
desc: Source datetime.
optional: false
default_value:
returns:
name:
type:
- Int
desc: Number of the days.
- token: DATE_DIFF
file_name: datetime/diff.go
line_number: 16
doc:
desc: DATE_DIFF returns the difference between two dates in given time unit.
params:
- name: date1
type:
- DateTime
desc: First date.
optional: false
default_value:
- name: date2
type:
- DateTime
desc: Second date.
optional: false
default_value:
- name: unit
type:
- String
desc: Time unit to return the difference in.
optional: false
default_value:
- name: asFloat
type:
- Boolean
desc: If true amount of unit will be as float.
optional: true
default_value: 'False'
returns:
name:
type:
- Int
- Float
desc: Difference between date1 and date2.
- token: DATE_FORMAT
file_name: datetime/format.go
line_number: 13
doc:
desc: DATE_FORMAT format date according to the given format string.
params:
- name: date
type:
- DateTime
desc: Source datetime object.
optional: false
default_value:
returns:
name:
type:
- String
desc: Formatted date.
- token: DATE_HOUR
file_name: datetime/hour.go
line_number: 13
doc:
desc: DATE_HOUR returns the hour of date as a number.
params:
- name: date
type:
- DateTime
desc: Source datetime.
optional: false
default_value:
returns:
name:
type:
- Int
desc: An hour number.
- token: DATE_LEAPYEAR
file_name: datetime/leapyear.go
line_number: 13
doc:
desc: DATE_LEAPYEAR returns true if date is in a leap year else false.
params:
- name: date
type:
- DateTime
desc: Source datetime.
optional: false
default_value:
returns:
name:
type:
- Boolean
desc: Date is in a leap year.
- token: DATE_MILLISECOND
file_name: datetime/millisecond.go
line_number: 13
doc:
desc: DATE_MILLISECOND returns the millisecond of date as a number.
params:
- name: date
type:
- DateTime
desc: Source datetime.
optional: false
default_value:
returns:
name:
type:
- Int
desc: A millisecond number.
- token: DATE_MINUTE
file_name: datetime/minute.go
line_number: 13
doc:
desc: DATE_MINUTE returns the minute of date as a number.
params:
- name: date
type:
- DateTime
desc: Source datetime.
optional: false
default_value:
returns:
name:
type:
- Int
desc: A minute number.
- token: DATE_MONTH
file_name: datetime/month.go
line_number: 13
doc:
desc: DATE_MONTH returns the month of date as a number.
params:
- name: date
type:
- DateTime
desc: Source datetime.
optional: false
default_value:
returns:
name:
type:
- Int
desc: A month number.
- token: DATE_QUARTER
file_name: datetime/quarter.go
line_number: 14
doc:
desc: DATE_QUARTER returns which quarter date belongs to.
params:
- name: date
type:
- DateTime
desc: Source datetime.
optional: false
default_value:
returns:
name:
type:
- Int
desc: A quarter number.
- token: DATE_SECOND
file_name: datetime/second.go
line_number: 13
doc:
desc: DATE_SECOND returns the second of date as a number.
params:
- name: date
type:
- DateTime
desc: Source datetime.
optional: false
default_value:
returns:
name:
type:
- Int
desc: A second number.
- token: DATE_SUBTRACT
file_name: datetime/add_subtract.go
line_number: 60
doc:
desc: 'DATE_SUBTRACT subtract amount given in unit to date. The following
units are available: * y, year, year * m, month, months * w, week, weeks
* d, day, days * h, hour, hours * i, minute, minutes * s, second, seconds
* f, millisecond, milliseconds'
params:
- name: date
type:
- DateTime
desc: Source date.
optional: false
default_value:
- name: amount
type:
- Int
desc: Amount of units
optional: false
default_value:
- name: unit
type:
- String
desc: Unit.
optional: false
default_value:
returns:
name:
type:
- DateTime
desc: Calculated date.
- token: DATE_YEAR
file_name: datetime/year.go
line_number: 13
doc:
desc: DATE_YEAR returns the year extracted from the given date.
params:
- name: date
type:
- DateTime
desc: Source datetime.
optional: false
default_value:
returns:
name:
type:
- Int
desc: A year number.
- token: NOW
file_name: datetime/now.go
line_number: 12
doc:
desc: NOW returns new DateTime object with Time equal to time.Now().
params: []
returns:
name:
type:
- DateTime
desc: New datetime object.
html:
name: html
namespace: ''
functions:
- token: ATTR_GET
file_name: html/attr_get.go
line_number: 14
doc:
desc: ATTR_GET gets single or more attribute(s) of a given element.
params:
- name: node
type:
- HTMLPage
- HTMLDocument
- HTMLElement
desc: Target node.
optional: false
default_value:
- name: attrNames
type:
- String, repeated
desc: Attribute name(s).
optional: false
default_value:
returns:
name:
type:
- Object
desc: Key-value pairs of attribute values.
- token: ATTR_QUERY
file_name: html/attr_query.go
line_number: 15
doc:
desc: ATTR_QUERY finds a single or more attribute(s) by an query selector.
params:
- name: node
type:
- HTMLPage
- HTMLDocument
- HTMLElement
desc: Target node.
optional: false
default_value:
- name: selector
type:
- String
desc: Query selector.
optional: false
default_value: