common

package
v0.0.0-...-4d950b6 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasNoResolve

func HasNoResolve(params []string) bool

Types

type ASN

type ASN struct {
	*Base
	// contains filtered or unexported fields
}

func NewIPASN

func NewIPASN(asn string, adapter string, isSrc, noResolveIP bool) (*ASN, error)

func (*ASN) Adapter

func (a *ASN) Adapter() string

func (*ASN) GetASN

func (a *ASN) GetASN() string

func (*ASN) Match

func (a *ASN) Match(metadata *C.Metadata) (bool, string)

func (*ASN) Payload

func (a *ASN) Payload() string

func (*ASN) RuleType

func (a *ASN) RuleType() C.RuleType

func (*ASN) ShouldResolveIP

func (a *ASN) ShouldResolveIP() bool

type Base

type Base struct {
}

func (*Base) ShouldFindProcess

func (b *Base) ShouldFindProcess() bool

func (*Base) ShouldResolveIP

func (b *Base) ShouldResolveIP() bool

type DSCP

type DSCP struct {
	*Base
	// contains filtered or unexported fields
}

func NewDSCP

func NewDSCP(dscp string, adapter string) (*DSCP, error)

func (*DSCP) Adapter

func (d *DSCP) Adapter() string

func (*DSCP) Match

func (d *DSCP) Match(metadata *C.Metadata) (bool, string)

func (*DSCP) Payload

func (d *DSCP) Payload() string

func (*DSCP) RuleType

func (d *DSCP) RuleType() C.RuleType

type Domain

type Domain struct {
	*Base
	// contains filtered or unexported fields
}

func NewDomain

func NewDomain(domain string, adapter string) *Domain

func (*Domain) Adapter

func (d *Domain) Adapter() string

func (*Domain) Match

func (d *Domain) Match(metadata *C.Metadata) (bool, string)

func (*Domain) Payload

func (d *Domain) Payload() string

func (*Domain) RuleType

func (d *Domain) RuleType() C.RuleType

type DomainKeyword

type DomainKeyword struct {
	*Base
	// contains filtered or unexported fields
}

func NewDomainKeyword

func NewDomainKeyword(keyword string, adapter string) *DomainKeyword

func (*DomainKeyword) Adapter

func (dk *DomainKeyword) Adapter() string

func (*DomainKeyword) Match

func (dk *DomainKeyword) Match(metadata *C.Metadata) (bool, string)

func (*DomainKeyword) Payload

func (dk *DomainKeyword) Payload() string

func (*DomainKeyword) RuleType

func (dk *DomainKeyword) RuleType() C.RuleType

type DomainRegex

type DomainRegex struct {
	*Base
	// contains filtered or unexported fields
}

func NewDomainRegex

func NewDomainRegex(regex string, adapter string) (*DomainRegex, error)

func (*DomainRegex) Adapter

func (dr *DomainRegex) Adapter() string

func (*DomainRegex) Match

func (dr *DomainRegex) Match(metadata *C.Metadata) (bool, string)

func (*DomainRegex) Payload

func (dr *DomainRegex) Payload() string

func (*DomainRegex) RuleType

func (dr *DomainRegex) RuleType() C.RuleType

type DomainSuffix

type DomainSuffix struct {
	*Base
	// contains filtered or unexported fields
}

func NewDomainSuffix

func NewDomainSuffix(suffix string, adapter string) *DomainSuffix

func (*DomainSuffix) Adapter

func (ds *DomainSuffix) Adapter() string

func (*DomainSuffix) Match

func (ds *DomainSuffix) Match(metadata *C.Metadata) (bool, string)

func (*DomainSuffix) Payload

func (ds *DomainSuffix) Payload() string

func (*DomainSuffix) RuleType

func (ds *DomainSuffix) RuleType() C.RuleType

type GEOIP

type GEOIP struct {
	*Base
	// contains filtered or unexported fields
}

func NewGEOIP

func NewGEOIP(country string, adapter string, isSrc, noResolveIP bool) (*GEOIP, error)

func (*GEOIP) Adapter

func (g *GEOIP) Adapter() string

func (*GEOIP) GetCountry

func (g *GEOIP) GetCountry() string

func (*GEOIP) GetIPMatcher

func (g *GEOIP) GetIPMatcher() *router.GeoIPMatcher

func (*GEOIP) GetRecodeSize

func (g *GEOIP) GetRecodeSize() int

func (*GEOIP) Match

func (g *GEOIP) Match(metadata *C.Metadata) (bool, string)

func (*GEOIP) Payload

func (g *GEOIP) Payload() string

func (*GEOIP) RuleType

func (g *GEOIP) RuleType() C.RuleType

func (*GEOIP) ShouldResolveIP

func (g *GEOIP) ShouldResolveIP() bool

type GEOSITE

type GEOSITE struct {
	*Base
	// contains filtered or unexported fields
}

func NewGEOSITE

func NewGEOSITE(country string, adapter string) (*GEOSITE, error)

func (*GEOSITE) Adapter

func (gs *GEOSITE) Adapter() string

func (*GEOSITE) GetDomainMatcher

func (gs *GEOSITE) GetDomainMatcher() router.DomainMatcher

func (*GEOSITE) GetRecodeSize

func (gs *GEOSITE) GetRecodeSize() int

func (*GEOSITE) Match

func (gs *GEOSITE) Match(metadata *C.Metadata) (bool, string)

func (*GEOSITE) Payload

func (gs *GEOSITE) Payload() string

func (*GEOSITE) RuleType

func (gs *GEOSITE) RuleType() C.RuleType

type IPCIDR

