service

package
v0.0.0-...-8b0fe6f Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BotService

type BotService struct {
	MaxFailNum   int
	HTTPRootPath string
	// contains filtered or unexported fields
}

BotService contains common application data

func NewBotService

func NewBotService(cfg *Config) (*BotService, error)

NewBotService creates BotService

func (*BotService) Close

func (s *BotService) Close() error

Close service

func (*BotService) Init

func (s *BotService) Init() error

Init service, setup connection

func (*BotService) Routes

func (s *BotService) Routes() chi.Router

type Config

type Config struct {
	Token      string
	WebAppURL  string
	UseWebHook bool
	Addr       string
	Debug      bool
	DataPath   string
	BotClient  *http.Client

	HTTPRootPath string
	AppVersion   string
}

Config provides configuration for BotService

Jump to

Keyboard shortcuts

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