service

package
v0.0.0-...-0aa0c45 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2025 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthService

type AuthService interface {
	Register(ctx context.Context, request dto.RegisterRequest) (dto.RegisterResponse, error)
	InternalLogin(ctx context.Context, request dto.InternalLoginRequest) (dto.LoginResponse, error)
	VerifyToken(ctx context.Context, token string) (bool, map[string]any, error)
	GetOAuth2URL(ctx context.Context, provider string) (string, error)
	OAuth2Login(ctx context.Context, provider, code, state string) (dto.LoginResponse, error)
	VerifyRegistration(ctx context.Context, token string) (dto.LoginResponse, error)
	SendPasswordReset(ctx context.Context, email string) error
	ResetPassword(ctx context.Context, token, newPassword string) (dto.LoginResponse, error)
}

func NewAuthService

func NewAuthService(
	authClient auth.AuthClient,
	verificationURL string,
	resetPasswordURL string,
) AuthService

type DebtService

type DebtService interface {
	RecordNewTransaction(ctx context.Context, request dto.NewDebtTransactionRequest) (dto.DebtTransactionResponse, error)
	GetTransactions(ctx context.Context, userProfileID uuid.UUID) ([]dto.DebtTransactionResponse, error)
	ProcessConfirmedGroupExpense(ctx context.Context, groupExpense groupexpense.GroupExpense) error
	GetAllByProfileIDs(ctx context.Context, userProfileID, friendProfileID uuid.UUID) ([]dto.DebtTransactionResponse, error)
}

func NewDebtService

func NewDebtService(
	debtClient debt.DebtClient,
	friendshipService FriendshipService,
	profileService ProfileService,
) DebtService

type ExpenseBillService

type ExpenseBillService interface {
	Save(ctx context.Context, req *dto.NewExpenseBillRequest) (dto.ExpenseBillResponse, error)
	GetAllCreated(ctx context.Context, creatorProfileID uuid.UUID) ([]dto.ExpenseBillResponse, error)
	Get(ctx context.Context, profileID, id uuid.UUID) (dto.ExpenseBillResponse, error)
	Delete(ctx context.Context, profileID, id uuid.UUID) error
}

func NewExpenseBillService

func NewExpenseBillService(
	logger ezutil.Logger,
	friendshipService FriendshipService,
	profileService ProfileService,
	expenseBillClient expensebill.ExpenseBillClient,
	imageUploadClient imageupload.ImageUploadClient,
	bucketName string,
	taskQueue meq.TaskQueue[message.ExpenseBillUploaded],
) ExpenseBillService

type ExpenseItemService

type ExpenseItemService interface {
	Add(ctx context.Context, request dto.NewExpenseItemRequest) (dto.ExpenseItemResponse, error)
	GetDetails(ctx context.Context, groupExpenseID, expenseItemID, userProfileID uuid.UUID) (dto.ExpenseItemResponse, error)
	Update(ctx context.Context, request dto.UpdateExpenseItemRequest) (dto.ExpenseItemResponse, error)
	Remove(ctx context.Context, groupExpenseID, expenseItemID, userProfileID uuid.UUID) error
}

func NewExpenseItemService

func NewExpenseItemService(
	profileService ProfileService,
	expenseItemClient expenseitem.ExpenseItemClient,
) ExpenseItemService

type FriendDetailsService

type FriendDetailsService interface {
	GetDetails(ctx context.Context, profileID, friendshipID uuid.UUID) (dto.FriendDetailsResponse, error)
}

func NewFriendDetailsService

func NewFriendDetailsService(
	friendshipClient friendship.FriendshipClient,
	debtSvc DebtService,
	profileSvc ProfileService,
) FriendDetailsService

type FriendshipRequestService

type FriendshipRequestService interface {
	Send(ctx context.Context, userProfileID, friendProfileID uuid.UUID) error
	GetAllSent(ctx context.Context, userProfileID uuid.UUID) ([]dto.FriendshipRequestResponse, error)
	Cancel(ctx context.Context, userProfileID, reqID uuid.UUID) error
	GetAllReceived(ctx context.Context, userProfileID uuid.UUID) ([]dto.FriendshipRequestResponse, error)
	Ignore(ctx context.Context, userProfileID, reqID uuid.UUID) error
	Block(ctx context.Context, userProfileID, reqID uuid.UUID) error
	Unblock(ctx context.Context, userProfileID, reqID uuid.UUID) error
	Accept(ctx context.Context, userProfileID, reqID uuid.UUID) (dto.FriendshipResponse, error)
}

func NewFriendshipRequestService

func NewFriendshipRequestService(requestClient friendship.RequestClient) FriendshipRequestService

type FriendshipService

type FriendshipService interface {
	CreateAnonymous(ctx context.Context, request dto.NewAnonymousFriendshipRequest) (dto.FriendshipResponse, error)
	GetAll(ctx context.Context, profileID uuid.UUID) ([]dto.FriendshipResponse, error)
	IsFriends(ctx context.Context, profileID1, profileID2 uuid.UUID) (bool, bool, error)
}

func NewFriendshipService

func NewFriendshipService(friendshipClient friendship.FriendshipClient) FriendshipService

type GroupExpenseService

type GroupExpenseService interface {
	CreateDraft(ctx context.Context, request dto.NewGroupExpenseRequest) (dto.GroupExpenseResponse, error)
	GetAllCreated(ctx context.Context, userProfileID uuid.UUID) ([]dto.GroupExpenseResponse, error)
	GetDetails(ctx context.Context, id, userProfileID uuid.UUID) (dto.GroupExpenseResponse, error)
	ConfirmDraft(ctx context.Context, id, userProfileID uuid.UUID) (dto.GroupExpenseResponse, error)
}

func NewGroupExpenseService

func NewGroupExpenseService(
	friendshipService FriendshipService,
	debtService DebtService,
	profileService ProfileService,
	groupExpenseClient groupexpense.GroupExpenseClient,
) GroupExpenseService

type OtherFeeService

type OtherFeeService interface {
	Add(ctx context.Context, request dto.NewOtherFeeRequest) (dto.OtherFeeResponse, error)
	Update(ctx context.Context, request dto.UpdateOtherFeeRequest) (dto.OtherFeeResponse, error)
	Remove(ctx context.Context, groupExpenseID, otherFeeID, userProfileID uuid.UUID) error
	GetCalculationMethods(ctx context.Context) ([]dto.FeeCalculationMethodInfo, error)
}

func NewOtherFeeService

func NewOtherFeeService(
	profileService ProfileService,
	otherFeeClient otherfee.OtherFeeClient,
) OtherFeeService

type ProfileService

type ProfileService interface {
	GetByID(ctx context.Context, id uuid.UUID) (dto.ProfileResponse, error)
	GetNames(ctx context.Context, ids []uuid.UUID) (map[uuid.UUID]string, error)
	Update(ctx context.Context, id uuid.UUID, name string) (dto.ProfileResponse, error)
	Search(ctx context.Context, profileID uuid.UUID, input string) ([]dto.ProfileResponse, error)
	Associate(ctx context.Context, userProfileID, realProfileID, anonProfileID uuid.UUID) error
}

func NewProfileService

func NewProfileService(
	profileClient profile.ProfileClient,
) ProfileService

type TransferMethodService

type TransferMethodService interface {
	GetAll(ctx context.Context) ([]dto.TransferMethodResponse, error)
}

func NewTransferMethodService

func NewTransferMethodService(transferMethodClient debt.TransferMethodClient) TransferMethodService

Jump to

Keyboard shortcuts

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