telegram

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2022 License: CC0-1.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

func New

func New(cfg *TelegramConfig) (*Service, error)

func (*Service) IsActive

func (s *Service) IsActive() bool

func (*Service) Send

func (s *Service) Send(_ context.Context, text string, attachment interface{}) error

type TelegramConfig

type TelegramConfig struct {
	IsActive bool   `yaml:"is_active"`
	BotToken string `yaml:"bot_token"`
	ChatId   int64  `yaml:"chat_id"`
}

Jump to

Keyboard shortcuts

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