telegram

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 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 added in v0.5.23

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

func (*Service) SetTraceId added in v0.5.17

func (s *Service) SetTraceId(traceId string)

func (*Service) Type added in v0.5.9

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