service

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package telegram is telegram server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Initialize

func Initialize(ctx context.Context)

Types

type Type

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

Type client

var Instance *Type

func New

func New(ctx context.Context, dao *dao.Type, token, api string) (*Type, error)

New create new telegram client

func (*Type) LoadAlertTypes

func (s *Type) LoadAlertTypes(cfg *dto.QueryCfg) (alerts []*model.AlertTypes, err error)

func (*Type) LoadAlertTypesByUser

func (s *Type) LoadAlertTypesByUser(u *model.Users) (alerts []*model.AlertTypes, err error)

func (*Type) LoadUsers

func (s *Type) LoadUsers(cfg *dto.QueryCfg) (users []*model.Users, err error)

func (*Type) LoadUsersByAlertType

func (s *Type) LoadUsersByAlertType(a *model.AlertTypes) (users []*model.Users, err error)

func (*Type) PleaseRetry

func (s *Type) PleaseRetry(sender *tb.User, msg string)

PleaseRetry echo retry

func (*Type) SendMsgToUser

func (s *Type) SendMsgToUser(uid int, msg string) (err error)

func (*Type) Stop

func (s *Type) Stop()

Stop stop telegram polling

func (*Type) ValidateTokenForAlertType

func (s *Type) ValidateTokenForAlertType(token, alertType string) (alert *model.AlertTypes, err error)

Jump to

Keyboard shortcuts

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