forked from bufbuild/buf
/
event.pb.go
4949 lines (4418 loc) · 219 KB
/
event.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
// Copyright 2020-2024 Buf Technologies, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc (unknown)
// source: buf/alpha/audit/v1alpha1/event.proto
package auditv1alpha1
import (
v1alpha1 "github.com/alis-exchange/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
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)
)
// ActorType is the type of actor that caused the audited event.
type ActorType int32
const (
ActorType_ACTOR_TYPE_UNSPECIFIED ActorType = 0
ActorType_ACTOR_TYPE_USER ActorType = 1
ActorType_ACTOR_TYPE_SYSTEM ActorType = 2
)
// Enum value maps for ActorType.
var (
ActorType_name = map[int32]string{
0: "ACTOR_TYPE_UNSPECIFIED",
1: "ACTOR_TYPE_USER",
2: "ACTOR_TYPE_SYSTEM",
}
ActorType_value = map[string]int32{
"ACTOR_TYPE_UNSPECIFIED": 0,
"ACTOR_TYPE_USER": 1,
"ACTOR_TYPE_SYSTEM": 2,
}
)
func (x ActorType) Enum() *ActorType {
p := new(ActorType)
*p = x
return p
}
func (x ActorType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ActorType) Descriptor() protoreflect.EnumDescriptor {
return file_buf_alpha_audit_v1alpha1_event_proto_enumTypes[0].Descriptor()
}
func (ActorType) Type() protoreflect.EnumType {
return &file_buf_alpha_audit_v1alpha1_event_proto_enumTypes[0]
}
func (x ActorType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ActorType.Descriptor instead.
func (ActorType) EnumDescriptor() ([]byte, []int) {
return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{0}
}
// ResourceType is the type of the resource that was affected by the audited
// event.
type ResourceType int32
const (
ResourceType_RESOURCE_TYPE_UNSPECIFIED ResourceType = 0
ResourceType_RESOURCE_TYPE_USER ResourceType = 1
ResourceType_RESOURCE_TYPE_ORGANIZATION ResourceType = 2
ResourceType_RESOURCE_TYPE_ORGANIZATION_MEMBER ResourceType = 3
ResourceType_RESOURCE_TYPE_ORGANIZATION_IDP_GROUP ResourceType = 9
ResourceType_RESOURCE_TYPE_REPOSITORY ResourceType = 4
ResourceType_RESOURCE_TYPE_REPOSITORY_CONTRIBUTOR ResourceType = 5
ResourceType_RESOURCE_TYPE_REPOSITORY_COMMIT ResourceType = 6
ResourceType_RESOURCE_TYPE_CURATED_PLUGIN ResourceType = 8
ResourceType_RESOURCE_TYPE_TOKEN ResourceType = 10
ResourceType_RESOURCE_TYPE_SCIM_TOKEN ResourceType = 11
ResourceType_RESOURCE_TYPE_REPOSITORY_LABEL ResourceType = 12
ResourceType_RESOURCE_TYPE_SERVER ResourceType = 13
)
// Enum value maps for ResourceType.
var (
ResourceType_name = map[int32]string{
0: "RESOURCE_TYPE_UNSPECIFIED",
1: "RESOURCE_TYPE_USER",
2: "RESOURCE_TYPE_ORGANIZATION",
3: "RESOURCE_TYPE_ORGANIZATION_MEMBER",
9: "RESOURCE_TYPE_ORGANIZATION_IDP_GROUP",
4: "RESOURCE_TYPE_REPOSITORY",
5: "RESOURCE_TYPE_REPOSITORY_CONTRIBUTOR",
6: "RESOURCE_TYPE_REPOSITORY_COMMIT",
8: "RESOURCE_TYPE_CURATED_PLUGIN",
10: "RESOURCE_TYPE_TOKEN",
11: "RESOURCE_TYPE_SCIM_TOKEN",
12: "RESOURCE_TYPE_REPOSITORY_LABEL",
13: "RESOURCE_TYPE_SERVER",
}
ResourceType_value = map[string]int32{
"RESOURCE_TYPE_UNSPECIFIED": 0,
"RESOURCE_TYPE_USER": 1,
"RESOURCE_TYPE_ORGANIZATION": 2,
"RESOURCE_TYPE_ORGANIZATION_MEMBER": 3,
"RESOURCE_TYPE_ORGANIZATION_IDP_GROUP": 9,
"RESOURCE_TYPE_REPOSITORY": 4,
"RESOURCE_TYPE_REPOSITORY_CONTRIBUTOR": 5,
"RESOURCE_TYPE_REPOSITORY_COMMIT": 6,
"RESOURCE_TYPE_CURATED_PLUGIN": 8,
"RESOURCE_TYPE_TOKEN": 10,
"RESOURCE_TYPE_SCIM_TOKEN": 11,
"RESOURCE_TYPE_REPOSITORY_LABEL": 12,
"RESOURCE_TYPE_SERVER": 13,
}
)
func (x ResourceType) Enum() *ResourceType {
p := new(ResourceType)
*p = x
return p
}
func (x ResourceType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ResourceType) Descriptor() protoreflect.EnumDescriptor {
return file_buf_alpha_audit_v1alpha1_event_proto_enumTypes[1].Descriptor()
}
func (ResourceType) Type() protoreflect.EnumType {
return &file_buf_alpha_audit_v1alpha1_event_proto_enumTypes[1]
}
func (x ResourceType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ResourceType.Descriptor instead.
func (ResourceType) EnumDescriptor() ([]byte, []int) {
return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{1}
}
// EventType is the type of audited event.
type EventType int32
const (
EventType_EVENT_TYPE_UNSPECIFIED EventType = 0
EventType_EVENT_TYPE_ORGANIZATION_CREATED EventType = 1
EventType_EVENT_TYPE_ORGANIZATION_DELETED EventType = 2
EventType_EVENT_TYPE_ORGANIZATION_MEMBER_ADDED EventType = 3
EventType_EVENT_TYPE_ORGANIZATION_MEMBER_ROLE_CHANGED EventType = 4
EventType_EVENT_TYPE_ORGANIZATION_MEMBER_REMOVED EventType = 5
EventType_EVENT_TYPE_ORGANIZATION_IDP_GROUP_ADDED EventType = 21
EventType_EVENT_TYPE_ORGANIZATION_IDP_GROUP_REMOVED EventType = 22
EventType_EVENT_TYPE_REPOSITORY_CREATED EventType = 6
EventType_EVENT_TYPE_REPOSITORY_DELETED EventType = 7
EventType_EVENT_TYPE_REPOSITORY_COMMIT_PUSHED EventType = 8
EventType_EVENT_TYPE_REPOSITORY_CONTRIBUTOR_ADDED EventType = 9
EventType_EVENT_TYPE_REPOSITORY_CONTRIBUTOR_ROLE_CHANGED EventType = 10
EventType_EVENT_TYPE_REPOSITORY_CONTRIBUTOR_REMOVED EventType = 11
EventType_EVENT_TYPE_REPOSITORY_VISIBILITY_CHANGED EventType = 12
// Deprecated: Marked as deprecated in buf/alpha/audit/v1alpha1/event.proto.
EventType_EVENT_TYPE_PLUGIN_CREATED EventType = 13
// Deprecated: Marked as deprecated in buf/alpha/audit/v1alpha1/event.proto.
EventType_EVENT_TYPE_PLUGIN_DELETED EventType = 14
EventType_EVENT_TYPE_CURATED_PLUGIN_CREATED EventType = 20
EventType_EVENT_TYPE_CURATED_PLUGIN_DELETED EventType = 31
EventType_EVENT_TYPE_USER_CREATED EventType = 15
EventType_EVENT_TYPE_USER_DELETED EventType = 16
EventType_EVENT_TYPE_USER_DEACTIVATED EventType = 17
EventType_EVENT_TYPE_USER_LOGGED_IN EventType = 18
EventType_EVENT_TYPE_USER_LOGGED_OUT EventType = 19
EventType_EVENT_TYPE_TOKEN_CREATED EventType = 23
EventType_EVENT_TYPE_TOKEN_DELETED EventType = 24
EventType_EVENT_TYPE_USER_REACTIVATED EventType = 25
EventType_EVENT_TYPE_SCIM_TOKEN_CREATED EventType = 26
EventType_EVENT_TYPE_SCIM_TOKEN_DELETED EventType = 27
EventType_EVENT_TYPE_REPOSITORY_COMMIT_DELETED EventType = 28
EventType_EVENT_TYPE_REPOSITORY_LABEL_CREATED EventType = 29
EventType_EVENT_TYPE_REPOSITORY_LABEL_MOVED EventType = 30
EventType_EVENT_TYPE_REPOSITORY_LABEL_ARCHIVED EventType = 38
EventType_EVENT_TYPE_REPOSITORY_LABEL_UNARCHIVED EventType = 39
EventType_EVENT_TYPE_SERVER_BREAKING_CHANGE_POLICY_ENABLED EventType = 32
EventType_EVENT_TYPE_SERVER_BREAKING_CHANGE_POLICY_DISABLED EventType = 33
EventType_EVENT_TYPE_REPOSITORY_DEFAULT_BRANCH_CHANGED EventType = 34
EventType_EVENT_TYPE_SERVER_UNIQUENESS_POLICY_ENABLED EventType = 35
EventType_EVENT_TYPE_SERVER_UNIQUENESS_POLICY_DISABLED EventType = 36
EventType_EVENT_TYPE_USER_AUTO_MERGED_FROM_NEW_IDP EventType = 37
)
// Enum value maps for EventType.
var (
EventType_name = map[int32]string{
0: "EVENT_TYPE_UNSPECIFIED",
1: "EVENT_TYPE_ORGANIZATION_CREATED",
2: "EVENT_TYPE_ORGANIZATION_DELETED",
3: "EVENT_TYPE_ORGANIZATION_MEMBER_ADDED",
4: "EVENT_TYPE_ORGANIZATION_MEMBER_ROLE_CHANGED",
5: "EVENT_TYPE_ORGANIZATION_MEMBER_REMOVED",
21: "EVENT_TYPE_ORGANIZATION_IDP_GROUP_ADDED",
22: "EVENT_TYPE_ORGANIZATION_IDP_GROUP_REMOVED",
6: "EVENT_TYPE_REPOSITORY_CREATED",
7: "EVENT_TYPE_REPOSITORY_DELETED",
8: "EVENT_TYPE_REPOSITORY_COMMIT_PUSHED",
9: "EVENT_TYPE_REPOSITORY_CONTRIBUTOR_ADDED",
10: "EVENT_TYPE_REPOSITORY_CONTRIBUTOR_ROLE_CHANGED",
11: "EVENT_TYPE_REPOSITORY_CONTRIBUTOR_REMOVED",
12: "EVENT_TYPE_REPOSITORY_VISIBILITY_CHANGED",
13: "EVENT_TYPE_PLUGIN_CREATED",
14: "EVENT_TYPE_PLUGIN_DELETED",
20: "EVENT_TYPE_CURATED_PLUGIN_CREATED",
31: "EVENT_TYPE_CURATED_PLUGIN_DELETED",
15: "EVENT_TYPE_USER_CREATED",
16: "EVENT_TYPE_USER_DELETED",
17: "EVENT_TYPE_USER_DEACTIVATED",
18: "EVENT_TYPE_USER_LOGGED_IN",
19: "EVENT_TYPE_USER_LOGGED_OUT",
23: "EVENT_TYPE_TOKEN_CREATED",
24: "EVENT_TYPE_TOKEN_DELETED",
25: "EVENT_TYPE_USER_REACTIVATED",
26: "EVENT_TYPE_SCIM_TOKEN_CREATED",
27: "EVENT_TYPE_SCIM_TOKEN_DELETED",
28: "EVENT_TYPE_REPOSITORY_COMMIT_DELETED",
29: "EVENT_TYPE_REPOSITORY_LABEL_CREATED",
30: "EVENT_TYPE_REPOSITORY_LABEL_MOVED",
38: "EVENT_TYPE_REPOSITORY_LABEL_ARCHIVED",
39: "EVENT_TYPE_REPOSITORY_LABEL_UNARCHIVED",
32: "EVENT_TYPE_SERVER_BREAKING_CHANGE_POLICY_ENABLED",
33: "EVENT_TYPE_SERVER_BREAKING_CHANGE_POLICY_DISABLED",
34: "EVENT_TYPE_REPOSITORY_DEFAULT_BRANCH_CHANGED",
35: "EVENT_TYPE_SERVER_UNIQUENESS_POLICY_ENABLED",
36: "EVENT_TYPE_SERVER_UNIQUENESS_POLICY_DISABLED",
37: "EVENT_TYPE_USER_AUTO_MERGED_FROM_NEW_IDP",
}
EventType_value = map[string]int32{
"EVENT_TYPE_UNSPECIFIED": 0,
"EVENT_TYPE_ORGANIZATION_CREATED": 1,
"EVENT_TYPE_ORGANIZATION_DELETED": 2,
"EVENT_TYPE_ORGANIZATION_MEMBER_ADDED": 3,
"EVENT_TYPE_ORGANIZATION_MEMBER_ROLE_CHANGED": 4,
"EVENT_TYPE_ORGANIZATION_MEMBER_REMOVED": 5,
"EVENT_TYPE_ORGANIZATION_IDP_GROUP_ADDED": 21,
"EVENT_TYPE_ORGANIZATION_IDP_GROUP_REMOVED": 22,
"EVENT_TYPE_REPOSITORY_CREATED": 6,
"EVENT_TYPE_REPOSITORY_DELETED": 7,
"EVENT_TYPE_REPOSITORY_COMMIT_PUSHED": 8,
"EVENT_TYPE_REPOSITORY_CONTRIBUTOR_ADDED": 9,
"EVENT_TYPE_REPOSITORY_CONTRIBUTOR_ROLE_CHANGED": 10,
"EVENT_TYPE_REPOSITORY_CONTRIBUTOR_REMOVED": 11,
"EVENT_TYPE_REPOSITORY_VISIBILITY_CHANGED": 12,
"EVENT_TYPE_PLUGIN_CREATED": 13,
"EVENT_TYPE_PLUGIN_DELETED": 14,
"EVENT_TYPE_CURATED_PLUGIN_CREATED": 20,
"EVENT_TYPE_CURATED_PLUGIN_DELETED": 31,
"EVENT_TYPE_USER_CREATED": 15,
"EVENT_TYPE_USER_DELETED": 16,
"EVENT_TYPE_USER_DEACTIVATED": 17,
"EVENT_TYPE_USER_LOGGED_IN": 18,
"EVENT_TYPE_USER_LOGGED_OUT": 19,
"EVENT_TYPE_TOKEN_CREATED": 23,
"EVENT_TYPE_TOKEN_DELETED": 24,
"EVENT_TYPE_USER_REACTIVATED": 25,
"EVENT_TYPE_SCIM_TOKEN_CREATED": 26,
"EVENT_TYPE_SCIM_TOKEN_DELETED": 27,
"EVENT_TYPE_REPOSITORY_COMMIT_DELETED": 28,
"EVENT_TYPE_REPOSITORY_LABEL_CREATED": 29,
"EVENT_TYPE_REPOSITORY_LABEL_MOVED": 30,
"EVENT_TYPE_REPOSITORY_LABEL_ARCHIVED": 38,
"EVENT_TYPE_REPOSITORY_LABEL_UNARCHIVED": 39,
"EVENT_TYPE_SERVER_BREAKING_CHANGE_POLICY_ENABLED": 32,
"EVENT_TYPE_SERVER_BREAKING_CHANGE_POLICY_DISABLED": 33,
"EVENT_TYPE_REPOSITORY_DEFAULT_BRANCH_CHANGED": 34,
"EVENT_TYPE_SERVER_UNIQUENESS_POLICY_ENABLED": 35,
"EVENT_TYPE_SERVER_UNIQUENESS_POLICY_DISABLED": 36,
"EVENT_TYPE_USER_AUTO_MERGED_FROM_NEW_IDP": 37,
}
)
func (x EventType) Enum() *EventType {
p := new(EventType)
*p = x
return p
}
func (x EventType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (EventType) Descriptor() protoreflect.EnumDescriptor {
return file_buf_alpha_audit_v1alpha1_event_proto_enumTypes[2].Descriptor()
}
func (EventType) Type() protoreflect.EnumType {
return &file_buf_alpha_audit_v1alpha1_event_proto_enumTypes[2]
}
func (x EventType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use EventType.Descriptor instead.
func (EventType) EnumDescriptor() ([]byte, []int) {
return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{2}
}
// Actor is the actor who caused the audited event.
type Actor struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Type of actor who caused the audited event.
Type ActorType `protobuf:"varint,1,opt,name=type,proto3,enum=buf.alpha.audit.v1alpha1.ActorType" json:"type,omitempty"`
// Id of the actor who caused the audited event.
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
// Name of the actor who caused the audited event.
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *Actor) Reset() {
*x = Actor{}
if protoimpl.UnsafeEnabled {
mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Actor) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Actor) ProtoMessage() {}
func (x *Actor) ProtoReflect() protoreflect.Message {
mi := &file_buf_alpha_audit_v1alpha1_event_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 Actor.ProtoReflect.Descriptor instead.
func (*Actor) Descriptor() ([]byte, []int) {
return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{0}
}
func (x *Actor) GetType() ActorType {
if x != nil {
return x.Type
}
return ActorType_ACTOR_TYPE_UNSPECIFIED
}
func (x *Actor) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Actor) GetName() string {
if x != nil {
return x.Name
}
return ""
}
// Resource is the affected resource by the audited event.
type Resource struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Type of resource that was affected by the audited event.
Type ResourceType `protobuf:"varint,1,opt,name=type,proto3,enum=buf.alpha.audit.v1alpha1.ResourceType" json:"type,omitempty"`
// Id of the affected resource by the audited event.
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
// Name of the affected resource by the audited event.
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *Resource) Reset() {
*x = Resource{}
if protoimpl.UnsafeEnabled {
mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Resource) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Resource) ProtoMessage() {}
func (x *Resource) ProtoReflect() protoreflect.Message {
mi := &file_buf_alpha_audit_v1alpha1_event_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 Resource.ProtoReflect.Descriptor instead.
func (*Resource) Descriptor() ([]byte, []int) {
return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{1}
}
func (x *Resource) GetType() ResourceType {
if x != nil {
return x.Type
}
return ResourceType_RESOURCE_TYPE_UNSPECIFIED
}
func (x *Resource) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Resource) GetName() string {
if x != nil {
return x.Name
}
return ""
}
// EventMetadata provides additional details about the audited event.
type EventMetadata struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// UserAgent is the User-Agent header associated with the request that triggered the audited event, if any.
UserAgent string `protobuf:"bytes,1,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"`
// IP is the IP address associated with the request that triggered the audited event, if any.
Ip string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"`
// TraceID is the ID of the trace associated with the audited event, if any.
TraceId string `protobuf:"bytes,3,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"`
}
func (x *EventMetadata) Reset() {
*x = EventMetadata{}
if protoimpl.UnsafeEnabled {
mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EventMetadata) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EventMetadata) ProtoMessage() {}
func (x *EventMetadata) ProtoReflect() protoreflect.Message {
mi := &file_buf_alpha_audit_v1alpha1_event_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 EventMetadata.ProtoReflect.Descriptor instead.
func (*EventMetadata) Descriptor() ([]byte, []int) {
return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{2}
}
func (x *EventMetadata) GetUserAgent() string {
if x != nil {
return x.UserAgent
}
return ""
}
func (x *EventMetadata) GetIp() string {
if x != nil {
return x.Ip
}
return ""
}
func (x *EventMetadata) GetTraceId() string {
if x != nil {
return x.TraceId
}
return ""
}
// Event is an audited action that happened in the BSR, with the information of
// what happened, when it happened, who did it, which resource was affected, and
// more contextual information on the event.
type Event struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Unique id of the audited event.
EventId string `protobuf:"bytes,1,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"`
// Type of the audited event. It specifies "what" happened.
Type EventType `protobuf:"varint,2,opt,name=type,proto3,enum=buf.alpha.audit.v1alpha1.EventType" json:"type,omitempty"`
// Actor of the audited event. It specifies "who" did it.
Actor *Actor `protobuf:"bytes,3,opt,name=actor,proto3" json:"actor,omitempty"`
// Resource of the audited event. It specifies "which resource" was affected.
Resource *Resource `protobuf:"bytes,4,opt,name=resource,proto3" json:"resource,omitempty"`
// Time of the audited event. It specifies "when" it happened.
EventTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=event_time,json=eventTime,proto3" json:"event_time,omitempty"`
// Metadata about the audited event. It specifies any additional details about the audited event.
Metadata *EventMetadata `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"`
// Payload of the audited event. It specifies additional context on the event.
//
// Types that are assignable to Payload:
//
// *Event_OrganizationCreated
// *Event_OrganizationDeleted
// *Event_OrganizationMemberAdded
// *Event_OrganizationMemberRoleChanged
// *Event_OrganizationMemberRemoved
// *Event_RepositoryCreated
// *Event_RepositoryDeleted
// *Event_RepositoryCommitPushed
// *Event_RepositoryContributorAdded
// *Event_RepositoryContributorRoleChanged
// *Event_RepositoryContributorRemoved
// *Event_RepositoryVisibilityChanged
// *Event_UserCreated
// *Event_UserDeactivated
// *Event_UserDeleted
// *Event_UserLoggedIn
// *Event_UserLoggedOut
// *Event_CuratedPluginCreated
// *Event_IdpGroupAdded
// *Event_IdpGroupRemoved
// *Event_TokenCreated
// *Event_TokenDeleted
// *Event_UserReactivated
// *Event_ScimTokenCreated
// *Event_ScimTokenDeleted
// *Event_RepositoryCommitDeleted
// *Event_RepositoryLabelCreated
// *Event_RepositoryLabelMoved
// *Event_RepositoryLabelArchived
// *Event_RepositoryLabelUnarchived
// *Event_CuratedPluginDeleted
// *Event_PayloadServerBreakingChangePolicyEnabled
// *Event_PayloadServerBreakingChangePolicyDisabled
// *Event_RepositoryDefaultBranchChanged
// *Event_PayloadServerUniquenessPolicyEnabled
// *Event_PayloadServerUniquenessPolicyDisabled
// *Event_UserAutoMergedFromNewIdp
Payload isEvent_Payload `protobuf_oneof:"payload"`
}
func (x *Event) Reset() {
*x = Event{}
if protoimpl.UnsafeEnabled {
mi := &file_buf_alpha_audit_v1alpha1_event_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Event) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Event) ProtoMessage() {}
func (x *Event) ProtoReflect() protoreflect.Message {
mi := &file_buf_alpha_audit_v1alpha1_event_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 Event.ProtoReflect.Descriptor instead.
func (*Event) Descriptor() ([]byte, []int) {
return file_buf_alpha_audit_v1alpha1_event_proto_rawDescGZIP(), []int{3}
}
func (x *Event) GetEventId() string {
if x != nil {
return x.EventId
}
return ""
}
func (x *Event) GetType() EventType {
if x != nil {
return x.Type
}
return EventType_EVENT_TYPE_UNSPECIFIED
}
func (x *Event) GetActor() *Actor {
if x != nil {
return x.Actor
}
return nil
}
func (x *Event) GetResource() *Resource {
if x != nil {
return x.Resource
}
return nil
}
func (x *Event) GetEventTime() *timestamppb.Timestamp {
if x != nil {
return x.EventTime
}
return nil
}
func (x *Event) GetMetadata() *EventMetadata {
if x != nil {
return x.Metadata
}
return nil
}
func (m *Event) GetPayload() isEvent_Payload {
if m != nil {
return m.Payload
}
return nil
}
func (x *Event) GetOrganizationCreated() *PayloadOrganizationCreated {
if x, ok := x.GetPayload().(*Event_OrganizationCreated); ok {
return x.OrganizationCreated
}
return nil
}
func (x *Event) GetOrganizationDeleted() *PayloadOrganizationDeleted {
if x, ok := x.GetPayload().(*Event_OrganizationDeleted); ok {
return x.OrganizationDeleted
}
return nil
}
func (x *Event) GetOrganizationMemberAdded() *PayloadOrganizationMemberAdded {
if x, ok := x.GetPayload().(*Event_OrganizationMemberAdded); ok {
return x.OrganizationMemberAdded
}
return nil
}
func (x *Event) GetOrganizationMemberRoleChanged() *PayloadOrganizationMemberRoleChanged {
if x, ok := x.GetPayload().(*Event_OrganizationMemberRoleChanged); ok {
return x.OrganizationMemberRoleChanged
}
return nil
}
func (x *Event) GetOrganizationMemberRemoved() *PayloadOrganizationMemberRemoved {
if x, ok := x.GetPayload().(*Event_OrganizationMemberRemoved); ok {
return x.OrganizationMemberRemoved
}
return nil
}
func (x *Event) GetRepositoryCreated() *PayloadRepositoryCreated {
if x, ok := x.GetPayload().(*Event_RepositoryCreated); ok {
return x.RepositoryCreated
}
return nil
}
func (x *Event) GetRepositoryDeleted() *PayloadRepositoryDeleted {
if x, ok := x.GetPayload().(*Event_RepositoryDeleted); ok {
return x.RepositoryDeleted
}
return nil
}
func (x *Event) GetRepositoryCommitPushed() *PayloadRepositoryCommitPushed {
if x, ok := x.GetPayload().(*Event_RepositoryCommitPushed); ok {
return x.RepositoryCommitPushed
}
return nil
}
func (x *Event) GetRepositoryContributorAdded() *PayloadRepositoryContributorAdded {
if x, ok := x.GetPayload().(*Event_RepositoryContributorAdded); ok {
return x.RepositoryContributorAdded
}
return nil
}
func (x *Event) GetRepositoryContributorRoleChanged() *PayloadRepositoryContributorRoleChanged {
if x, ok := x.GetPayload().(*Event_RepositoryContributorRoleChanged); ok {
return x.RepositoryContributorRoleChanged
}
return nil
}
func (x *Event) GetRepositoryContributorRemoved() *PayloadRepositoryContributorRemoved {
if x, ok := x.GetPayload().(*Event_RepositoryContributorRemoved); ok {
return x.RepositoryContributorRemoved
}
return nil
}
func (x *Event) GetRepositoryVisibilityChanged() *PayloadRepositoryVisibilityChanged {
if x, ok := x.GetPayload().(*Event_RepositoryVisibilityChanged); ok {
return x.RepositoryVisibilityChanged
}
return nil
}
func (x *Event) GetUserCreated() *PayloadUserCreated {
if x, ok := x.GetPayload().(*Event_UserCreated); ok {
return x.UserCreated
}
return nil
}
func (x *Event) GetUserDeactivated() *PayloadUserDeactivated {
if x, ok := x.GetPayload().(*Event_UserDeactivated); ok {
return x.UserDeactivated
}
return nil
}
func (x *Event) GetUserDeleted() *PayloadUserDeleted {
if x, ok := x.GetPayload().(*Event_UserDeleted); ok {
return x.UserDeleted
}
return nil
}
func (x *Event) GetUserLoggedIn() *PayloadUserLoggedIn {
if x, ok := x.GetPayload().(*Event_UserLoggedIn); ok {
return x.UserLoggedIn
}
return nil
}
func (x *Event) GetUserLoggedOut() *PayloadUserLoggedOut {
if x, ok := x.GetPayload().(*Event_UserLoggedOut); ok {
return x.UserLoggedOut
}
return nil
}
func (x *Event) GetCuratedPluginCreated() *PayloadCuratedPluginCreated {
if x, ok := x.GetPayload().(*Event_CuratedPluginCreated); ok {
return x.CuratedPluginCreated
}
return nil
}
func (x *Event) GetIdpGroupAdded() *PayloadOrganizationIDPGroupAdded {
if x, ok := x.GetPayload().(*Event_IdpGroupAdded); ok {
return x.IdpGroupAdded
}
return nil
}
func (x *Event) GetIdpGroupRemoved() *PayloadOrganizationIDPGroupRemoved {
if x, ok := x.GetPayload().(*Event_IdpGroupRemoved); ok {
return x.IdpGroupRemoved
}
return nil
}
func (x *Event) GetTokenCreated() *PayloadTokenCreated {
if x, ok := x.GetPayload().(*Event_TokenCreated); ok {
return x.TokenCreated
}
return nil
}
func (x *Event) GetTokenDeleted() *PayloadTokenDeleted {
if x, ok := x.GetPayload().(*Event_TokenDeleted); ok {
return x.TokenDeleted
}
return nil
}
func (x *Event) GetUserReactivated() *PayloadUserReactivated {
if x, ok := x.GetPayload().(*Event_UserReactivated); ok {
return x.UserReactivated
}
return nil
}
func (x *Event) GetScimTokenCreated() *PayloadSCIMTokenCreated {
if x, ok := x.GetPayload().(*Event_ScimTokenCreated); ok {
return x.ScimTokenCreated
}
return nil
}
func (x *Event) GetScimTokenDeleted() *PayloadSCIMTokenDeleted {
if x, ok := x.GetPayload().(*Event_ScimTokenDeleted); ok {
return x.ScimTokenDeleted
}
return nil
}
func (x *Event) GetRepositoryCommitDeleted() *PayloadRepositoryCommitDeleted {
if x, ok := x.GetPayload().(*Event_RepositoryCommitDeleted); ok {
return x.RepositoryCommitDeleted
}
return nil
}
func (x *Event) GetRepositoryLabelCreated() *PayloadRepositoryLabelCreated {
if x, ok := x.GetPayload().(*Event_RepositoryLabelCreated); ok {
return x.RepositoryLabelCreated
}
return nil
}
func (x *Event) GetRepositoryLabelMoved() *PayloadRepositoryLabelMoved {
if x, ok := x.GetPayload().(*Event_RepositoryLabelMoved); ok {
return x.RepositoryLabelMoved
}
return nil
}
func (x *Event) GetRepositoryLabelArchived() *PayloadRepositoryLabelArchived {
if x, ok := x.GetPayload().(*Event_RepositoryLabelArchived); ok {
return x.RepositoryLabelArchived
}
return nil
}
func (x *Event) GetRepositoryLabelUnarchived() *PayloadRepositoryLabelUnarchived {
if x, ok := x.GetPayload().(*Event_RepositoryLabelUnarchived); ok {
return x.RepositoryLabelUnarchived
}
return nil
}
func (x *Event) GetCuratedPluginDeleted() *PayloadCuratedPluginDeleted {
if x, ok := x.GetPayload().(*Event_CuratedPluginDeleted); ok {
return x.CuratedPluginDeleted
}
return nil
}
func (x *Event) GetPayloadServerBreakingChangePolicyEnabled() *PayloadServerBreakingChangePolicyEnabled {
if x, ok := x.GetPayload().(*Event_PayloadServerBreakingChangePolicyEnabled); ok {
return x.PayloadServerBreakingChangePolicyEnabled
}
return nil
}
func (x *Event) GetPayloadServerBreakingChangePolicyDisabled() *PayloadServerBreakingChangePolicyDisabled {
if x, ok := x.GetPayload().(*Event_PayloadServerBreakingChangePolicyDisabled); ok {
return x.PayloadServerBreakingChangePolicyDisabled
}
return nil
}
func (x *Event) GetRepositoryDefaultBranchChanged() *PayloadRepositoryDefaultBranchChanged {
if x, ok := x.GetPayload().(*Event_RepositoryDefaultBranchChanged); ok {
return x.RepositoryDefaultBranchChanged
}
return nil
}
func (x *Event) GetPayloadServerUniquenessPolicyEnabled() *PayloadServerUniquenessPolicyEnabled {
if x, ok := x.GetPayload().(*Event_PayloadServerUniquenessPolicyEnabled); ok {
return x.PayloadServerUniquenessPolicyEnabled
}
return nil
}
func (x *Event) GetPayloadServerUniquenessPolicyDisabled() *PayloadServerUniquenessPolicyDisabled {
if x, ok := x.GetPayload().(*Event_PayloadServerUniquenessPolicyDisabled); ok {
return x.PayloadServerUniquenessPolicyDisabled
}
return nil
}
func (x *Event) GetUserAutoMergedFromNewIdp() *PayloadUserAutoMergedFromNewIdP {
if x, ok := x.GetPayload().(*Event_UserAutoMergedFromNewIdp); ok {
return x.UserAutoMergedFromNewIdp
}
return nil
}
type isEvent_Payload interface {
isEvent_Payload()
}
type Event_OrganizationCreated struct {
OrganizationCreated *PayloadOrganizationCreated `protobuf:"bytes,7,opt,name=organization_created,json=organizationCreated,proto3,oneof"`
}
type Event_OrganizationDeleted struct {
OrganizationDeleted *PayloadOrganizationDeleted `protobuf:"bytes,8,opt,name=organization_deleted,json=organizationDeleted,proto3,oneof"`
}
type Event_OrganizationMemberAdded struct {
OrganizationMemberAdded *PayloadOrganizationMemberAdded `protobuf:"bytes,9,opt,name=organization_member_added,json=organizationMemberAdded,proto3,oneof"`
}
type Event_OrganizationMemberRoleChanged struct {
OrganizationMemberRoleChanged *PayloadOrganizationMemberRoleChanged `protobuf:"bytes,10,opt,name=organization_member_role_changed,json=organizationMemberRoleChanged,proto3,oneof"`
}
type Event_OrganizationMemberRemoved struct {
OrganizationMemberRemoved *PayloadOrganizationMemberRemoved `protobuf:"bytes,11,opt,name=organization_member_removed,json=organizationMemberRemoved,proto3,oneof"`
}
type Event_RepositoryCreated struct {
RepositoryCreated *PayloadRepositoryCreated `protobuf:"bytes,12,opt,name=repository_created,json=repositoryCreated,proto3,oneof"`
}
type Event_RepositoryDeleted struct {
RepositoryDeleted *PayloadRepositoryDeleted `protobuf:"bytes,13,opt,name=repository_deleted,json=repositoryDeleted,proto3,oneof"`
}
type Event_RepositoryCommitPushed struct {
RepositoryCommitPushed *PayloadRepositoryCommitPushed `protobuf:"bytes,14,opt,name=repository_commit_pushed,json=repositoryCommitPushed,proto3,oneof"`
}
type Event_RepositoryContributorAdded struct {
RepositoryContributorAdded *PayloadRepositoryContributorAdded `protobuf:"bytes,15,opt,name=repository_contributor_added,json=repositoryContributorAdded,proto3,oneof"`
}
type Event_RepositoryContributorRoleChanged struct {
RepositoryContributorRoleChanged *PayloadRepositoryContributorRoleChanged `protobuf:"bytes,16,opt,name=repository_contributor_role_changed,json=repositoryContributorRoleChanged,proto3,oneof"`
}
type Event_RepositoryContributorRemoved struct {
RepositoryContributorRemoved *PayloadRepositoryContributorRemoved `protobuf:"bytes,17,opt,name=repository_contributor_removed,json=repositoryContributorRemoved,proto3,oneof"`
}
type Event_RepositoryVisibilityChanged struct {
RepositoryVisibilityChanged *PayloadRepositoryVisibilityChanged `protobuf:"bytes,18,opt,name=repository_visibility_changed,json=repositoryVisibilityChanged,proto3,oneof"`
}
type Event_UserCreated struct {
UserCreated *PayloadUserCreated `protobuf:"bytes,21,opt,name=user_created,json=userCreated,proto3,oneof"`
}
type Event_UserDeactivated struct {
UserDeactivated *PayloadUserDeactivated `protobuf:"bytes,22,opt,name=user_deactivated,json=userDeactivated,proto3,oneof"`
}
type Event_UserDeleted struct {
UserDeleted *PayloadUserDeleted `protobuf:"bytes,23,opt,name=user_deleted,json=userDeleted,proto3,oneof"`
}