type IPCIDR struct {
	*Base
	// contains filtered or unexported fields
}

func NewIPCIDR

func NewIPCIDR(s string, adapter string, opts ...IPCIDROption) (*IPCIDR, error)

func (*IPCIDR) Adapter

func (i *IPCIDR) Adapter() string

func (*IPCIDR) Match

func (i *IPCIDR) Match(metadata *C.Metadata) (bool, string)

func (*IPCIDR) Payload

func (i *IPCIDR) Payload() string

func (*IPCIDR) RuleType

func (i *IPCIDR) RuleType() C.RuleType

func (*IPCIDR) ShouldResolveIP

func (i *IPCIDR) ShouldResolveIP() bool

type IPCIDROption

type IPCIDROption func(*IPCIDR)

func WithIPCIDRNoResolve

func WithIPCIDRNoResolve(noResolve bool) IPCIDROption

func WithIPCIDRSourceIP

func WithIPCIDRSourceIP(b bool) IPCIDROption

type IPSuffix

type IPSuffix struct {
	*Base
	// contains filtered or unexported fields
}

func NewIPSuffix

func NewIPSuffix(payload, adapter string, isSrc, noResolveIP bool) (*IPSuffix, error)

func (*IPSuffix) Adapter

func (is *IPSuffix) Adapter() string

func (*IPSuffix) Match

func (is *IPSuffix) Match(metadata *C.Metadata) (bool, string)

func (*IPSuffix) Payload

func (is *IPSuffix) Payload() string

func (*IPSuffix) RuleType

func (is *IPSuffix) RuleType() C.RuleType

func (*IPSuffix) ShouldResolveIP

func (is *IPSuffix) ShouldResolveIP() bool

type InName

type InName struct {
	*Base
	// contains filtered or unexported fields
}

func NewInName

func NewInName(iNames, adapter string) (*InName, error)

func (*InName) Adapter

func (u *InName) Adapter() string

func (*InName) Match

func (u *InName) Match(metadata *C.Metadata) (bool, string)

func (*InName) Payload

func (u *InName) Payload() string

func (*InName) RuleType

func (u *InName) RuleType() C.RuleType

type InType

type InType struct {
	*Base
	// contains filtered or unexported fields
}

func NewInType

func NewInType(iTypes, adapter string) (*InType, error)

func (*InType) Adapter

func (u *InType) Adapter() string

func (*InType) Match

func (u *InType) Match(metadata *C.Metadata) (bool, string)

func (*InType) Payload

func (u *InType) Payload() string

func (*InType) RuleType

func (u *InType) RuleType() C.RuleType

type InUser

type InUser struct {
	*Base
	// contains filtered or unexported fields
}

func NewInUser

func NewInUser(iUsers, adapter string) (*InUser, error)

func (*InUser) Adapter

func (u *InUser) Adapter() string

func (*InUser) Match

func (u *InUser) Match(metadata *C.Metadata) (bool, string)

func (*InUser) Payload

func (u *InUser) Payload() string

func (*InUser) RuleType

func (u *InUser) RuleType() C.RuleType

type Match

type Match struct {
	*Base
	// contains filtered or unexported fields
}

func NewMatch

func NewMatch(adapter string) *Match

func (*Match) Adapter

func (f *Match) Adapter() string

func (*Match) Match

func (f *Match) Match(metadata *C.Metadata) (bool, string)

func (*Match) Payload

func (f *Match) Payload() string

func (*Match) RuleType

func (f *Match) RuleType() C.RuleType

type NetworkType

type NetworkType struct {
	*Base
	// contains filtered or unexported fields
}

func NewNetworkType

func NewNetworkType(network, adapter string) (*NetworkType, error)

func (*NetworkType) Adapter

func (n *NetworkType) Adapter() string

func (*NetworkType) Match

func (n *NetworkType) Match(metadata *C.Metadata) (bool, string)

func (*NetworkType) Payload

func (n *NetworkType) Payload() string

func (*NetworkType) RuleType

func (n *NetworkType) RuleType() C.RuleType

type Port

type Port struct {
	*Base
	// contains filtered or unexported fields
}

func NewPort

func NewPort(port string, adapter string, ruleType C.RuleType) (*Port, error)

func (*Port) Adapter

func (p *Port) Adapter() string

func (*Port) Match

func (p *Port) Match(metadata *C.Metadata) (bool, string)

func (*Port) Payload

func (p *Port) Payload() string

func (*Port) RuleType

func (p *Port) RuleType() C.RuleType

type Process

type Process struct {
	*Base
	// contains filtered or unexported fields
}

func NewProcess

func NewProcess(process string, adapter string, nameOnly bool) (*Process, error)

func (*Process) Adapter

func (ps *Process) Adapter() string

func (*Process) Match

func (ps *Process) Match(metadata *C.Metadata) (bool, string)

func (*Process) Payload

func (ps *Process) Payload() string

func (*Process) RuleType

func (ps *Process) RuleType() C.RuleType

func (*Process) ShouldFindProcess

func (ps *Process) ShouldFindProcess() bool

type Uid

type Uid struct {
	*Base
	// contains filtered or unexported fields
}

func NewUid

func NewUid(oUid, adapter string) (*Uid, error)

func (*Uid) Adapter

func (u *Uid) Adapter() string

func (*Uid) Match

func (u *Uid) Match(metadata *C.Metadata) (bool, string)

func (*Uid) Payload

func (u *Uid) Payload() string

func (*Uid) RuleType

func (u *Uid) RuleType() C.RuleType

func (*Uid) ShouldFindProcess

func (u *Uid) ShouldFindProcess() bool

Jump to

Keyboard shortcuts

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