agent

package
v0.0.0-...-5c1c057 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2023 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MsgProvideAppNumber           = "Please provide an application number after /track."
	MsgInvalidID                  = "Invalid id."
	MsgAlreadyTracked             = "Application is already being tracked."
	MsgProvideAppNumberAfterCheck = "Please provide an application number after /check."
)

Variables

View Source
var (
	ErrAppNotFound   = errors.New("Application not found.")
	ErrForbidden     = errors.New("Forbidden access. Please try again later.")
	ErrAlreadyExists = errors.New("Application is already being tracked.")
)

Functions

This section is empty.

Types

type Agent

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

func New

func New(bot *tgbotapi.BotAPI, sqsClient *sqs.Client, repo Storage, midClient *http.Client) *Agent

func (*Agent) HandleUpdate

func (a *Agent) HandleUpdate(c echo.Context) error

type Storage

type Storage interface {
	GetApplication(*models.Application) (*models.Application, error)
	SaveApplication(*models.Application) error
	RemoveApplication(*models.Application) error
	UpdateApplicationStatus(app *models.Application, status int) error
}

Jump to

Keyboard shortcuts

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