entity

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeIPv4   = dbif.TypeIPv4
	TypeIPv6   = dbif.TypeIPv6
	TypeDomain = dbif.TypeDomain

	TypePlain = 100
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Entities

type Entities []*Entity

func ParseLine

func ParseLine(line string) Entities

ParseLine parse a line into entities

func (Entities) ColorString

func (es Entities) ColorString() string

func (Entities) Json added in v0.8.0

func (es Entities) Json() string

func (Entities) Len

func (es Entities) Len() int

func (Entities) Less

func (es Entities) Less(i, j int) bool

func (Entities) String

func (es Entities) String() string

func (Entities) Swap

func (es Entities) Swap(i, j int)

type Entity

type Entity struct {
	Loc  [2]int     `json:"-"` // s[Loc[0]:Loc[1]]
	Type EntityType `json:"type"`

	Text     string      `json:"ip"`
	InfoText string      `json:"text"`
	Source   string      `json:"source"`
	Info     interface{} `json:"info"`
}

func (Entity) Json added in v0.8.0

func (e Entity) Json() string

func (Entity) ParseInfo

func (e Entity) ParseInfo() error

type EntityType

type EntityType uint

Jump to

Keyboard shortcuts

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