service

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProxyService

type ProxyService struct {
	FetcherUtil       utils.FetcherUtilInterface
	URLParserUtil     utils.URLParserUtilInterface
	HTTPTestingSites  []string
	HTTPSTestingSites []string
	UserAgents        []string
	Semaphore         chan struct{}
}

func (*ProxyService) Check

func (s *ProxyService) Check(category string, ip string, port string) (*entity.Proxy, error)

func (*ProxyService) GetRandomUserAgent

func (s *ProxyService) GetRandomUserAgent() string

func (*ProxyService) GetTestingSite

func (s *ProxyService) GetTestingSite(category string) string

type ProxyServiceInterface

type ProxyServiceInterface interface {
	Check(category string, ip string, port string) (*entity.Proxy, error)
	GetTestingSite(category string) string
	GetRandomUserAgent() string
}

func NewProxyService

func NewProxyService(
	fetcherUtil utils.FetcherUtilInterface,
	urlParserUtil utils.URLParserUtilInterface,
	httpTestingSites []string,
	httpsTestingSites []string,
	userAgents []string,
) ProxyServiceInterface

Jump to

Keyboard shortcuts

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