-
Notifications
You must be signed in to change notification settings - Fork 111
Expand file tree
/
Copy pathmodels.go
More file actions
766 lines (672 loc) · 22.9 KB
/
Copy pathmodels.go
File metadata and controls
766 lines (672 loc) · 22.9 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
// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.31.1
package db
import (
"database/sql"
"database/sql/driver"
"encoding/json"
"fmt"
"time"
"github.com/google/uuid"
"github.com/sqlc-dev/pqtype"
)
type ActionType string
const (
ActionTypeOn ActionType = "on"
ActionTypeOff ActionType = "off"
ActionTypeDryRun ActionType = "dry_run"
)
func (e *ActionType) Scan(src interface{}) error {
switch s := src.(type) {
case []byte:
*e = ActionType(s)
case string:
*e = ActionType(s)
default:
return fmt.Errorf("unsupported scan type for ActionType: %T", src)
}
return nil
}
type NullActionType struct {
ActionType ActionType `json:"action_type"`
Valid bool `json:"valid"` // Valid is true if ActionType is not NULL
}
// Scan implements the Scanner interface.
func (ns *NullActionType) Scan(value interface{}) error {
if value == nil {
ns.ActionType, ns.Valid = "", false
return nil
}
ns.Valid = true
return ns.ActionType.Scan(value)
}
// Value implements the driver Valuer interface.
func (ns NullActionType) Value() (driver.Value, error) {
if !ns.Valid {
return nil, nil
}
return string(ns.ActionType), nil
}
type AlertStatusTypes string
const (
AlertStatusTypesOn AlertStatusTypes = "on"
AlertStatusTypesOff AlertStatusTypes = "off"
AlertStatusTypesError AlertStatusTypes = "error"
AlertStatusTypesSkipped AlertStatusTypes = "skipped"
AlertStatusTypesNotAvailable AlertStatusTypes = "not_available"
)
func (e *AlertStatusTypes) Scan(src interface{}) error {
switch s := src.(type) {
case []byte:
*e = AlertStatusTypes(s)
case string:
*e = AlertStatusTypes(s)
default:
return fmt.Errorf("unsupported scan type for AlertStatusTypes: %T", src)
}
return nil
}
type NullAlertStatusTypes struct {
AlertStatusTypes AlertStatusTypes `json:"alert_status_types"`
Valid bool `json:"valid"` // Valid is true if AlertStatusTypes is not NULL
}
// Scan implements the Scanner interface.
func (ns *NullAlertStatusTypes) Scan(value interface{}) error {
if value == nil {
ns.AlertStatusTypes, ns.Valid = "", false
return nil
}
ns.Valid = true
return ns.AlertStatusTypes.Scan(value)
}
// Value implements the driver Valuer interface.
func (ns NullAlertStatusTypes) Value() (driver.Value, error) {
if !ns.Valid {
return nil, nil
}
return string(ns.AlertStatusTypes), nil
}
type AuthorizationFlow string
const (
AuthorizationFlowUserInput AuthorizationFlow = "user_input"
AuthorizationFlowOauth2AuthorizationCodeFlow AuthorizationFlow = "oauth2_authorization_code_flow"
AuthorizationFlowGithubAppFlow AuthorizationFlow = "github_app_flow"
AuthorizationFlowNone AuthorizationFlow = "none"
)
func (e *AuthorizationFlow) Scan(src interface{}) error {
switch s := src.(type) {
case []byte:
*e = AuthorizationFlow(s)
case string:
*e = AuthorizationFlow(s)
default:
return fmt.Errorf("unsupported scan type for AuthorizationFlow: %T", src)
}
return nil
}
type NullAuthorizationFlow struct {
AuthorizationFlow AuthorizationFlow `json:"authorization_flow"`
Valid bool `json:"valid"` // Valid is true if AuthorizationFlow is not NULL
}
// Scan implements the Scanner interface.
func (ns *NullAuthorizationFlow) Scan(value interface{}) error {
if value == nil {
ns.AuthorizationFlow, ns.Valid = "", false
return nil
}
ns.Valid = true
return ns.AuthorizationFlow.Scan(value)
}
// Value implements the driver Valuer interface.
func (ns NullAuthorizationFlow) Value() (driver.Value, error) {
if !ns.Valid {
return nil, nil
}
return string(ns.AuthorizationFlow), nil
}
type Entities string
const (
EntitiesRepository Entities = "repository"
EntitiesBuildEnvironment Entities = "build_environment"
EntitiesArtifact Entities = "artifact"
EntitiesPullRequest Entities = "pull_request"
EntitiesRelease Entities = "release"
EntitiesPipelineRun Entities = "pipeline_run"
EntitiesTaskRun Entities = "task_run"
EntitiesBuild Entities = "build"
)
func (e *Entities) Scan(src interface{}) error {
switch s := src.(type) {
case []byte:
*e = Entities(s)
case string:
*e = Entities(s)
default:
return fmt.Errorf("unsupported scan type for Entities: %T", src)
}
return nil
}
type NullEntities struct {
Entities Entities `json:"entities"`
Valid bool `json:"valid"` // Valid is true if Entities is not NULL
}
// Scan implements the Scanner interface.
func (ns *NullEntities) Scan(value interface{}) error {
if value == nil {
ns.Entities, ns.Valid = "", false
return nil
}
ns.Valid = true
return ns.Entities.Scan(value)
}
// Value implements the driver Valuer interface.
func (ns NullEntities) Value() (driver.Value, error) {
if !ns.Valid {
return nil, nil
}
return string(ns.Entities), nil
}
type EvalStatusTypes string
const (
EvalStatusTypesSuccess EvalStatusTypes = "success"
EvalStatusTypesFailure EvalStatusTypes = "failure"
EvalStatusTypesError EvalStatusTypes = "error"
EvalStatusTypesSkipped EvalStatusTypes = "skipped"
EvalStatusTypesPending EvalStatusTypes = "pending"
)
func (e *EvalStatusTypes) Scan(src interface{}) error {
switch s := src.(type) {
case []byte:
*e = EvalStatusTypes(s)
case string:
*e = EvalStatusTypes(s)
default:
return fmt.Errorf("unsupported scan type for EvalStatusTypes: %T", src)
}
return nil
}
type NullEvalStatusTypes struct {
EvalStatusTypes EvalStatusTypes `json:"eval_status_types"`
Valid bool `json:"valid"` // Valid is true if EvalStatusTypes is not NULL
}
// Scan implements the Scanner interface.
func (ns *NullEvalStatusTypes) Scan(value interface{}) error {
if value == nil {
ns.EvalStatusTypes, ns.Valid = "", false
return nil
}
ns.Valid = true
return ns.EvalStatusTypes.Scan(value)
}
// Value implements the driver Valuer interface.
func (ns NullEvalStatusTypes) Value() (driver.Value, error) {
if !ns.Valid {
return nil, nil
}
return string(ns.EvalStatusTypes), nil
}
type ProviderClass string
const (
ProviderClassGithub ProviderClass = "github"
ProviderClassGithubApp ProviderClass = "github-app"
ProviderClassGhcr ProviderClass = "ghcr"
ProviderClassDockerhub ProviderClass = "dockerhub"
ProviderClassGitlab ProviderClass = "gitlab"
)
func (e *ProviderClass) Scan(src interface{}) error {
switch s := src.(type) {
case []byte:
*e = ProviderClass(s)
case string:
*e = ProviderClass(s)
default:
return fmt.Errorf("unsupported scan type for ProviderClass: %T", src)
}
return nil
}
type NullProviderClass struct {
ProviderClass ProviderClass `json:"provider_class"`
Valid bool `json:"valid"` // Valid is true if ProviderClass is not NULL
}
// Scan implements the Scanner interface.
func (ns *NullProviderClass) Scan(value interface{}) error {
if value == nil {
ns.ProviderClass, ns.Valid = "", false
return nil
}
ns.Valid = true
return ns.ProviderClass.Scan(value)
}
// Value implements the driver Valuer interface.
func (ns NullProviderClass) Value() (driver.Value, error) {
if !ns.Valid {
return nil, nil
}
return string(ns.ProviderClass), nil
}
type ProviderType string
const (
ProviderTypeGithub ProviderType = "github"
ProviderTypeRest ProviderType = "rest"
ProviderTypeGit ProviderType = "git"
ProviderTypeOci ProviderType = "oci"
ProviderTypeRepoLister ProviderType = "repo-lister"
ProviderTypeImageLister ProviderType = "image-lister"
)
func (e *ProviderType) Scan(src interface{}) error {
switch s := src.(type) {
case []byte:
*e = ProviderType(s)
case string:
*e = ProviderType(s)
default:
return fmt.Errorf("unsupported scan type for ProviderType: %T", src)
}
return nil
}
type NullProviderType struct {
ProviderType ProviderType `json:"provider_type"`
Valid bool `json:"valid"` // Valid is true if ProviderType is not NULL
}
// Scan implements the Scanner interface.
func (ns *NullProviderType) Scan(value interface{}) error {
if value == nil {
ns.ProviderType, ns.Valid = "", false
return nil
}
ns.Valid = true
return ns.ProviderType.Scan(value)
}
// Value implements the driver Valuer interface.
func (ns NullProviderType) Value() (driver.Value, error) {
if !ns.Valid {
return nil, nil
}
return string(ns.ProviderType), nil
}
type ReleaseStatus string
const (
ReleaseStatusAlpha ReleaseStatus = "alpha"
ReleaseStatusBeta ReleaseStatus = "beta"
ReleaseStatusGa ReleaseStatus = "ga"
ReleaseStatusDeprecated ReleaseStatus = "deprecated"
)
func (e *ReleaseStatus) Scan(src interface{}) error {
switch s := src.(type) {
case []byte:
*e = ReleaseStatus(s)
case string:
*e = ReleaseStatus(s)
default:
return fmt.Errorf("unsupported scan type for ReleaseStatus: %T", src)
}
return nil
}
type NullReleaseStatus struct {
ReleaseStatus ReleaseStatus `json:"release_status"`
Valid bool `json:"valid"` // Valid is true if ReleaseStatus is not NULL
}
// Scan implements the Scanner interface.
func (ns *NullReleaseStatus) Scan(value interface{}) error {
if value == nil {
ns.ReleaseStatus, ns.Valid = "", false
return nil
}
ns.Valid = true
return ns.ReleaseStatus.Scan(value)
}
// Value implements the driver Valuer interface.
func (ns NullReleaseStatus) Value() (driver.Value, error) {
if !ns.Valid {
return nil, nil
}
return string(ns.ReleaseStatus), nil
}
type RemediationStatusTypes string
const (
RemediationStatusTypesSuccess RemediationStatusTypes = "success"
RemediationStatusTypesFailure RemediationStatusTypes = "failure"
RemediationStatusTypesError RemediationStatusTypes = "error"
RemediationStatusTypesSkipped RemediationStatusTypes = "skipped"
RemediationStatusTypesNotAvailable RemediationStatusTypes = "not_available"
RemediationStatusTypesPending RemediationStatusTypes = "pending"
)
func (e *RemediationStatusTypes) Scan(src interface{}) error {
switch s := src.(type) {
case []byte:
*e = RemediationStatusTypes(s)
case string:
*e = RemediationStatusTypes(s)
default:
return fmt.Errorf("unsupported scan type for RemediationStatusTypes: %T", src)
}
return nil
}
type NullRemediationStatusTypes struct {
RemediationStatusTypes RemediationStatusTypes `json:"remediation_status_types"`
Valid bool `json:"valid"` // Valid is true if RemediationStatusTypes is not NULL
}
// Scan implements the Scanner interface.
func (ns *NullRemediationStatusTypes) Scan(value interface{}) error {
if value == nil {
ns.RemediationStatusTypes, ns.Valid = "", false
return nil
}
ns.Valid = true
return ns.RemediationStatusTypes.Scan(value)
}
// Value implements the driver Valuer interface.
func (ns NullRemediationStatusTypes) Value() (driver.Value, error) {
if !ns.Valid {
return nil, nil
}
return string(ns.RemediationStatusTypes), nil
}
type Severity string
const (
SeverityUnknown Severity = "unknown"
SeverityInfo Severity = "info"
SeverityLow Severity = "low"
SeverityMedium Severity = "medium"
SeverityHigh Severity = "high"
SeverityCritical Severity = "critical"
)
func (e *Severity) Scan(src interface{}) error {
switch s := src.(type) {
case []byte:
*e = Severity(s)
case string:
*e = Severity(s)
default:
return fmt.Errorf("unsupported scan type for Severity: %T", src)
}
return nil
}
type NullSeverity struct {
Severity Severity `json:"severity"`
Valid bool `json:"valid"` // Valid is true if Severity is not NULL
}
// Scan implements the Scanner interface.
func (ns *NullSeverity) Scan(value interface{}) error {
if value == nil {
ns.Severity, ns.Valid = "", false
return nil
}
ns.Valid = true
return ns.Severity.Scan(value)
}
// Value implements the driver Valuer interface.
func (ns NullSeverity) Value() (driver.Value, error) {
if !ns.Valid {
return nil, nil
}
return string(ns.Severity), nil
}
type AlertEvent struct {
ID uuid.UUID `json:"id"`
EvaluationID uuid.UUID `json:"evaluation_id"`
Status AlertStatusTypes `json:"status"`
Details string `json:"details"`
Metadata json.RawMessage `json:"metadata"`
CreatedAt time.Time `json:"created_at"`
}
type Bundle struct {
ID uuid.UUID `json:"id"`
Namespace string `json:"namespace"`
Name string `json:"name"`
}
type DataSource struct {
ID uuid.UUID `json:"id"`
Name string `json:"name"`
DisplayName string `json:"display_name"`
ProjectID uuid.UUID `json:"project_id"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
SubscriptionID uuid.NullUUID `json:"subscription_id"`
Metadata pqtype.NullRawMessage `json:"metadata"`
}
type DataSourcesFunction struct {
ID uuid.UUID `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
DataSourceID uuid.UUID `json:"data_source_id"`
Definition json.RawMessage `json:"definition"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
ProjectID uuid.UUID `json:"project_id"`
}
type Entitlement struct {
ID uuid.UUID `json:"id"`
Feature string `json:"feature"`
ProjectID uuid.UUID `json:"project_id"`
CreatedAt time.Time `json:"created_at"`
}
type EntityExecutionLock struct {
ID uuid.UUID `json:"id"`
Entity Entities `json:"entity"`
LockedBy uuid.UUID `json:"locked_by"`
LastLockTime time.Time `json:"last_lock_time"`
ProjectID uuid.UUID `json:"project_id"`
EntityInstanceID uuid.UUID `json:"entity_instance_id"`
}
type EntityInstance struct {
ID uuid.UUID `json:"id"`
EntityType Entities `json:"entity_type"`
Name string `json:"name"`
ProjectID uuid.UUID `json:"project_id"`
ProviderID uuid.UUID `json:"provider_id"`
CreatedAt time.Time `json:"created_at"`
OriginatedFrom uuid.NullUUID `json:"originated_from"`
}
type EntityProfile struct {
ID uuid.UUID `json:"id"`
Entity Entities `json:"entity"`
ProfileID uuid.UUID `json:"profile_id"`
ContextualRules json.RawMessage `json:"contextual_rules"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Migrated bool `json:"migrated"`
}
type EvaluationOutput struct {
ID uuid.UUID `json:"id"`
Output pqtype.NullRawMessage `json:"output"`
Debug sql.NullString `json:"debug"`
}
type EvaluationRuleEntity struct {
ID uuid.UUID `json:"id"`
RuleID uuid.UUID `json:"rule_id"`
EntityType Entities `json:"entity_type"`
EntityInstanceID uuid.UUID `json:"entity_instance_id"`
}
type EvaluationStatus struct {
ID uuid.UUID `json:"id"`
RuleEntityID uuid.UUID `json:"rule_entity_id"`
Status EvalStatusTypes `json:"status"`
Details string `json:"details"`
EvaluationTime time.Time `json:"evaluation_time"`
Checkpoint json.RawMessage `json:"checkpoint"`
}
type Feature struct {
Name string `json:"name"`
Settings json.RawMessage `json:"settings"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type FlushCache struct {
ID uuid.UUID `json:"id"`
Entity Entities `json:"entity"`
QueuedAt time.Time `json:"queued_at"`
ProjectID uuid.UUID `json:"project_id"`
EntityInstanceID uuid.UUID `json:"entity_instance_id"`
}
type LatestEvaluationStatus struct {
RuleEntityID uuid.UUID `json:"rule_entity_id"`
EvaluationHistoryID uuid.UUID `json:"evaluation_history_id"`
ProfileID uuid.UUID `json:"profile_id"`
}
type Profile struct {
ID uuid.UUID `json:"id"`
Name string `json:"name"`
Provider sql.NullString `json:"provider"`
ProjectID uuid.UUID `json:"project_id"`
Remediate NullActionType `json:"remediate"`
Alert NullActionType `json:"alert"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
ProviderID uuid.NullUUID `json:"provider_id"`
SubscriptionID uuid.NullUUID `json:"subscription_id"`
DisplayName string `json:"display_name"`
Labels []string `json:"labels"`
}
type ProfileSelector struct {
ID uuid.UUID `json:"id"`
ProfileID uuid.UUID `json:"profile_id"`
Entity NullEntities `json:"entity"`
Selector string `json:"selector"`
Comment string `json:"comment"`
}
type ProfileStatus struct {
ID uuid.UUID `json:"id"`
ProfileID uuid.UUID `json:"profile_id"`
ProfileStatus EvalStatusTypes `json:"profile_status"`
LastUpdated time.Time `json:"last_updated"`
}
type ProfilesWithEntityProfile struct {
ID uuid.NullUUID `json:"id"`
Entity NullEntities `json:"entity"`
ProfileID uuid.NullUUID `json:"profile_id"`
ContextualRules pqtype.NullRawMessage `json:"contextual_rules"`
CreatedAt sql.NullTime `json:"created_at"`
UpdatedAt sql.NullTime `json:"updated_at"`
Migrated sql.NullBool `json:"migrated"`
Profid uuid.UUID `json:"profid"`
}
type Project struct {
ID uuid.UUID `json:"id"`
Name string `json:"name"`
IsOrganization bool `json:"is_organization"`
Metadata json.RawMessage `json:"metadata"`
ParentID uuid.NullUUID `json:"parent_id"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type Property struct {
ID uuid.UUID `json:"id"`
EntityID uuid.UUID `json:"entity_id"`
Key string `json:"key"`
Value json.RawMessage `json:"value"`
UpdatedAt time.Time `json:"updated_at"`
}
type Provider struct {
ID uuid.UUID `json:"id"`
Name string `json:"name"`
Version string `json:"version"`
ProjectID uuid.UUID `json:"project_id"`
Implements []ProviderType `json:"implements"`
Definition json.RawMessage `json:"definition"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
AuthFlows []AuthorizationFlow `json:"auth_flows"`
Class ProviderClass `json:"class"`
}
type ProviderAccessToken struct {
ID int32 `json:"id"`
Provider string `json:"provider"`
ProjectID uuid.UUID `json:"project_id"`
OwnerFilter sql.NullString `json:"owner_filter"`
EncryptedToken sql.NullString `json:"encrypted_token"`
ExpirationTime time.Time `json:"expiration_time"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
EnrollmentNonce sql.NullString `json:"enrollment_nonce"`
EncryptedAccessToken pqtype.NullRawMessage `json:"encrypted_access_token"`
}
type ProviderGithubAppInstallation struct {
AppInstallationID int64 `json:"app_installation_id"`
ProviderID uuid.NullUUID `json:"provider_id"`
OrganizationID int64 `json:"organization_id"`
EnrollingUserID sql.NullString `json:"enrolling_user_id"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
EnrollmentNonce sql.NullString `json:"enrollment_nonce"`
ProjectID uuid.NullUUID `json:"project_id"`
IsOrg bool `json:"is_org"`
}
type RemediationEvent struct {
ID uuid.UUID `json:"id"`
EvaluationID uuid.UUID `json:"evaluation_id"`
Status RemediationStatusTypes `json:"status"`
Details string `json:"details"`
Metadata json.RawMessage `json:"metadata"`
CreatedAt time.Time `json:"created_at"`
}
type RuleInstance struct {
ID uuid.UUID `json:"id"`
ProfileID uuid.UUID `json:"profile_id"`
RuleTypeID uuid.UUID `json:"rule_type_id"`
Name string `json:"name"`
EntityType Entities `json:"entity_type"`
Def json.RawMessage `json:"def"`
Params json.RawMessage `json:"params"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
ProjectID uuid.UUID `json:"project_id"`
}
type RuleType struct {
ID uuid.UUID `json:"id"`
Name string `json:"name"`
Provider sql.NullString `json:"provider"`
ProjectID uuid.UUID `json:"project_id"`
Description string `json:"description"`
Guidance string `json:"guidance"`
Definition json.RawMessage `json:"definition"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
SeverityValue Severity `json:"severity_value"`
ProviderID uuid.NullUUID `json:"provider_id"`
SubscriptionID uuid.NullUUID `json:"subscription_id"`
DisplayName string `json:"display_name"`
ReleasePhase ReleaseStatus `json:"release_phase"`
ShortFailureMessage string `json:"short_failure_message"`
RegoVersion string `json:"rego_version"`
}
type RuleTypeDataSource struct {
RuleTypeID uuid.UUID `json:"rule_type_id"`
DataSourcesID uuid.UUID `json:"data_sources_id"`
ProjectID uuid.UUID `json:"project_id"`
}
type SessionStore struct {
ID int32 `json:"id"`
Provider string `json:"provider"`
ProjectID uuid.UUID `json:"project_id"`
Port sql.NullInt32 `json:"port"`
OwnerFilter sql.NullString `json:"owner_filter"`
SessionState string `json:"session_state"`
CreatedAt time.Time `json:"created_at"`
RedirectUrl sql.NullString `json:"redirect_url"`
RemoteUser sql.NullString `json:"remote_user"`
EncryptedRedirect pqtype.NullRawMessage `json:"encrypted_redirect"`
ProviderConfig []byte `json:"provider_config"`
}
type Subscription struct {
ID uuid.UUID `json:"id"`
ProjectID uuid.UUID `json:"project_id"`
BundleID uuid.UUID `json:"bundle_id"`
CurrentVersion string `json:"current_version"`
}
type User struct {
ID int32 `json:"id"`
IdentitySubject string `json:"identity_subject"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type UserInvite struct {
Code string `json:"code"`
Email string `json:"email"`
Role string `json:"role"`
Project uuid.UUID `json:"project"`
Sponsor int32 `json:"sponsor"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}