cmd

package
v0.0.0-...-53a3200 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type LoggableSearchResult

type LoggableSearchResult struct {
	URL        string  `json:"url"`
	Title      string  `json:"title"`
	Seed       string  `json:"seed"`
	Leech      string  `json:"leech"`
	MagnetLink string  `json:"magnetlink,omitempty"`
	FileSize   int     `json:"filesize"`
	Engine     string  `json:"engine"`
	Score      float64 `json:"score"`
}

type SearchResult

type SearchResult struct {
	URL           string   `json:"url"`
	Title         string   `json:"title"`
	Seed          string   `json:"seed"`
	Leech         string   `json:"leech"`
	MagnetLink    string   `json:"magnetlink,omitempty"`
	Template      string   `json:"template"`
	PublishedDate string   `json:"publishedDate,omitempty"`
	FileSize      int      `json:"filesize"`
	Engine        string   `json:"engine"`
	ParsedURL     []string `json:"parsed_url"`
	Engines       []string `json:"engines"`
	Positions     []int    `json:"positions"`
	Score         float64  `json:"score"`
	Category      string   `json:"category"`
	PrettyURL     string   `json:"pretty_url"`
	PubDate       string   `json:"pubdate,omitempty"`
	OpenGroup     bool     `json:"open_group,omitempty"`
	CloseGroup    bool     `json:"close_group,omitempty"`
}

type SearchResultList

type SearchResultList []SearchResult

func (SearchResultList) Len

func (e SearchResultList) Len() int

func (SearchResultList) Less

func (e SearchResultList) Less(i, j int) bool

func (SearchResultList) Swap

func (e SearchResultList) Swap(i, j int)

type SearxResponse

type SearxResponse struct {
	Query               string           `json:"query"`
	NumberOfResults     int              `json:"number_of_results"`
	Results             SearchResultList `json:"results"`
	Answers             []interface{}    `json:"answers"`
	Corrections         []interface{}    `json:"corrections"`
	Infoboxes           []interface{}    `json:"infoboxes"`
	Suggestions         []interface{}    `json:"suggestions"`
	UnresponsiveEngines [][]string       `json:"unresponsive_engines"`
}

Jump to

Keyboard shortcuts

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