usecase

package
v0.0.0-...-9ea3a31 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package usecase provides business logic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetParserUseCase

func SetParserUseCase(uc *ParserUseCase)

Types

type BotUseCase

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

BotUseCase object capable of interacting with BotUseCase

func NewBotUseCase

func NewBotUseCase(ctx context.Context, cfg *entity.BotConfig, log *logger.Zerolog, db *database.Database, usersRepo UsersRepo) (*BotUseCase, error)

NewBotUseCase creates a new BotUseCase

func (*BotUseCase) CreateExifMessage

func (uc *BotUseCase) CreateExifMessage(exif map[string]*entity.ExifResultItem, lang string) string

func (*BotUseCase) Start

func (uc *BotUseCase) Start()

type ParserUseCase

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

func NewParserUseCase

func NewParserUseCase(ctx context.Context, cfg *entity.ParserConfig, log *logger.Zerolog) (*ParserUseCase, error)

func (*ParserUseCase) GetChannel

func (uc *ParserUseCase) GetChannel() chan *entity.ParserJob

func (*ParserUseCase) Parse

func (uc *ParserUseCase) Parse(url string) (map[string]*entity.ExifResultItem, error)

type UsersRepo

type UsersRepo interface {
	Create(ctx context.Context, in *entity.User) (*entity.User, error)
	Get(ctx context.Context, filter *entity.UsersFilter) ([]*entity.User, error)
}

UsersRepo is the common interface implemented UsersRepository methods

Jump to

Keyboard shortcuts

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