proto

package
v0.41.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2025 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Type_name = map[int32]string{
		0: "TYPE_UNKNOWN",
		1: "TYPE_START",
		2: "TYPE_END",
		3: "TYPE_DROP",
	}
	Type_value = map[string]int32{
		"TYPE_UNKNOWN": 0,
		"TYPE_START":   1,
		"TYPE_END":     2,
		"TYPE_DROP":    3,
	}
)

Enum value maps for Type.

View Source
var (
	Direction_name = map[int32]string{
		0: "DIRECTION_UNKNOWN",
		1: "INGRESS",
		2: "EGRESS",
	}
	Direction_value = map[string]int32{
		"DIRECTION_UNKNOWN": 0,
		"INGRESS":           1,
		"EGRESS":            2,
	}
)

Enum value maps for Direction.

View Source
var FlowService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "flow.FlowService",
	HandlerType: (*FlowServiceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Events",
			Handler:       _FlowService_Events_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "flow.proto",
}

FlowService_ServiceDesc is the grpc.ServiceDesc for FlowService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterFlowServiceServer

func RegisterFlowServiceServer(s grpc.ServiceRegistrar, srv FlowServiceServer)

Types

type Direction

type Direction int32

Flow direction

const (
	Direction_DIRECTION_UNKNOWN Direction = 0
	Direction_INGRESS           Direction = 1
	Direction_EGRESS            Direction = 2
)

func (Direction) Descriptor

func (Direction) Descriptor() protoreflect.EnumDescriptor

func (Direction) Enum

func (x Direction) Enum() *Direction

func (Direction) EnumDescriptor deprecated

func (Direction) EnumDescriptor() ([]byte, []int)

Deprecated: Use Direction.Descriptor instead.

func (Direction) Number

func (x Direction) Number() protoreflect.EnumNumber

func (Direction) String

func (x Direction) String() string

func (Direction) Type

type FlowEvent

