-
Notifications
You must be signed in to change notification settings - Fork 42
/
models.go
880 lines (831 loc) · 24.4 KB
/
models.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
// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.16.0
package db
import (
"database/sql"
"time"
"github.com/google/uuid"
"github.com/jackc/pgtype"
)
// git blame of all lines in all files of a repo
type GitBlame struct {
// foreign key for public.repos.id
RepoID uuid.UUID
// email of the author who modified the line
AuthorEmail sql.NullString
// name of the author who modified the line
AuthorName sql.NullString
AuthorWhen sql.NullTime
// hash of the commit the modification was made in
CommitHash sql.NullString
// line number of the modification
LineNo int32
Line sql.NullString
// path of the file the modification was made in
Path string
// timestamp when record was synced into the MergeStat database
MergestatSyncedAt time.Time
}
type GitBranch struct {
// foreign key for public.repos.id
RepoID uuid.UUID
FullName string
// hash of the commit for refs that are not of type tag
Hash sql.NullString
// name of the ref
Name sql.NullString
// remote of the ref
Remote sql.NullString
// target of the ref
Target sql.NullString
// type of the ref
Type sql.NullString
// hash of the commit for refs that are of type tag
TagCommitHash sql.NullString
// timestamp when record was synced into the MergeStat database
MergestatSyncedAt time.Time
}
// git commit history of a repo
type GitCommit struct {
// foreign key for public.repos.id
RepoID uuid.UUID
// hash of the commit
Hash string
// message of the commit
Message string
// name of the author of the the modification
AuthorName string
// email of the author of the modification
AuthorEmail string
// timestamp of when the modifcation was authored
AuthorWhen time.Time
// name of the author who committed the modification
CommitterName string
// email of the author who committed the modification
CommitterEmail string
// timestamp of when the commit was made
CommitterWhen time.Time
// the number of parents of the commit
Parents int32
// timestamp when record was synced into the MergeStat database
MergestatSyncedAt time.Time
}
// git commit stats of a repo
type GitCommitStat struct {
// foreign key for public.repos.id
RepoID uuid.UUID
// hash of the commit
CommitHash string
// path of the file the modification was made in
FilePath string
// the number of additions in this path of the commit
Additions int32
// the number of deletions in this path of the commit
Deletions int32
// timestamp when record was synced into the MergeStat database
MergestatSyncedAt time.Time
// old file mode derived from git mode. possible values (unknown, none, regular_file, symbolic_link, git_link)
OldFileMode string
// new file mode derived from git mode. possible values (unknown, none, regular_file, symbolic_link, git_link)
NewFileMode string
}
// git files (content and paths) of a repo
type GitFile struct {
// foreign key for public.repos.id
RepoID uuid.UUID
// path of the file
Path string
// boolean to determine if the file is an executable
Executable bool
// contents of the file
Contents sql.NullString
// timestamp when record was synced into the MergeStat database
MergestatSyncedAt time.Time
}
// git refs of a repo
type GitRef struct {
// foreign key for public.repos.id
RepoID uuid.UUID
FullName string
// hash of the commit for refs that are not of type tag
Hash sql.NullString
// name of the ref
Name sql.NullString
// remote of the ref
Remote sql.NullString
// target of the ref
Target sql.NullString
// type of the ref
Type sql.NullString
// hash of the commit for refs that are of type tag
TagCommitHash sql.NullString
// timestamp when record was synced into the MergeStat database
MergestatSyncedAt time.Time
}
type GitTag struct {
// foreign key for public.repos.id
RepoID uuid.UUID
FullName string
// hash of the ref that are of type tag
Hash sql.NullString
// name of the ref
Name sql.NullString
// remote of the ref
Remote sql.NullString
// target of the ref
Target sql.NullString
// type of the ref
Type sql.NullString
// hash of the commit for refs that are of type tag
TagCommitHash sql.NullString
// timestamp when record was synced into the MergeStat database
MergestatSyncedAt time.Time
}
type GithubActionsWorkflow struct {
RepoID uuid.UUID
ID int64
WorkflowNodeID sql.NullString
Name sql.NullString
Path sql.NullString
State sql.NullString
CreatedAt sql.NullTime
UpdatedAt sql.NullTime
Url sql.NullString
HtmlUrl sql.NullString
BadgeUrl sql.NullString
MergestatSyncedAt time.Time
}
type GithubActionsWorkflowRun struct {
RepoID uuid.UUID
ID int64
WorkflowRunNodeID sql.NullString
Name sql.NullString
HeadBranch sql.NullString
RunNumber sql.NullInt32
RunAttempt sql.NullInt32
Event sql.NullString
Status sql.NullString
Conclusion sql.NullString
WorkflowID sql.NullInt64
CheckSuiteID sql.NullInt64
CheckSuiteNodeID sql.NullString
Url sql.NullString
HtmlUrl sql.NullString
PullRequests pgtype.JSONB
CreatedAt sql.NullTime
UpdatedAt sql.NullTime
RunStartedAt sql.NullTime
JobsUrl sql.NullString
LogsUrl sql.NullString
CheckSuiteUrl sql.NullString
ArtifactsUrl sql.NullString
CancelUrl sql.NullString
RerunUrl sql.NullString
HeadCommit pgtype.JSONB
WorkflowUrl sql.NullString
RepositoryUrl sql.NullString
HeadRepositoryUrl sql.NullString
MergestatSyncedAt time.Time
}
type GithubActionsWorkflowRunJob struct {
RepoID uuid.UUID
ID int64
RunID sql.NullInt64
Log sql.NullString
RunUrl sql.NullString
JobNodeID sql.NullString
HeadSha sql.NullString
Url sql.NullString
HtmlUrl sql.NullString
Status sql.NullString
Conclusion sql.NullString
StartedAt sql.NullTime
CompletedAt sql.NullTime
WorkflowName sql.NullString
Steps pgtype.JSONB
CheckRunUrl sql.NullString
Labels pgtype.JSONB
RunnerID sql.NullInt64
RunnerName sql.NullString
RunnerGroupID sql.NullInt64
RunnerGroupName sql.NullString
MergestatSyncedAt time.Time
}
// issues of a GitHub repo
type GithubIssue struct {
// foreign key for public.repos.id
RepoID uuid.UUID
// login of the author of the issue
AuthorLogin sql.NullString
// body of the issue
Body sql.NullString
// boolean to determine if the issue is closed
Closed sql.NullBool
// timestamp of when the issue was closed
ClosedAt sql.NullTime
CommentCount sql.NullInt32
CreatedAt sql.NullTime
// boolean to determine if the issue was created via email
CreatedViaEmail sql.NullBool
// GitHub database_id of the issue
DatabaseID int32
// login of the editor of the issue
EditorLogin sql.NullString
// boolean to determine if the issue was edited and includes an edit with the creation data
IncludesCreatedEdit sql.NullBool
// number of labels associated to the issue
LabelCount sql.NullInt32
// timestamp when the issue was edited
LastEditedAt sql.NullTime
// boolean to determine if the issue is locked
Locked sql.NullBool
// number of milestones associated to the issue
MilestoneCount sql.NullInt32
// GitHub number for the issue
Number int32
// number of participants associated to the issue
ParticipantCount sql.NullInt32
// timestamp when the issue was published
PublishedAt sql.NullTime
// number of reactions associated to the issue
ReactionCount sql.NullInt32
// state of the issue
State sql.NullString
// title of the issue
Title sql.NullString
// timestamp when the issue was updated
UpdatedAt sql.NullTime
// GitHub URL of the issue
Url sql.NullString
// labels associated to the issue
Labels pgtype.JSONB
// timestamp when record was synced into the MergeStat database
MergestatSyncedAt time.Time
}
// GitHub Workflow Run Jobs
type GithubPullRequest struct {
// foreign key for public.repos.id
RepoID uuid.UUID
// the number of additions in the pull request
Additions sql.NullInt32
// login of the author of the pull request
AuthorLogin sql.NullString
// author association to the repo
AuthorAssociation sql.NullString
// URL to the avatar of the author of the pull request
AuthorAvatarUrl sql.NullString
// name of the author of the pull request
AuthorName sql.NullString
// the base ref object id associated with the pull request
BaseRefOid sql.NullString
// the name of base ref associated with the pull request
BaseRefName sql.NullString
// the name of the base repo for the pull request
BaseRepositoryName sql.NullString
// body of the pull request
Body sql.NullString
// the number of files changed/modified in the pull request
ChangedFiles sql.NullInt32
// boolean to determine if the pull request is closed
Closed sql.NullBool
// timestamp of when the pull request was closed
ClosedAt sql.NullTime
// the number of comments in the pull request
CommentCount sql.NullInt32
CommitCount sql.NullInt32
// timestamp of when the pull request was created
CreatedAt sql.NullTime
// boolean to determine if the pull request was created via email
CreatedViaEmail sql.NullBool
// GitHub database_id of the pull request
DatabaseID int32
// the number of deletions in the pull request
Deletions sql.NullInt32
// login of the editor of the pull request
EditorLogin sql.NullString
// the name of head ref associated with the pull request
HeadRefName sql.NullString
// the head ref object id associated with the pull request
HeadRefOid sql.NullString
// the name of the head repo for the pull request
HeadRepositoryName sql.NullString
// boolean to determine if the pull request is a draft
IsDraft sql.NullBool
// number of labels associated to the pull request
LabelCount sql.NullInt32
// timestamp of when the pull request was last edited
LastEditedAt sql.NullTime
// boolean to determine if the pull request is locked
Locked sql.NullBool
// boolean to determine if a maintainer can modify the pull request
MaintainerCanModify sql.NullBool
// mergeable state of the pull request
Mergeable sql.NullString
// boolean to determine if the pull request is merged
Merged sql.NullBool
// timestamp of when the pull request was merged
MergedAt sql.NullTime
// actor who merged the pull request
MergedBy sql.NullString
// GitHub number of the pull request
Number sql.NullInt32
// number of participants associated to the pull request
ParticipantCount sql.NullInt32
// timestamp of when the pull request was published
PublishedAt sql.NullTime
// review decision of the pull request
ReviewDecision sql.NullString
// state of the pull request
State sql.NullString
// title of the pull request
Title sql.NullString
// timestamp of when the pull request was updated
UpdatedAt sql.NullTime
// GitHub URL of the pull request
Url sql.NullString
// labels associated to the pull request
Labels pgtype.JSONB
// timestamp when record was synced into the MergeStat database
MergestatSyncedAt time.Time
}
// commits for all pull requests of a GitHub repo
type GithubPullRequestCommit struct {
// foreign key for public.repos.id
RepoID uuid.UUID
// GitHub pull request number of the commit
PrNumber int32
// hash of the commit
Hash sql.NullString
// message of the commit
Message sql.NullString
// name of the author of the the modification
AuthorName sql.NullString
// email of the author of the modification
AuthorEmail sql.NullString
// timestamp of when the modifcation was authored
AuthorWhen sql.NullTime
// name of the author who committed the modification
CommitterName sql.NullString
// email of the author who committed the modification
CommitterEmail sql.NullString
// timestamp of when the commit was made
CommitterWhen sql.NullTime
// the number of additions in the commit
Additions sql.NullInt32
// the number of deletions in the commit
Deletions sql.NullInt32
// the number of files changed/modified in the commit
ChangedFiles sql.NullInt32
// GitHub URL of the commit
Url sql.NullString
// timestamp when record was synced into the MergeStat database
MergestatSyncedAt time.Time
}
// reviews for all pull requests of a GitHub repo
type GithubPullRequestReview struct {
// foreign key for public.repos.id
RepoID uuid.UUID
// GitHub pull request number of the review
PrNumber int32
// GitHub id of the review
ID string
// login of the author of the review
AuthorLogin sql.NullString
// URL to the profile of the author of the review
AuthorUrl sql.NullString
// author association to the repo
AuthorAssociation sql.NullString
// boolean to determine if author can push to the repo
AuthorCanPushToRepository sql.NullBool
// body of the review
Body sql.NullString
// number of comments associated to the review
CommentCount sql.NullInt32
// timestamp of when the review was created
CreatedAt sql.NullTime
// boolean to determine if the review was created via email
CreatedViaEmail sql.NullBool
// login of the editor of the review
EditorLogin sql.NullString
// timestamp of when the review was last edited
LastEditedAt sql.NullTime
// timestamp of when the review was published
PublishedAt sql.NullTime
// state of the review
State sql.NullString
// timestamp of when the review was submitted
SubmittedAt sql.NullTime
// timestamp of when the review was updated
UpdatedAt sql.NullTime
// timestamp when record was synced into the MergeStat database
MergestatSyncedAt time.Time
}
// info/metadata of a GitHub repo
type GithubRepoInfo struct {
// foreign key for public.repos.id
RepoID uuid.UUID
// the user or organization that owns the repo
Owner string
// the name of the repo
Name string
// timestamp of when the repo was created
CreatedAt sql.NullTime
// the name of the default branch for the repo
DefaultBranchName sql.NullString
// the description for the repo
Description sql.NullString
// the number of kilobytes on disk for the repo
DiskUsage sql.NullInt32
// number of forks associated to the repo
ForkCount sql.NullInt32
// the GitHub homepage URL for the repo
HomepageUrl sql.NullString
// boolean to determine if the repo is archived
IsArchived sql.NullBool
// boolean to determine if the repo is disabled
IsDisabled sql.NullBool
// boolean to determine if the repo is a mirror
IsMirror sql.NullBool
// boolean to determine if the repo is private
IsPrivate sql.NullBool
// number of issues associated to the repo
TotalIssuesCount sql.NullInt32
// the author of the latest release in the repo
LatestReleaseAuthor sql.NullString
// timestamp of the creation of the latest release in the repo
LatestReleaseCreatedAt sql.NullTime
// the name of the latest release in the repo
LatestReleaseName sql.NullString
// timestamp of the publishing of the latest release in the repo
LatestReleasePublishedAt sql.NullTime
// the license key for the repo
LicenseKey sql.NullString
// the license name for the repo
LicenseName sql.NullString
// the license nickname for the repo
LicenseNickname sql.NullString
// the URL for the image used to represent this repository in Open Graph data
OpenGraphImageUrl sql.NullString
// the primary language for the repo
PrimaryLanguage sql.NullString
// timestamp of the latest push to the repo
PushedAt sql.NullTime
// number of releases associated to the repo
ReleasesCount sql.NullInt32
// number of stargazers associated to the repo
StargazersCount sql.NullInt32
// timestamp of the latest update to the repo
UpdatedAt sql.NullTime
// number of watchers associated to the repo
WatchersCount sql.NullInt32
// timestamp when record was synced into the MergeStat database
MergestatSyncedAt time.Time
}
// stargazers of a GitHub repo
type GithubStargazer struct {
// foreign key for public.repos.id
RepoID uuid.UUID
// login of the user who starred the repo
Login string
// email of the user who starred the repo
Email sql.NullString
// name of the user who starred the repo
Name sql.NullString
// public profile bio of the user who starred the repo
Bio sql.NullString
// company of the user who starred the repo
Company sql.NullString
// URL to the avatar of the user who starred the repo
AvatarUrl sql.NullString
// timestamp of when the user was created who starred the repo
CreatedAt sql.NullTime
// timestamp of the latest update to the user who starred the repo
UpdatedAt sql.NullTime
// twitter of the user who starred the repo
Twitter sql.NullString
// website of the user who starred the repo
Website sql.NullString
// location of the user who starred the repo
Location sql.NullString
// timestamp the user starred the repo
StarredAt sql.NullTime
// timestamp when record was synced into the MergeStat database
MergestatSyncedAt time.Time
}
type GitleaksRepoDetection struct {
// foreign key for public.repos.id
RepoID uuid.UUID
// description of the detection
Description interface{}
// detection start line
StartLine interface{}
// detection end line
EndLine interface{}
// detection start column
StartColumn interface{}
// detection end column
EndColumn interface{}
// detection match
Match interface{}
// detection secret
Secret interface{}
// detection file
File interface{}
// detected symlink file
SymlinkFile interface{}
// detection commit
Commit interface{}
// detection entropy
Entropy interface{}
// detection author
Author interface{}
// detection email
Email interface{}
// detection date
Date interface{}
// detection message
Message interface{}
// detection tags
Tags interface{}
// detection rule id
RuleID interface{}
// detection fingerprint
Fingerprint interface{}
}
// scan output of a Gitleaks repo scan
type GitleaksRepoScan struct {
// foreign key for public.repos.id
RepoID uuid.UUID
// JSON output of a Gitleaks scan
Results pgtype.JSONB
}
type GosecRepoDetection struct {
RepoID uuid.UUID
Severity interface{}
Confidence interface{}
CweID interface{}
RuleID interface{}
Details interface{}
File interface{}
Line interface{}
Column interface{}
Nosec interface{}
}
type GosecRepoScan struct {
RepoID uuid.UUID
Issues pgtype.JSONB
}
type MergestatLatestRepoSync struct {
ID int64
CreatedAt time.Time
RepoSyncID uuid.UUID
Status string
StartedAt sql.NullTime
DoneAt sql.NullTime
}
type MergestatQueryHistory struct {
ID uuid.UUID
RunAt sql.NullTime
RunBy string
Query string
}
// Table for "dynamic" repo imports - regularly loading from a GitHub org for example
type MergestatRepoImport struct {
ID uuid.UUID
CreatedAt time.Time
UpdatedAt time.Time
Type string
Settings pgtype.JSONB
LastImport sql.NullTime
ImportInterval sql.NullString
LastImportStartedAt sql.NullTime
ImportStatus sql.NullString
ImportError sql.NullString
}
// Types of repo imports
type MergestatRepoImportType struct {
Type string
Description string
}
type MergestatRepoSync struct {
RepoID uuid.UUID
SyncType string
Settings pgtype.JSONB
ID uuid.UUID
ScheduleEnabled bool
Priority int32
LastCompletedRepoSyncQueueID sql.NullInt64
}
type MergestatRepoSyncLog struct {
ID int64
CreatedAt time.Time
LogType string
Message string
RepoSyncQueueID int64
}
type MergestatRepoSyncLogType struct {
Type string
Description sql.NullString
}
type MergestatRepoSyncQueue struct {
ID int64
CreatedAt time.Time
RepoSyncID uuid.UUID
Status string
StartedAt sql.NullTime
DoneAt sql.NullTime
LastKeepAlive sql.NullTime
Priority int32
TypeGroup string
}
type MergestatRepoSyncQueueStatusType struct {
Type string
Description sql.NullString
}
type MergestatRepoSyncType struct {
Type string
Description sql.NullString
ShortName string
Priority int32
TypeGroup string
}
type MergestatRepoSyncTypeGroup struct {
Group sql.NullString
ConcurrentSyncs sql.NullInt32
}
// @name labels
type MergestatRepoSyncTypeLabel struct {
Label string
Description sql.NullString
Color string
}
// @name labelAssociations
type MergestatRepoSyncTypeLabelAssociation struct {
Label string
RepoSyncType string
}
type MergestatSchemaIntrospection struct {
Schema interface{}
TableName interface{}
TableType interface{}
ColumnName interface{}
OrdinalPosition interface{}
IsNullable interface{}
DataType interface{}
UdtName interface{}
ColumnDescription string
}
type MergestatServiceAuthCredential struct {
ID uuid.UUID
CreatedAt time.Time
UpdatedAt time.Time
Type string
Credentials []byte
}
type MergestatServiceAuthCredentialType struct {
Type string
Description string
}
type MergestatUserMgmtPgUser struct {
Rolname interface{}
Rolsuper sql.NullBool
Rolinherit sql.NullBool
Rolcreaterole sql.NullBool
Rolcreatedb sql.NullBool
Rolcanlogin sql.NullBool
Rolconnlimit sql.NullInt32
Rolvaliduntil sql.NullTime
Rolreplication sql.NullBool
Rolbypassrls sql.NullBool
Memberof interface{}
}
// git repositories to track
type Repo struct {
// MergeStat identifier for the repo
ID uuid.UUID
// URL for the repo
Repo string
// ref for the repo
Ref sql.NullString
// boolean to determine if the repo is in GitHub
IsGithub sql.NullBool
// timestamp of when the MergeStat repo entry was created
CreatedAt time.Time
// JSON settings for the repo
Settings pgtype.JSONB
// array of tags for the repo for topics in GitHub as well as tags added in MergeStat
Tags pgtype.JSONB
// foreign key for mergestat.repo_imports.id
RepoImportID uuid.NullUUID
}
// MergeStat internal table to track schema migrations
type SchemaMigration struct {
Version int64
Dirty bool
}
// MergeStat internal table to track schema migrations history
type SchemaMigrationsHistory struct {
ID int32
Version int64
AppliedAt time.Time
}
type SyftRepoArtifact struct {
// foreign key for public.repos.id
RepoID uuid.UUID
// artifact JSON results from Syft repo scan
Artifact pgtype.JSONB
// artifact id
ID interface{}
// artifact name
Name interface{}
// artifact version
Version interface{}
// artifact type
Type interface{}
// artifact found_by
FoundBy interface{}
// artifact locations
Locations interface{}
// artifact licenses
Licenses interface{}
// artifact language
Language interface{}
// artifact cpes
Cpes interface{}
// artifact purl
Purl interface{}
}
// Syft repo scans
type SyftRepoScan struct {
// foreign key for public.repos.id
RepoID uuid.UUID
// JSON results from Syft repo scan
Results pgtype.JSONB
// timestamp when record was synced into the MergeStat database
MergestatSyncedAt time.Time
}
// Trivy repo scans
type TrivyRepoScan struct {
// foreign key for public.repos.id
RepoID uuid.UUID
// JSON results from Trivy repo scan
Results pgtype.JSONB
// timestamp when record was synced into the MergeStat database
MergestatSyncedAt time.Time
}
type TrivyRepoVulnerability struct {
// foreign key for public.repos.id
RepoID uuid.UUID
// vulnerability JSON results of Trivy scan
Vulnerability pgtype.JSONB
// vulnerability target
Target interface{}
// vulnerability class
Class interface{}
// vulnerability type
Type interface{}
// vulnerability id
VulnerabilityID interface{}
// vulnerability package name
VulnerabilityPkgName interface{}
// vulnerability installed version
VulnerabilityInstalledVersion interface{}
// vulnerability severity
VulnerabilitySeverity interface{}
// vulnerability title
VulnerabilityTitle interface{}
// vulnerability description
VulnerabilityDescription interface{}
// timestamp when record was synced into the MergeStat database
MergestatSyncedAt time.Time
}
type YelpDetectSecretsRepoDetection struct {
// foreign key for public.repos.id
RepoID uuid.UUID
// detection type
Type interface{}
// detection filename
Filename interface{}
// detection is verified
IsVerified interface{}
// detection line number
LineNumber interface{}
// detection secret
HashedSecret interface{}
// detection version
Version interface{}
// detection generated at
GeneratedAt interface{}
// detection filters used
FiltersUsed interface{}
// detection plugins used
PluginsUsed interface{}
}
// scan output of a Yelp detect-secrets repo scan
type YelpDetectSecretsRepoScan struct {
// foreign key for public.repos.id
RepoID uuid.UUID
// JSON output of a Yelp detect-secrets scan
Results pgtype.JSONB
}