getter

package
v0.0.0-...-c8da0c0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorUrlNotFound         = errors.New("url should be specified")
	ErrorCreaterNotSupported = errors.New("type not supported")
)

Functions

func AssertTypeStringNotNull

func AssertTypeStringNotNull(i interface{}) (str string, err error)

func FuzzParseProxyFromString

func FuzzParseProxyFromString(text string) proxy.ProxyList

func GrepLinksFromString

func GrepLinksFromString(text string) []string

func Register

func Register(sourceType string, c creator)

func String2Proxy

func String2Proxy(link string) proxy.Proxy

func StringArray2ProxyArray

func StringArray2ProxyArray(origin []string) proxy.ProxyList

Types

type Getter

type Getter interface {
	Get() proxy.ProxyList
	Get2Chan(pc chan proxy.Proxy, wg *sync.WaitGroup)
}

func NewGetter

func NewGetter(sourceType string, options tool.Options) (getter Getter, err error)

func NewSubscribe

func NewSubscribe(options tool.Options) (getter Getter, err error)

func NewTGChannelGetter

func NewTGChannelGetter(options tool.Options) (getter Getter, err error)

func NewWebFanqiangdangGetter

func NewWebFanqiangdangGetter(options tool.Options) (getter Getter, err error)

func NewWebFreessrxyzGetter

func NewWebFreessrxyzGetter(options tool.Options) (getter Getter, err error)

func NewWebFuzzGetter

func NewWebFuzzGetter(options tool.Options) (getter Getter, err error)

func NewWebFuzzSubGetter

func NewWebFuzzSubGetter(options tool.Options) (getter Getter, err error)

type Subscribe

type Subscribe struct {
	Url string
}

func (*Subscribe) Get

func (s *Subscribe) Get() proxy.ProxyList

func (*Subscribe) Get2Chan

func (s *Subscribe) Get2Chan(pc chan proxy.Proxy, wg *sync.WaitGroup)

type TGChannelGetter

type TGChannelGetter struct {
	NumNeeded int

	Url string
	// contains filtered or unexported fields
}

func (*TGChannelGetter) Get

func (g *TGChannelGetter) Get() proxy.ProxyList

func (*TGChannelGetter) Get2Chan

func (g *TGChannelGetter) Get2Chan(pc chan proxy.Proxy, wg *sync.WaitGroup)

type WebFanqiangdang

type WebFanqiangdang struct {
	Url string
	// contains filtered or unexported fields
}

func (*WebFanqiangdang) Get

func (w *WebFanqiangdang) Get() proxy.ProxyList

func (*WebFanqiangdang) Get2Chan

func (w *WebFanqiangdang) Get2Chan(pc chan proxy.Proxy, wg *sync.WaitGroup)

type WebFreessrXyz

type WebFreessrXyz struct {
}

func (*WebFreessrXyz) Get

func (w *WebFreessrXyz) Get() proxy.ProxyList

func (*WebFreessrXyz) Get2Chan

func (w *WebFreessrXyz) Get2Chan(pc chan proxy.Proxy, wg *sync.WaitGroup)

type WebFuzz

type WebFuzz struct {
	Url string
}

func (*WebFuzz) Get

func (w *WebFuzz) Get() proxy.ProxyList

func (*WebFuzz) Get2Chan

func (w *WebFuzz) Get2Chan(pc chan proxy.Proxy, wg *sync.WaitGroup)

type WebFuzzSub

type WebFuzzSub struct {
	Url string
}

func (*WebFuzzSub) Get

func (w *WebFuzzSub) Get() proxy.ProxyList

func (*WebFuzzSub) Get2Chan

func (w *WebFuzzSub) Get2Chan(pc chan proxy.Proxy, wg *sync.WaitGroup)

Jump to

Keyboard shortcuts

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