gus/event.pb.go

471 lines
15 KiB
Go

// Code modified by go.wit.com/apps/autogenpb DO NOT EDIT.
//
// user defined Mutex locks were auto added
//
// autogenpb version & build time: v0.0.65 2025-03-12_15:38:32_UTC
// autogenpb auto generates Sort(), Unique() and Marshal() functions
// go install go.wit.com/apps/autogenpb@latest
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
// protoc v3.21.12
// source: event.proto
package main // autogenpb changed the package name
import (
reflect "reflect"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type GusEventType int32
const (
GusEventType_Connect GusEventType = 0 // a socket connect attempt
GusEventType_Disconnect GusEventType = 1 // a socket closed
GusEventType_Enable GusEventType = 2 // listening on a port was enabled
GusEventType_Disable GusEventType = 3 // listening on a port was disabled
)
// Enum value maps for GusEventType.
var (
GusEventType_name = map[int32]string{
0: "Connect",
1: "Disconnect",
2: "Enable",
3: "Disable",
}
GusEventType_value = map[string]int32{
"Connect": 0,
"Disconnect": 1,
"Enable": 2,
"Disable": 3,
}
)
func (x GusEventType) Enum() *GusEventType {
p := new(GusEventType)
*p = x
return p
}
func (x GusEventType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (GusEventType) Descriptor() protoreflect.EnumDescriptor {
return file_event_proto_enumTypes[0].Descriptor()
}
func (GusEventType) Type() protoreflect.EnumType {
return &file_event_proto_enumTypes[0]
}
func (x GusEventType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use GusEventType.Descriptor instead.
func (GusEventType) EnumDescriptor() ([]byte, []int) {
return file_event_proto_rawDescGZIP(), []int{0}
}
type GusSocket struct {
sync.RWMutex // auto-added by go.wit.com/apps/autogenpb
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
SrcHostname string `protobuf:"bytes,1,opt,name=srcHostname,proto3" json:"srcHostname,omitempty"` // the hostname
SrcIp string `protobuf:"bytes,2,opt,name=srcIp,proto3" json:"srcIp,omitempty"` // the IPv4 or IPv6 address
SrcPort string `protobuf:"bytes,3,opt,name=srcPort,proto3" json:"srcPort,omitempty"` // the port
DestHostname string `protobuf:"bytes,4,opt,name=destHostname,proto3" json:"destHostname,omitempty"` // the hostname
DestIp string `protobuf:"bytes,5,opt,name=destIp,proto3" json:"destIp,omitempty"` // the IPv4 or IPv6 address
DestPort string `protobuf:"bytes,6,opt,name=destPort,proto3" json:"destPort,omitempty"` // the port
}
func (x *GusSocket) Reset() {
*x = GusSocket{}
if protoimpl.UnsafeEnabled {
mi := &file_event_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GusSocket) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GusSocket) ProtoMessage() {}
func (x *GusSocket) ProtoReflect() protoreflect.Message {
mi := &file_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 GusSocket.ProtoReflect.Descriptor instead.
func (*GusSocket) Descriptor() ([]byte, []int) {
return file_event_proto_rawDescGZIP(), []int{0}
}
func (x *GusSocket) GetSrcHostname() string {
if x != nil {
return x.SrcHostname
}
return ""
}
func (x *GusSocket) GetSrcIp() string {
if x != nil {
return x.SrcIp
}
return ""
}
func (x *GusSocket) GetSrcPort() string {
if x != nil {
return x.SrcPort
}
return ""
}
func (x *GusSocket) GetDestHostname() string {
if x != nil {
return x.DestHostname
}
return ""
}
func (x *GusSocket) GetDestIp() string {
if x != nil {
return x.DestIp
}
return ""
}
func (x *GusSocket) GetDestPort() string {
if x != nil {
return x.DestPort
}
return ""
}
type Event struct {
sync.RWMutex // auto-added by go.wit.com/apps/autogenpb
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Hostname string `protobuf:"bytes,1,opt,name=Hostname,proto3" json:"Hostname,omitempty"` // the hostname
LocalPort int64 `protobuf:"varint,2,opt,name=localPort,proto3" json:"localPort,omitempty"` // the port gus was listening on
Etype GusEventType `protobuf:"varint,3,opt,name=etype,proto3,enum=gus.GusEventType" json:"etype,omitempty"` // what kind of event was this
Sock *GusSocket `protobuf:"bytes,4,opt,name=sock,proto3" json:"sock,omitempty"` // socket details if event needs them
Ctime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=ctime,proto3" json:"ctime,omitempty"` // event create time
Etime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=etime,proto3" json:"etime,omitempty"` // event end time
}
func (x *Event) Reset() {
*x = Event{}
if protoimpl.UnsafeEnabled {
mi := &file_event_proto_msgTypes[1]
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_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 Event.ProtoReflect.Descriptor instead.
func (*Event) Descriptor() ([]byte, []int) {
return file_event_proto_rawDescGZIP(), []int{1}
}
func (x *Event) GetHostname() string {
if x != nil {
return x.Hostname
}
return ""
}
func (x *Event) GetLocalPort() int64 {
if x != nil {
return x.LocalPort
}
return 0
}
func (x *Event) GetEtype() GusEventType {
if x != nil {
return x.Etype
}
return GusEventType_Connect
}
func (x *Event) GetSock() *GusSocket {
if x != nil {
return x.Sock
}
return nil
}
func (x *Event) GetCtime() *timestamppb.Timestamp {
if x != nil {
return x.Ctime
}
return nil
}
func (x *Event) GetEtime() *timestamppb.Timestamp {
if x != nil {
return x.Etime
}
return nil
}
type Events struct {
// sync.RWMutex // skipped. protobuf file has `autogenpb:nomutex`
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // `autogenpb:uuid:4e91f9e6-f545-4c72-bec4-ab951276da1d`
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` // `autogenpb:version:v0.0.1`
Events []*Event `protobuf:"bytes,3,rep,name=events,proto3" json:"events,omitempty"`
}
func (x *Events) Reset() {
*x = Events{}
if protoimpl.UnsafeEnabled {
mi := &file_event_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Events) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Events) ProtoMessage() {}
func (x *Events) ProtoReflect() protoreflect.Message {
mi := &file_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 Events.ProtoReflect.Descriptor instead.
func (*Events) Descriptor() ([]byte, []int) {
return file_event_proto_rawDescGZIP(), []int{2}
}
func (x *Events) GetUuid() string {
if x != nil {
return x.Uuid
}
return ""
}
func (x *Events) GetVersion() string {
if x != nil {
return x.Version
}
return ""
}
func (x *Events) GetEvents() []*Event {
if x != nil {
return x.Events
}
return nil
}
var File_event_proto protoreflect.FileDescriptor
var file_event_proto_rawDesc = []byte{
0x0a, 0x0b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x67,
0x75, 0x73, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x22, 0xb5, 0x01, 0x0a, 0x09, 0x47, 0x75, 0x73, 0x53, 0x6f, 0x63, 0x6b, 0x65,
0x74, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x72, 0x63, 0x48, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x72, 0x63, 0x48, 0x6f, 0x73, 0x74, 0x6e,
0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x72, 0x63, 0x49, 0x70, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x05, 0x73, 0x72, 0x63, 0x49, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x72, 0x63,
0x50, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x72, 0x63, 0x50,
0x6f, 0x72, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x48,
0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x73, 0x74, 0x49,
0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x73, 0x74, 0x49, 0x70, 0x12,
0x1a, 0x0a, 0x08, 0x64, 0x65, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28,
0x09, 0x52, 0x08, 0x64, 0x65, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x22, 0xf2, 0x01, 0x0a, 0x05,
0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x48, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x48, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x02,
0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x50, 0x6f, 0x72, 0x74, 0x12,
0x27, 0x0a, 0x05, 0x65, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11,
0x2e, 0x67, 0x75, 0x73, 0x2e, 0x47, 0x75, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70,
0x65, 0x52, 0x05, 0x65, 0x74, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x04, 0x73, 0x6f, 0x63, 0x6b,
0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x67, 0x75, 0x73, 0x2e, 0x47, 0x75, 0x73,
0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x04, 0x73, 0x6f, 0x63, 0x6b, 0x12, 0x30, 0x0a, 0x05,
0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69,
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x30,
0x0a, 0x05, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x65, 0x74, 0x69, 0x6d, 0x65,
0x22, 0x5a, 0x0a, 0x06, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x18,
0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e,
0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x67, 0x75, 0x73, 0x2e, 0x45,
0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2a, 0x44, 0x0a, 0x0c,
0x47, 0x75, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07,
0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x69, 0x73,
0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x6e, 0x61,
0x62, 0x6c, 0x65, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65,
0x10, 0x03, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_event_proto_rawDescOnce sync.Once
file_event_proto_rawDescData = file_event_proto_rawDesc
)
func file_event_proto_rawDescGZIP() []byte {
file_event_proto_rawDescOnce.Do(func() {
file_event_proto_rawDescData = protoimpl.X.CompressGZIP(file_event_proto_rawDescData)
})
return file_event_proto_rawDescData
}
var file_event_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_event_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_event_proto_goTypes = []interface{}{
(GusEventType)(0), // 0: gus.GusEventType
(*GusSocket)(nil), // 1: gus.GusSocket
(*Event)(nil), // 2: gus.Event
(*Events)(nil), // 3: gus.Events
(*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp
}
var file_event_proto_depIdxs = []int32{
0, // 0: gus.Event.etype:type_name -> gus.GusEventType
1, // 1: gus.Event.sock:type_name -> gus.GusSocket
4, // 2: gus.Event.ctime:type_name -> google.protobuf.Timestamp
4, // 3: gus.Event.etime:type_name -> google.protobuf.Timestamp
2, // 4: gus.Events.events:type_name -> gus.Event
5, // [5:5] is the sub-list for method output_type
5, // [5:5] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
}
func init() { file_event_proto_init() }
func file_event_proto_init() {
if File_event_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_event_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GusSocket); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_event_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Event); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_event_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Events); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_event_proto_rawDesc,
NumEnums: 1,
NumMessages: 3,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_event_proto_goTypes,
DependencyIndexes: file_event_proto_depIdxs,
EnumInfos: file_event_proto_enumTypes,
MessageInfos: file_event_proto_msgTypes,
}.Build()
File_event_proto = out.File
file_event_proto_rawDesc = nil
file_event_proto_goTypes = nil
file_event_proto_depIdxs = nil
}