type FlowEvent struct {

	// Unique client event identifier
	EventId []byte `protobuf:"bytes,1,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"`
	// When the event occurred
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// Public key of the sending peer
	PublicKey   []byte      `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	FlowFields  *FlowFields `protobuf:"bytes,4,opt,name=flow_fields,json=flowFields,proto3" json:"flow_fields,omitempty"`
	IsInitiator bool        `protobuf:"varint,5,opt,name=isInitiator,proto3" json:"isInitiator,omitempty"`
	// contains filtered or unexported fields
}

func (*FlowEvent) Descriptor deprecated

func (*FlowEvent) Descriptor() ([]byte, []int)

Deprecated: Use FlowEvent.ProtoReflect.Descriptor instead.

func (*FlowEvent) GetEventId

func (x *FlowEvent) GetEventId() []byte

func (*FlowEvent) GetFlowFields

func (x *FlowEvent) GetFlowFields() *FlowFields

func (*FlowEvent) GetIsInitiator

func (x *FlowEvent) GetIsInitiator() bool

func (*FlowEvent) GetPublicKey

func (x *FlowEvent) GetPublicKey() []byte

func (*FlowEvent) GetTimestamp

func (x *FlowEvent) GetTimestamp() *timestamppb.Timestamp

func (*FlowEvent) ProtoMessage

func (*FlowEvent) ProtoMessage()

func (*FlowEvent) ProtoReflect

func (x *FlowEvent) ProtoReflect() protoreflect.Message

func (*FlowEvent) Reset

func (x *FlowEvent) Reset()

func (*FlowEvent) String

func (x *FlowEvent) String() string

type FlowEventAck

type FlowEventAck struct {

	// Unique client event identifier that has been ack'ed
	EventId     []byte `protobuf:"bytes,1,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"`
	IsInitiator bool   `protobuf:"varint,2,opt,name=isInitiator,proto3" json:"isInitiator,omitempty"`
	// contains filtered or unexported fields
}

func (*FlowEventAck) Descriptor deprecated

func (*FlowEventAck) Descriptor() ([]byte, []int)

Deprecated: Use FlowEventAck.ProtoReflect.Descriptor instead.

func (*FlowEventAck) GetEventId

func (x *FlowEventAck) GetEventId() []byte

func (*FlowEventAck) GetIsInitiator

func (x *FlowEventAck) GetIsInitiator() bool

func (*FlowEventAck) ProtoMessage

func (*FlowEventAck) ProtoMessage()

func (*FlowEventAck) ProtoReflect

func (x *FlowEventAck) ProtoReflect() protoreflect.Message

func (*FlowEventAck) Reset

func (x *FlowEventAck) Reset()

func (*FlowEventAck) String

func (x *FlowEventAck) String() string

type FlowFields

type FlowFields struct {

	// Unique client flow session identifier
	FlowId []byte `protobuf:"bytes,1,opt,name=flow_id,json=flowId,proto3" json:"flow_id,omitempty"`
	// Flow type
	Type Type `protobuf:"varint,2,opt,name=type,proto3,enum=flow.Type" json:"type,omitempty"`
	// RuleId identifies the rule that allowed or denied the connection
	RuleId []byte `protobuf:"bytes,3,opt,name=rule_id,json=ruleId,proto3" json:"rule_id,omitempty"`
	// Initiating traffic direction
	Direction Direction `protobuf:"varint,4,opt,name=direction,proto3,enum=flow.Direction" json:"direction,omitempty"`
	// IP protocol number
	Protocol uint32 `protobuf:"varint,5,opt,name=protocol,proto3" json:"protocol,omitempty"`
	// Source IP address
	SourceIp []byte `protobuf:"bytes,6,opt,name=source_ip,json=sourceIp,proto3" json:"source_ip,omitempty"`
	// Destination IP address
	DestIp []byte `protobuf:"bytes,7,opt,name=dest_ip,json=destIp,proto3" json:"dest_ip,omitempty"`
	// Layer 4 -specific information
	//
	// Types that are assignable to ConnectionInfo:
	//
	//	*FlowFields_PortInfo
	//	*FlowFields_IcmpInfo
	ConnectionInfo isFlowFields_ConnectionInfo `protobuf_oneof:"connection_info"`
	// Number of packets
	RxPackets uint64 `protobuf:"varint,10,opt,name=rx_packets,json=rxPackets,proto3" json:"rx_packets,omitempty"`
	TxPackets uint64 `protobuf:"varint,11,opt,name=tx_packets,json=txPackets,proto3" json:"tx_packets,omitempty"`
	// Number of bytes
	RxBytes uint64 `protobuf:"varint,12,opt,name=rx_bytes,json=rxBytes,proto3" json:"rx_bytes,omitempty"`
	TxBytes uint64 `protobuf:"varint,13,opt,name=tx_bytes,json=txBytes,proto3" json:"tx_bytes,omitempty"`
	// Resource ID
	SourceResourceId []byte `protobuf:"bytes,14,opt,name=source_resource_id,json=sourceResourceId,proto3" json:"source_resource_id,omitempty"`
	DestResourceId   []byte `protobuf:"bytes,15,opt,name=dest_resource_id,json=destResourceId,proto3" json:"dest_resource_id,omitempty"`
	// contains filtered or unexported fields
}

func (*FlowFields) Descriptor deprecated

func (*FlowFields) Descriptor() ([]byte, []int)

Deprecated: Use FlowFields.ProtoReflect.Descriptor instead.

func (*FlowFields) GetConnectionInfo

func (m *FlowFields) GetConnectionInfo() isFlowFields_ConnectionInfo

func (*FlowFields) GetDestIp

func (x *FlowFields) GetDestIp() []byte

func (*FlowFields) GetDestResourceId

func (x *FlowFields) GetDestResourceId() []byte

func (*FlowFields) GetDirection

func (x *FlowFields) GetDirection() Direction

func (*FlowFields) GetFlowId

func (x *FlowFields) GetFlowId() []byte

func (*FlowFields) GetIcmpInfo

func (x *FlowFields) GetIcmpInfo() *ICMPInfo

func (*FlowFields) GetPortInfo

func (x *FlowFields) GetPortInfo() *PortInfo

func (*FlowFields) GetProtocol

func (x *FlowFields) GetProtocol() uint32

func (*FlowFields) GetRuleId

func (x *FlowFields) GetRuleId() []byte

func (*FlowFields) GetRxBytes

func (x *FlowFields) GetRxBytes() uint64

func (*FlowFields) GetRxPackets

func (x *FlowFields) GetRxPackets() uint64

func (*FlowFields) GetSourceIp

func (x *FlowFields) GetSourceIp() []byte

func (*FlowFields) GetSourceResourceId

func (x *FlowFields) GetSourceResourceId() []byte

func (*FlowFields) GetTxBytes

func (x *FlowFields) GetTxBytes() uint64

func (*FlowFields) GetTxPackets

func (x *FlowFields) GetTxPackets() uint64

func (*FlowFields) GetType

func (x *FlowFields) GetType() Type

func (*FlowFields) ProtoMessage

func (*FlowFields) ProtoMessage()

func (*FlowFields) ProtoReflect

func (x *FlowFields) ProtoReflect() protoreflect.Message

func (*FlowFields) Reset

func (x *FlowFields) Reset()

func (*FlowFields) String

func (x *FlowFields) String() string

type FlowFields_IcmpInfo

type FlowFields_IcmpInfo struct {
	// ICMP type and code
	IcmpInfo *ICMPInfo `protobuf:"bytes,9,opt,name=icmp_info,json=icmpInfo,proto3,oneof"`
}

type FlowFields_PortInfo

type FlowFields_PortInfo struct {
	// TCP/UDP port information
	PortInfo *PortInfo `protobuf:"bytes,8,opt,name=port_info,json=portInfo,proto3,oneof"`
}

type FlowServiceClient

type FlowServiceClient interface {
	// Client to receiver streams of events and acknowledgements
	Events(ctx context.Context, opts ...grpc.CallOption) (FlowService_EventsClient, error)
}

FlowServiceClient is the client API for FlowService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type FlowServiceServer

type FlowServiceServer interface {
	// Client to receiver streams of events and acknowledgements
	Events(FlowService_EventsServer) error
	// contains filtered or unexported methods
}

FlowServiceServer is the server API for FlowService service. All implementations must embed UnimplementedFlowServiceServer for forward compatibility

type FlowService_EventsClient

type FlowService_EventsClient interface {
	Send(*FlowEvent) error
	Recv() (*FlowEventAck, error)
	grpc.ClientStream
}

type FlowService_EventsServer

type FlowService_EventsServer interface {
	Send(*FlowEventAck) error
	Recv() (*FlowEvent, error)
	grpc.ServerStream
}

type ICMPInfo

type ICMPInfo struct {
	IcmpType uint32 `protobuf:"varint,1,opt,name=icmp_type,json=icmpType,proto3" json:"icmp_type,omitempty"`
	IcmpCode uint32 `protobuf:"varint,2,opt,name=icmp_code,json=icmpCode,proto3" json:"icmp_code,omitempty"`
	// contains filtered or unexported fields
}

ICMP message information

func (*ICMPInfo) Descriptor deprecated

func (*ICMPInfo) Descriptor() ([]byte, []int)

Deprecated: Use ICMPInfo.ProtoReflect.Descriptor instead.

func (*ICMPInfo) GetIcmpCode

func (x *ICMPInfo) GetIcmpCode() uint32

func (*ICMPInfo) GetIcmpType

func (x *ICMPInfo) GetIcmpType() uint32

func (*ICMPInfo) ProtoMessage

func (*ICMPInfo) ProtoMessage()

func (*ICMPInfo) ProtoReflect

func (x *ICMPInfo) ProtoReflect() protoreflect.Message

func (*ICMPInfo) Reset

func (x *ICMPInfo) Reset()

func (*ICMPInfo) String

func (x *ICMPInfo) String() string

type PortInfo

type PortInfo struct {
	SourcePort uint32 `protobuf:"varint,1,opt,name=source_port,json=sourcePort,proto3" json:"source_port,omitempty"`
	DestPort   uint32 `protobuf:"varint,2,opt,name=dest_port,json=destPort,proto3" json:"dest_port,omitempty"`
	// contains filtered or unexported fields
}

TCP/UDP port information

func (*PortInfo) Descriptor deprecated

func (*PortInfo) Descriptor() ([]byte, []int)

Deprecated: Use PortInfo.ProtoReflect.Descriptor instead.

func (*PortInfo) GetDestPort

func (x *PortInfo) GetDestPort() uint32

func (*PortInfo) GetSourcePort

func (x *PortInfo) GetSourcePort() uint32

func (*PortInfo) ProtoMessage

func (*PortInfo) ProtoMessage()

func (*PortInfo) ProtoReflect

func (x *PortInfo) ProtoReflect() protoreflect.Message

func (*PortInfo) Reset

func (x *PortInfo) Reset()

func (*PortInfo) String

func (x *PortInfo) String() string

type Type

type Type int32

Flow event types

const (
	Type_TYPE_UNKNOWN Type = 0
	Type_TYPE_START   Type = 1
	Type_TYPE_END     Type = 2
	Type_TYPE_DROP    Type = 3
)

func (Type) Descriptor

func (Type) Descriptor() protoreflect.EnumDescriptor

func (Type) Enum

func (x Type) Enum() *Type

func (Type) EnumDescriptor deprecated

func (Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use Type.Descriptor instead.

func (Type) Number

func (x Type) Number() protoreflect.EnumNumber

func (Type) String

func (x Type) String() string

func (Type) Type

func (Type) Type() protoreflect.EnumType

type UnimplementedFlowServiceServer

type UnimplementedFlowServiceServer struct {
}

UnimplementedFlowServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedFlowServiceServer) Events

type UnsafeFlowServiceServer

type UnsafeFlowServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeFlowServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FlowServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL