protocol

package
v0.0.0-...-2b49871 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2019 License: GPL-3.0 Imports: 5 Imported by: 1

Documentation

Overview

Package protocol is a generated protocol buffer package.

It is generated from these files:

ui.proto

It has these top-level messages:

Event
Statistics
PingRequest
PingReply
Connection
Operator
Rule

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterUIServer

func RegisterUIServer(s *grpc.Server, srv UIServer)

Types

type Connection

type Connection struct {
	Protocol    string   `protobuf:"bytes,1,opt,name=protocol" json:"protocol,omitempty"`
	SrcIp       string   `protobuf:"bytes,2,opt,name=src_ip,json=srcIp" json:"src_ip,omitempty"`
	SrcPort     uint32   `protobuf:"varint,3,opt,name=src_port,json=srcPort" json:"src_port,omitempty"`
	DstIp       string   `protobuf:"bytes,4,opt,name=dst_ip,json=dstIp" json:"dst_ip,omitempty"`
	DstHost     string   `protobuf:"bytes,5,opt,name=dst_host,json=dstHost" json:"dst_host,omitempty"`
	DstPort     uint32   `protobuf:"varint,6,opt,name=dst_port,json=dstPort" json:"dst_port,omitempty"`
	UserId      uint32   `protobuf:"varint,7,opt,name=user_id,json=userId" json:"user_id,omitempty"`
	ProcessId   uint32   `protobuf:"varint,8,opt,name=process_id,json=processId" json:"process_id,omitempty"`
	ProcessPath string   `protobuf:"bytes,9,opt,name=process_path,json=processPath" json:"process_path,omitempty"`
	ProcessArgs []string `protobuf:"bytes,10,rep,name=process_args,json=processArgs" json:"process_args,omitempty"`
}

func (*Connection) Descriptor

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

func (*Connection) GetDstHost

func (m *Connection) GetDstHost() string

func (*Connection) GetDstIp

func (m *Connection) GetDstIp() string

func (*Connection) GetDstPort

func (m *Connection) GetDstPort() uint32

func (*Connection) GetProcessArgs

func (m *Connection) GetProcessArgs() []string

func (*Connection) GetProcessId

func (m *Connection) GetProcessId() uint32

func (*Connection) GetProcessPath

func (m *Connection) GetProcessPath() string

func (*Connection) GetProtocol

func (m *Connection) GetProtocol() string

func (*Connection) GetSrcIp

func (m *Connection) GetSrcIp() string

func (*Connection) GetSrcPort

func (m *Connection) GetSrcPort() uint32

func (*Connection) GetUserId

func (m *Connection) GetUserId() uint32

func (*Connection) ProtoMessage

func (*Connection) ProtoMessage()

func (*Connection) Reset

func (m *Connection) Reset()

func (*Connection) String

func (m *Connection) String() string

type Event

type Event struct {
	Time       string      `protobuf:"bytes,1,opt,name=time" json:"time,omitempty"`
	Connection *Connection `protobuf:"bytes,2,opt,name=connection" json:"connection,omitempty"`
	Rule       *Rule       `protobuf:"bytes,3,opt,name=rule" json:"rule,omitempty"`
}

func (*Event) Descriptor

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

func (*Event) GetConnection

func (m *Event) GetConnection() *Connection

func (*Event) GetRule

func (m *Event) GetRule() *Rule

func (*Event) GetTime

func (m *Event) GetTime() string

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) Reset

func (m *Event) Reset()

func (*Event) String

func (m *Event) String() string

type Operator

type Operator struct {
	Type    string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"`
	Operand string `protobuf:"bytes,2,opt,name=operand" json:"operand,omitempty"`
	Data    string `protobuf:"bytes,3,opt,name=data" json:"data,omitempty"`
}

func (*Operator) Descriptor

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

func (*Operator) GetData

func (m *Operator) GetData() string

func (*Operator) GetOperand

func (m *Operator) GetOperand() string

func (*Operator) GetType

func (m *Operator) GetType() string

func (*Operator) ProtoMessage

func (*Operator) ProtoMessage()

func (*Operator) Reset

func (m *Operator) Reset()

func (*Operator) String

func (m *Operator) String() string

type PingReply

type PingReply struct {
	Id uint64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
}

func (*PingReply) Descriptor

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

func (*PingReply) GetId

func (m *PingReply) GetId() uint64

func (*PingReply) ProtoMessage

func (*PingReply) ProtoMessage()

func (*PingReply) Reset

func (m *PingReply) Reset()

func (*PingReply) String

func (m *PingReply) String() string

type PingRequest

type PingRequest struct {
	Id    uint64      `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	Stats *Statistics `protobuf:"bytes,2,opt,name=stats" json:"stats,omitempty"`
}

func (*PingRequest) Descriptor

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

func (*PingRequest) GetId

func (m *PingRequest) GetId() uint64

func (*PingRequest) GetStats

func (m *PingRequest) GetStats() *Statistics

func (*PingRequest) ProtoMessage

func (*PingRequest) ProtoMessage()

func (*PingRequest) Reset

func (m *PingRequest) Reset()

func (*PingRequest) String

func (m *PingRequest) String() string

type Rule

type Rule struct {
	Name     string    `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Action   string    `protobuf:"bytes,2,opt,name=action" json:"action,omitempty"`
	Duration string    `protobuf:"bytes,3,opt,name=duration" json:"duration,omitempty"`
	Operator *Operator `protobuf:"bytes,4,opt,name=operator" json:"operator,omitempty"`
}

