services

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonRespondsService

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

func NewCommonRespondsService

func NewCommonRespondsService(
	respondsRepository interfaces.RespondsRepository,
	toysRepository interfaces.ToysRepository,
	logger *slog.Logger,
) *CommonRespondsService

func (*CommonRespondsService) GetRespondByID

func (service *CommonRespondsService) GetRespondByID(ctx context.Context, id uint64) (*entities.Respond, error)

func (*CommonRespondsService) GetTicketResponds

func (service *CommonRespondsService) GetTicketResponds(
	ctx context.Context,
	ticketID uint64,
) ([]entities.Respond, error)

func (*CommonRespondsService) GetUserResponds

func (service *CommonRespondsService) GetUserResponds(
	ctx context.Context,
	userID uint64,
) ([]entities.Respond, error)

func (*CommonRespondsService) RespondToTicket

func (service *CommonRespondsService) RespondToTicket(
	ctx context.Context,
	respondData entities.RawRespondToTicketDTO,
) (uint64, error)

type CommonTicketsService

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

func NewCommonTicketsService

func NewCommonTicketsService(
	ticketsRepository interfaces.TicketsRepository,
	toysRepository interfaces.ToysRepository,
	logger *slog.Logger,
) *CommonTicketsService

func (*CommonTicketsService) CreateTicket

func (service *CommonTicketsService) CreateTicket(
	ctx context.Context,
	ticketData entities.CreateTicketDTO,
) (uint64, error)

func (*CommonTicketsService) GetAllTickets

func (service *CommonTicketsService) GetAllTickets(ctx context.Context) ([]entities.Ticket, error)

func (*CommonTicketsService) GetTicketByID

func (service *CommonTicketsService) GetTicketByID(ctx context.Context, id uint64) (*entities.Ticket, error)

func (*CommonTicketsService) GetUserTickets

func (service *CommonTicketsService) GetUserTickets(ctx context.Context, userID uint64) ([]entities.Ticket, error)

Jump to

Keyboard shortcuts

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