quote

package
v0.0.0-...-fdc35f2 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(items []*SourceIsins, dbpath string, mode taskengine.Mode) error

Get retrieves the quotes specified by the SourceIsins object. The mode parameters specified the taskengine mode of execution. The results quotes are printed in json format. The quotes are also saved to the database, if the dbpath is given.

func Sources

func Sources() []string

Sources returns a sorted list of the names of the avaliable quoteGetters.

func TorCheck

func TorCheck(proxy string) (bool, string, error)

TorCheck checks if a Tor connection is used, retrieving the "https://check.torproject.org" page. It returns:

  • bool: true if Tor is used, false otherwise
  • string: the message contained in the html page
  • error: if the message cannot be determined

Types

type SourceIsins

type SourceIsins struct {
	Source  string   `json:"source,omitempty"`
	Workers int      `json:"workers,omitempty"`
	Proxy   string   `json:"proxy,omitempty"`
	Isins   []string `json:"isins,omitempty"`
}

SourceIsins struct represents the isins to get from a specific source

Jump to

Keyboard shortcuts

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