service

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventService

type EventService interface {
	GetAllEvent(c echo.Context) (*[]entity.Event, error)
	GetAllEventWithPaginateAndFilter(c echo.Context, paginate *binder.PaginateRequest, filter *binder.FilterRequest, sort *binder.SortRequest) (*map[string]interface{}, error)
	CreateEvent(c echo.Context, event *entity.Event) (*entity.Event, error)
	FindEventById(c echo.Context, id uuid.UUID) (*entity.Event, error)
	FindEventDetailById(c echo.Context, id uuid.UUID) (*entity.Event, error)
	UpdateEvent(c echo.Context, event *entity.Event) (*entity.Event, error)
	DeleteEvent(c echo.Context, id uuid.UUID) error
}

func NewEventService

func NewEventService(eventRepository repository.EventRepository) EventService

type NotificationService

type NotificationService interface {
	CreateNotification(c echo.Context, notif *entity.Notification) (*entity.Notification, error)
	GetUserNotification(c echo.Context, id uuid.UUID, paginate *binder.PaginateRequest, isRead *bool) (*map[string]interface{}, error)
	GetDetailNotification(c echo.Context, id, userId uuid.UUID) (*entity.Notification, error)
}

func NewNotificationService

func NewNotificationService(notifRepository repository.NotificationRepository) NotificationService

type OneTimePasswordService

type OneTimePasswordService interface {
	GenerateForRegister(c context.Context, email string) (*entity.OneTimePassword, error)
	FindOneByCodeAndEmail(c context.Context, email, code string) (*entity.OneTimePassword, error)
}

func NewOneTimePasswordService

func NewOneTimePasswordService(otpRepository repository.OneTimePasswordRepository, scheduler scheduler.Scheduler) OneTimePasswordService

type PaymenService

type PaymenService interface {
	CreateTransaction(c context.Context, payment *entity.Payment) (*string, error)
}

func NewPaymentService

func NewPaymentService(snapClient payment.PaymentGateway) PaymenService

type TicketService

type TicketService interface {
	CreateBatchTicket(c echo.Context, transactionID uuid.UUID, tickets *[]entity.Ticket) (*[]entity.Ticket, error)
	FindByNoTicket(c echo.Context, noTicket string) (*entity.Ticket, error)
	EditTicket(c echo.Context, tickets *entity.Ticket) (*entity.Ticket, error)
}

func NewTicketService

func NewTicketService(ticketRepo repository.TicketRepository) TicketService

type TimetableService

type TimetableService interface {
	FindById(c echo.Context, id uuid.UUID) (*entity.Timetable, error)
	FindByIds(c echo.Context, ids []uuid.UUID) ([]entity.Timetable, error)
	UpdateTicketStock(c echo.Context, ticketCounts map[uuid.UUID]int32, isDecrease bool) error
}

func NewTimetableService

func NewTimetableService(timetableRepo repository.TimetableRepository) TimetableService

type TokenService

type TokenService interface {
	GenerateTokenRegistration(c echo.Context, otp, email string) (*entity.Token, error)
	GenerateTokenForgotPassword(c echo.Context, email string) (*entity.Token, error)
}

func NewTokenService

func NewTokenService(
	otpRepository repository.OneTimePasswordRepository,
	tokenRepository repository.TokenRepository,
	userRepository repository.UserRepository,
	scheduler scheduler.Scheduler) TokenService

type TransactionService

type TransactionService interface {
	CreateTransaction(c echo.Context, transaction *entity.Transaction) (*entity.Transaction, error)
	FindTransactionById(c echo.Context, id uuid.UUID) (*entity.Transaction, error)
	FindTransactionByInvoice(c echo.Context, invoice string) (*entity.Transaction, error)
	FindUserTransactionHistory(c echo.Context, id uuid.UUID, paginate *binder.PaginateRequest) (*map[string]interface{}, error)
	EditTransaction(c echo.Context, transaction *entity.Transaction) (*entity.Transaction, error)
}

func NewTransactionService

func NewTransactionService(transactionRepo repository.TransactionRepository) TransactionService

type UserService

type UserService interface {
	UserRegistration(c echo.Context, token string, user *entity.User) (*entity.User, error)
	Login(c context.Context, email, password string) (string, error)
	GetProfile(c context.Context, userAuth *jwt.Token) (*entity.User, error)
	FindUserByEmail(c context.Context, email string) (*entity.User, error)
	ChangePassword(c context.Context, token, password string) error
}

func NewUserService

func NewUserService(
	tokenRepository repository.TokenRepository,
	userRepository repository.UserRepository,
	jwtToken jwt_token.JwtToken) UserService

Jump to

Keyboard shortcuts

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