partition

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const RegexRaw = `(?i)\{\{%s:(.*?)\}\}`

Variables

View Source
var (

	// IPv4 Tag
	TAG_IPv4   = "IPv4"
	TAG_IPv4_R = cTagR(TAG_IPv4)

	// Port Tag
	TAG_Port   = "PORT"
	TAG_Port_R = cTagR(TAG_Port)

	// Dict Tag
	TAG_Dict   = "DICT"
	TAG_Dict_R = cTagR(TAG_Dict)

	IPv4Tag = &Tag{
		Name: TAG_IPv4,
		R:    TAG_IPv4_R,
	}

	PortTag = &Tag{
		Name: TAG_Port,
		R:    TAG_Port_R,
	}

	DictTag = &Tag{
		Name: TAG_Dict,
		R:    TAG_Dict_R,
	}
)

Functions

func NeedDictSeperating

func NeedDictSeperating(raw string) bool

func NeedIPorPortSeperating

func NeedIPorPortSeperating(raw string) bool

func NeedSeperating

func NeedSeperating(raw string) bool

func SeperateIPv4nPort

func SeperateIPv4nPort(raw string) chan string

Types

type Seperator

type Seperator struct {
	DB      *gorm.DB
	Origins []string
}

func NewSeperator

func NewSeperator(origins ...string) *Seperator

func NewSeperatorWithDB

func NewSeperatorWithDB(d *gorm.DB, origins ...string) *Seperator

func (*Seperator) List

func (s *Seperator) List() (result []string)

type Tag

type Tag struct {
	Name string
	R    *regexp.Regexp
}

Jump to

Keyboard shortcuts

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