basic

package
v0.0.0-...-15a53c3 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicHashOperator

type BasicHashOperator struct {
	Url     string
	Actions []IResultAction
}

func (BasicHashOperator) AddActions

func (x BasicHashOperator) AddActions(action IResultAction)

func (BasicHashOperator) HandleNewHash

func (x BasicHashOperator) HandleNewHash(hash string, err error)

type BasicParser

type BasicParser struct{}

func (BasicParser) GetContent

func (BasicParser) GetContent(document *goquery.Document, css_selector string) (string, error)

type BasicRequester

type BasicRequester struct {
	CookiesMap map[string]string
}

func (BasicRequester) GetPage

func (requester BasicRequester) GetPage(url string) (*goquery.Document, error)

func (BasicRequester) SetCookies

func (requester BasicRequester) SetCookies(CookiesMap map[string]string)

type DebugResultAction

type DebugResultAction struct{}

func (DebugResultAction) OnError

func (DebugResultAction) OnError(info ResultInfo, err error)

func (DebugResultAction) OnFirstHash

func (DebugResultAction) OnFirstHash(info ResultInfo)

func (DebugResultAction) OnHashChanged

func (DebugResultAction) OnHashChanged(info ResultInfo)

func (DebugResultAction) OnHashUnchanged

func (DebugResultAction) OnHashUnchanged(info ResultInfo)

type HasherSha1

type HasherSha1 struct{}

func (HasherSha1) GetHash

func (HasherSha1) GetHash(content string) (string, error)

type IContentParser

type IContentParser interface {
	GetContent(document *goquery.Document, css_selector string) (string, error)
}

type IHashOperator

type IHashOperator interface {
	HandleNewHash(hash string, err error)
	AddActions(action IResultAction)
}

type IHasher

type IHasher interface {
	GetHash(content string) (string, error)
}

type IResultAction

type IResultAction interface {
	OnFirstHash(info ResultInfo)
	OnHashChanged(info ResultInfo)
	OnHashUnchanged(info ResultInfo)
	OnError(info ResultInfo, err error)
}

type IWebpageRequester

type IWebpageRequester interface {
	GetPage(url string) (*goquery.Document, error)
}

type ResultInfo

type ResultInfo struct {
	Filepath string
	Hash     string
	Url      string
}

Jump to

Keyboard shortcuts

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