func (*Rule) Descriptor

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

func (*Rule) GetAction

func (m *Rule) GetAction() string

func (*Rule) GetDuration

func (m *Rule) GetDuration() string

func (*Rule) GetName

func (m *Rule) GetName() string

func (*Rule) GetOperator

func (m *Rule) GetOperator() *Operator

func (*Rule) ProtoMessage

func (*Rule) ProtoMessage()

func (*Rule) Reset

func (m *Rule) Reset()

func (*Rule) String

func (m *Rule) String() string

type Statistics

type Statistics struct {
	DaemonVersion string            `protobuf:"bytes,1,opt,name=daemon_version,json=daemonVersion" json:"daemon_version,omitempty"`
	Rules         uint64            `protobuf:"varint,2,opt,name=rules" json:"rules,omitempty"`
	Uptime        uint64            `protobuf:"varint,3,opt,name=uptime" json:"uptime,omitempty"`
	DnsResponses  uint64            `protobuf:"varint,4,opt,name=dns_responses,json=dnsResponses" json:"dns_responses,omitempty"`
	Connections   uint64            `protobuf:"varint,5,opt,name=connections" json:"connections,omitempty"`
	Ignored       uint64            `protobuf:"varint,6,opt,name=ignored" json:"ignored,omitempty"`
	Accepted      uint64            `protobuf:"varint,7,opt,name=accepted" json:"accepted,omitempty"`
	Dropped       uint64            `protobuf:"varint,8,opt,name=dropped" json:"dropped,omitempty"`
	RuleHits      uint64            `protobuf:"varint,9,opt,name=rule_hits,json=ruleHits" json:"rule_hits,omitempty"`
	RuleMisses    uint64            `protobuf:"varint,10,opt,name=rule_misses,json=ruleMisses" json:"rule_misses,omitempty"`
	ByProto       map[string]uint64 `` /* 151-byte string literal not displayed */
	ByAddress     map[string]uint64 `` /* 157-byte string literal not displayed */
	ByHost        map[string]uint64 `` /* 148-byte string literal not displayed */
	ByPort        map[string]uint64 `` /* 148-byte string literal not displayed */
	ByUid         map[string]uint64 `` /* 145-byte string literal not displayed */
	ByExecutable  map[string]uint64 `` /* 166-byte string literal not displayed */
	Events        []*Event          `protobuf:"bytes,17,rep,name=events" json:"events,omitempty"`
}

func (*Statistics) Descriptor

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

func (*Statistics) GetAccepted

func (m *Statistics) GetAccepted() uint64

func (*Statistics) GetByAddress

func (m *Statistics) GetByAddress() map[string]uint64

func (*Statistics) GetByExecutable

func (m *Statistics) GetByExecutable() map[string]uint64

func (*Statistics) GetByHost

func (m *Statistics) GetByHost() map[string]uint64

func (*Statistics) GetByPort

func (m *Statistics) GetByPort() map[string]uint64

func (*Statistics) GetByProto

func (m *Statistics) GetByProto() map[string]uint64

func (*Statistics) GetByUid

func (m *Statistics) GetByUid() map[string]uint64

func (*Statistics) GetConnections

func (m *Statistics) GetConnections() uint64

func (*Statistics) GetDaemonVersion

func (m *Statistics) GetDaemonVersion() string

func (*Statistics) GetDnsResponses

func (m *Statistics) GetDnsResponses() uint64

func (*Statistics) GetDropped

func (m *Statistics) GetDropped() uint64

func (*Statistics) GetEvents

func (m *Statistics) GetEvents() []*Event

func (*Statistics) GetIgnored

func (m *Statistics) GetIgnored() uint64

func (*Statistics) GetRuleHits

func (m *Statistics) GetRuleHits() uint64

func (*Statistics) GetRuleMisses

func (m *Statistics) GetRuleMisses() uint64

func (*Statistics) GetRules

func (m *Statistics) GetRules() uint64

func (*Statistics) GetUptime

func (m *Statistics) GetUptime() uint64

func (*Statistics) ProtoMessage

func (*Statistics) ProtoMessage()

func (*Statistics) Reset

func (m *Statistics) Reset()

func (*Statistics) String

func (m *Statistics) String() string

type UIClient

type UIClient interface {
	Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingReply, error)
	AskRule(ctx context.Context, in *Connection, opts ...grpc.CallOption) (*Rule, error)
}

func NewUIClient

func NewUIClient(cc *grpc.ClientConn) UIClient

type UIServer

type UIServer interface {
	Ping(context.Context, *PingRequest) (*PingReply, error)
	AskRule(context.Context, *Connection) (*Rule, error)
}

Jump to

Keyboard shortcuts

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