hunter

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HUNTER   = "HUNTER"
	AUTH_URL = "https://hunter.qianxin.com/openApi/search?api-key="
)

Variables

View Source
var (
	SEARCH_URL = ""
)

Functions

func ToHunterGrammer

func ToHunterGrammer(s string) (string, error)

Types

type HunterSearchFiled

type HunterSearchFiled struct {
	// contains filtered or unexported fields
}

func NewHunterSearchFiled

func NewHunterSearchFiled(search string, pageIndex, pageSize int) HunterSearchFiled

type HunterSearchResult

type HunterSearchResult struct {
	Code int `json:"code"`
	Data struct {
		AccountType string `json:"account_type"`
		Total       int    `json:"total"`
		Time        int    `json:"time"`
		Arr         []struct {
			IsRisk         string `json:"is_risk"`
			URL            string `json:"url"`
			IP             string `json:"ip"`
			Port           int    `json:"port"`
			WebTitle       string `json:"web_title"`
			Domain         string `json:"domain"`
			IsRiskProtocol string `json:"is_risk_protocol"`
			Protocol       string `json:"protocol"`
			BaseProtocol   string `json:"base_protocol"`
			StatusCode     int    `json:"status_code"`
			Component      []struct {
				Name    string `json:"name"`
				Version string `json:"version"`
			} `json:"component"`
			Os        string `json:"os"`
			Company   string `json:"company"`
			Number    string `json:"number"`
			Country   string `json:"country"`
			Province  string `json:"province"`
			City      string `json:"city"`
			UpdatedAt string `json:"updated_at"`
			IsWeb     string `json:"is_web"`
			AsOrg     string `json:"as_org"`
			Isp       string `json:"isp"`
			Banner    string `json:"banner"`
		} `json:"arr"`
		ConsumeQuota string `json:"consume_quota"`
		RestQuota    string `json:"rest_quota"`
		SyntaxPrompt string `json:"syntax_prompt"`
	} `json:"data"`
	Message string `json:"message"`
}

HunterSearchResult Hunter query data interface return data structure

type Provider

type Provider struct {
}

func (*Provider) Auth

func (p *Provider) Auth(s *sources.Session) bool

Auth checks if the provider is valid to use

func (*Provider) Name

func (p *Provider) Name() string

Name returns the name of the provider

func (*Provider) Search

func (p *Provider) Search(query *sources.Query) (chan *sources.Result, error)

Search the result with provider

Jump to

Keyboard shortcuts

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