bot

package
v0.0.0-...-d48211e Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCountSymbolsInArticle

func GetCountSymbolsInArticle(userMessage string, c *Config) (int, error)

func GetDomain

func GetDomain(url string) string

func IsCorrectURL

func IsCorrectURL(url string, c *Config) bool

func Start

func Start(state bool, configFile string)

Types

type Config

type Config struct {
	Token  string `json:"Token"`
	ChatID int64  `json:"ChatID"`
	Medium string `json:"Medium"`
	Site   struct {
		Login    string `json:"Login"`
		Password string `json:"Password"`
		Domain   string `json:"Domain"`
		URL      string `json:"URL"`
	} `json:"Site"`
}

func (*Config) LoadScrapingConfiguration

func (c *Config) LoadScrapingConfiguration(configFile string)

type WPResponse

type WPResponse struct {
	Content struct {
		Rendered string `json:"rendered"`
	} `json:"content"`
}

Jump to

Keyboard shortcuts

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