telegram

package
v2.17.2 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: CC0-1.0 Imports: 3 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

func (*Service) SetDestination

func (s *Service) SetDestination(destination interface{})

func (*Service) SetTraceId

func (s *Service) SetTraceId(traceId string)

func (*Service) Type

func (s *Service) Type() string

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