app

package
v0.0.0-...-fb2d283 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnauthorized = errors.New("401 unauthorized")
	ErrParse        = errors.New("error")
)
View Source
var (
	EmptyMessage = ""
	Start        = "start"
	Unknown      = "unknown"
	WrongLink    = "wrong_link"
)

Functions

This section is empty.

Types

type BotAPI

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

func New

func New(config *Config) (*BotAPI, error)

func (*BotAPI) Run

func (b *BotAPI) Run() error

type Config

type Config struct {
	Token       string            `toml:"token"`
	ChatID      int64             `toml:"chat_id"`
	LogLevel    string            `toml:"log_level"`
	BotLogLevel bool              `toml:"bot_log_level"`
	AccessUsers []string          `toml:"access_users"`
	Text        map[string]string `toml:"messages"`
	Webhook     struct {
		IsWebhook bool   `toml:"is_webhook"`
		Cert      string `toml:"cert"`
		Addr      string `toml:"addr"`
	} `toml:"webhook"`
	Scraper *scrape.Config
}

func NewConfig

func NewConfig() *Config

Jump to

Keyboard shortcuts

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