models

package
v0.0.0-...-c197fc7 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bot

type Bot struct {
	BotAPI *tgbotapi.BotAPI
	// contains filtered or unexported fields
}

func NewBot

func NewBot(logger Logger) *Bot

func (*Bot) SendMessage

func (bot *Bot) SendMessage(msg tgbotapi.Chattable, chatID int64) error

func (*Bot) SetUpUpdates

func (bot *Bot) SetUpUpdates() tgbotapi.UpdatesChannel

type Coordinates

type Coordinates struct {
	Lat string
	Lon string
}

func NewCoordinates

func NewCoordinates(lat, lon string) Coordinates

type Logger

type Logger interface {
	Debug(args ...interface{})
	Info(args ...interface{})
	Warn(args ...interface{})
	Error(args ...interface{})
	Panic(args ...interface{})
	Fatal(args ...interface{})

	Debugf(template string, args ...interface{})
	Infof(template string, args ...interface{})
	Warnf(template string, args ...interface{})
	Errorf(template string, args ...interface{})
	Panicf(template string, args ...interface{})
	Fatalf(template string, args ...interface{})
}

func GetNewLogger

func GetNewLogger() Logger

type WeatherData

type WeatherData struct {
	City        string
	Country     string
	Coordinates Coordinates
	Date        time.Time
}

func NewWeatherData

func NewWeatherData(city, country string, coordinates Coordinates, date time.Time) WeatherData

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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