usecase

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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileUsecaseInterface

type FileUsecaseInterface interface {
	SaveFiles()
}

func NewFileUsecase

func NewFileUsecase(fileRepository repository.FileRepositoryInterface, proxyRepository repository.ProxyRepositoryInterface, fileOutputExtensions []string) FileUsecaseInterface

type ProxyUsecase

type ProxyUsecase struct {
	ProxyRepository repository.ProxyRepositoryInterface
	ProxyService    service.ProxyServiceInterface
	ProxyMap        sync.Map
	SpecialIPs      []string
	PrivateIPs      []net.IPNet
}

func (*ProxyUsecase) GetAllAdvancedView

func (uc *ProxyUsecase) GetAllAdvancedView() []entity.AdvancedProxy

func (*ProxyUsecase) IsSpecialIP

func (uc *ProxyUsecase) IsSpecialIP(ip string) bool

func (*ProxyUsecase) ProcessProxy

func (uc *ProxyUsecase) ProcessProxy(category string, proxy string, isChecked bool) (*entity.Proxy, error)

type ProxyUsecaseInterface

type ProxyUsecaseInterface interface {
	ProcessProxy(category string, proxy string, isChecked bool) (*entity.Proxy, error)
	IsSpecialIP(ip string) bool
	GetAllAdvancedView() []entity.AdvancedProxy
}

func NewProxyUsecase

func NewProxyUsecase(
	proxyRepository repository.ProxyRepositoryInterface,
	proxyService service.ProxyServiceInterface,
	specialIPs []string,
	privateIPs []net.IPNet,
) ProxyUsecaseInterface

type SourceUsecase

type SourceUsecase struct {
	SourceRepository repository.SourceRepositoryInterface
	FetcherUtil      utils.FetcherUtilInterface
}

func (*SourceUsecase) LoadSources

func (uc *SourceUsecase) LoadSources() ([]entity.Source, error)

func (*SourceUsecase) ProcessSource

func (uc *SourceUsecase) ProcessSource(source *entity.Source) ([]string, error)

type SourceUsecaseInterface

type SourceUsecaseInterface interface {
	LoadSources() ([]entity.Source, error)
	ProcessSource(source *entity.Source) ([]string, error)
}

Jump to

Keyboard shortcuts

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