query

package
v0.0.0-...-2da4bf4 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2019 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InfoTpl         = `Version: %s BuildTime %s`
	HelloTpl        = `Привет, %s`
	SearchAnswerTpl = "Поиск по запросу %q"
	HelpTpl         = `` /* 151-byte string literal not displayed */

	SearchTpl = `` /* 262-byte string literal not displayed */

)

Variables

View Source
var (
	SearchRe = regexp.MustCompile(`(?i)search\s(.*)`)
	QueryRe  = regexp.MustCompile(`\s`)
)
View Source
var Module = module.Module{
	{Constructor: newConfig},
	{Constructor: newService},
}

Functions

func GetLink(query string, s *goquery.Selection) string

func SearchTemplate

func SearchTemplate() (*template.Template, error)

Types

type Command

type Command struct {
	Name        string
	Link        string
	Description string
}

type Config

type Config struct {
	Token   string
	Client  *http.Client
	Workers int
}

type Markdown

type Markdown string

type SearchResults

type SearchResults struct {
	Commands []Command
}

func SearchInDocuments

func SearchInDocuments(query string) (*SearchResults, error)

type Service

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

func (*Service) Job

func (s *Service) Job(ctx context.Context)

func (*Service) Send

func (s *Service) Send(log *zap.Logger, update tgbotapi.Update, msg interface{})

type Sticker

type Sticker string

type StringsField

type StringsField [][]string

Jump to

Keyboard shortcuts

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