repository

package
v0.0.0-...-b8ff696 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 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 Repository

type Repository interface {
	CreateJob(settings *models.JobInfo) (*models.JobInfo, error)
	GetJobs(ctx context.Context) ([]models.JobInfo, error)
	GetJobByID(ctx context.Context, info *models.JobInfo) (*models.JobInfo, error)
	UpdateJob(ctx context.Context, info *models.JobInfo) (*models.JobInfo, error)
	DeleteJob(ctx context.Context, info *models.JobInfo) error

	CreateBot(ctx context.Context, tgJob *models.TelegramJob) error
	GetBotsByJobID(ctx context.Context, tgJob *models.TelegramJob) ([]models.TelegramJob, error)
	GetIDsByJob(ctx context.Context, tgJob *models.TelegramJob) ([]models.TelegramJob, error)
	GetJobsByBotID(ctx context.Context, tgJob *models.TelegramJob) ([]models.TelegramJob, error)
	DeleteBotByID(ctx context.Context, tgJob *models.TelegramJob) error
	DeleteBotByJob(ctx context.Context, tgJob *models.TelegramJob) error
	DeleteAllBots(ctx context.Context) error

	CheckUser(ctx context.Context, user *models.User) error

	Close()
}

func New

func New(ctx context.Context, cfg config.Config) (Repository, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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