pkg

package module
v0.0.0-...-498b159 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2022 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanDomain

func CleanDomain(domain string) string

func CountFileLine

func CountFileLine(filename string) (line_num int)

func DownloadFileProgress

func DownloadFileProgress(url, filename string)

func DownloadGithubRelease

func DownloadGithubRelease(repo string, localpath string, index string) []string

func GetCurrentAbPath

func GetCurrentAbPath() string

最终方案-全兼容

func GetCurrentAbPathByCaller

func GetCurrentAbPathByCaller() string

获取当前执行文件绝对路径(go run)

func GetCurrentAbPathByExecutable

func GetCurrentAbPathByExecutable() string

获取当前执行文件绝对路径

func GetMysqlConnByGorm

func GetMysqlConnByGorm(username string, password string, host string, port string, dbname string) (db *gorm.DB)

func GetRootDomain

func GetRootDomain(domain string) string

func Ip2Domain

func Ip2Domain(ip string) []string

func Ip2DomainAndWebWeight

func Ip2DomainAndWebWeight(ip string) (string, string, int)

func Ip2DomainByDnsGrep

func Ip2DomainByDnsGrep(ip string) string

func Ip2DomainByWebScancc

func Ip2DomainByWebScancc(ip string) string

func PushMsgByServerJ

func PushMsgByServerJ(serverj_key string, title string, content string)

func ReadFileReturnStringSlice

func ReadFileReturnStringSlice(filename string) []string

func ReadSpecifiedLineInFile

func ReadSpecifiedLineInFile(filepath string, begin_line int, end_line int) []string

func RemoveRepeatedElementInSlice

func RemoveRepeatedElementInSlice(arr []string) []string

func RemoveSpecifiedElementInStringSlice

func RemoveSpecifiedElementInStringSlice(slice []string, element string) []string

func SimpleBlElementInStringSlice

func SimpleBlElementInStringSlice(stringL []string) []string

func SortAMapOfStringAndIntByValue

func SortAMapOfStringAndIntByValue(m map[string]int, Order string) map[string]int

func WebWeightByAiZhan

func WebWeightByAiZhan(domain string) int

func WriteSliceReturnRandomFilename

func WriteSliceReturnRandomFilename(data_l []string) (filename string)

Types

type Assets

type Assets struct {
	BrowserDownloadURL string `json:"browser_download_url"`
}

type Data

type Data struct {
	Data  []InData `json:"data"`
	Count int      `json:"count"`
	Type  int      `json:"type"`
}

type InData

type InData struct {
	Domain string `json:"domain"`
	Value  string `json:"value"`
	Type   string `json:"type"`
	Time   string `json:"time"`
}

type IpDomain

type IpDomain struct {
	Domain string `json:"domain"`
	Title  string `json:"title"`
}

type Reader

type Reader struct {
	io.Reader
	Total   int64
	Current int64
}

func (*Reader) Read

func (r *Reader) Read(p []byte) (n int, err error)

type TooLTT

type TooLTT struct {
	Status int  `json:"status"`
	Data   Data `json:"data"`
}

type Trie

type Trie interface {
	Filter(text string) (string, []string, bool)
	FindKeywords(text string) []string
}

A Trie is a tree implementation that used to find elements rapidly.

func NewTrie

func NewTrie(words []string, opts ...TrieOption) Trie

NewTrie returns a Trie.

type TrieOption

type TrieOption func(trie *trieNode)

TrieOption defines the method to customize a Trie.

func WithMask

func WithMask(mask rune) TrieOption

WithMask customizes a Trie with keywords masked as given mask char.

Jump to

Keyboard shortcuts

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