repository

package
v0.0.0-...-3a05e6f Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BotRepository

type BotRepository interface {
	SetWebhook(ctx context.Context) error
	GetUpdate(ctx context.Context, r io.Reader) (*tgbotapi.Update, error)
	SendMessage(ctx context.Context, c tgbotapi.Chattable) (*tgbotapi.Message, error)
	SendTextMessage(ctx context.Context, chatID int64, text string) (*tgbotapi.Message, error)
	DeleteMessage(ctx context.Context, chatID int64, messageID int) (*tgbotapi.Message, error)
	GetFileURL(ctx context.Context, fileID string) (string, error)
}

BotRepository is an interface for managing interactions with a Telegram bot.

func NewBotRepository

func NewBotRepository(cfg *config.Config, bot *tgbotapi.BotAPI) BotRepository

NewBotRepository creates a new BotRepository using the provided configuration and Telegram bot.

type GSheetRepository

type GSheetRepository interface {
	AppendRow(ctx context.Context, sheetName string, input [][]any) error
	GetValues(ctx context.Context, valueRange string) (*sheets.ValueRange, error)
}

func NewGSheetRepository

func NewGSheetRepository(cfg *config.Config, service *sheets.Service) GSheetRepository

Jump to

Keyboard shortcuts

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