Documentation ¶
Index ¶
- Variables
- func ConvertMultipartToFile(multipartFile *multipart.FileHeader) (*entities.File, error)
- func ValidateToken(token string) (*entities.Claims, bool)
- type AlbumService
- func (a *AlbumService) CreateMany(ctx context.Context, imageFiles []*multipart.FileHeader) ([]*entities.Image, error)
- func (a *AlbumService) CreateOne(ctx context.Context, imageFile *multipart.FileHeader) (*entities.Image, error)
- func (a *AlbumService) GetUserAlbum(ctx context.Context) ([]*entities.Image, error)
- type AuthService
- type FeedService
- type MatchingService
- func (m *MatchingService) CreateMatching(ctx context.Context, matching *entities.UserMatching) (*entities.UserMatching, error)
- func (m *MatchingService) ListMatching(ctx context.Context, userId int64, page, limit int) ([]*entities.User, error)
- func (m *MatchingService) WhoILike(ctx context.Context, userId int64) ([]*entities.User, error)
- func (m *MatchingService) WhoLikeMe(ctx context.Context, partnerId int64) ([]*entities.User, error)
- type UserService
- func (u *UserService) CreateUser(ctx context.Context, user *entities.User) (*entities.User, error)
- func (u *UserService) DeleteUser(ctx context.Context, id int64) error
- func (u *UserService) GetUser(ctx context.Context, id int64) (*entities.User, error)
- func (u *UserService) SetAvatar(ctx context.Context, file *multipart.FileHeader) (string, error)
- func (u *UserService) UpdateUser(ctx context.Context, user *entities.User) (*entities.User, error)
- type WalletService
- func (w *WalletService) CreateTransaction(ctx context.Context, transaction *entities.WalletTransaction) (*entities.WalletTransaction, error)
- func (w *WalletService) GetTotal(ctx context.Context, userId int64) (*decimal.Decimal, error)
- func (w *WalletService) ListTransactions(ctx context.Context, userId int64, page, limit int) ([]*entities.WalletTransaction, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ServiceGraphSet = wire.NewSet( NewUserService, NewMatchingService, NewFeedService, NewAuthService, NewAlbumService, NewWalletService, )
Functions ¶
func ConvertMultipartToFile ¶
func ConvertMultipartToFile(multipartFile *multipart.FileHeader) (*entities.File, error)
Types ¶
type AlbumService ¶
type AlbumService struct {
// contains filtered or unexported fields
}
func NewAlbumService ¶
func NewAlbumService( albumRepo repos.AlbumRepo, ) *AlbumService
func (*AlbumService) CreateMany ¶
func (a *AlbumService) CreateMany(ctx context.Context, imageFiles []*multipart.FileHeader) ([]*entities.Image, error)
func (*AlbumService) CreateOne ¶
func (a *AlbumService) CreateOne(ctx context.Context, imageFile *multipart.FileHeader) (*entities.Image, error)
func (*AlbumService) GetUserAlbum ¶
type AuthService ¶
type AuthService struct {
// contains filtered or unexported fields
}
func NewAuthService ¶
func NewAuthService( userRepo repos.UserRepo, ) *AuthService
func (*AuthService) Login ¶
func (a *AuthService) Login(ctx context.Context, phone string) (*entities.RegisteredUser, error)
func (*AuthService) Register ¶
func (a *AuthService) Register(ctx context.Context, user *entities.User) (*entities.RegisteredUser, error)
type FeedService ¶
type FeedService struct {
// contains filtered or unexported fields
}
func NewFeedService ¶
func NewFeedService( feedRepo repos.FeedRepo, ) *FeedService
type MatchingService ¶
type MatchingService struct {
// contains filtered or unexported fields
}
func NewMatchingService ¶
func NewMatchingService( matchingRepo repos.MatchingRepo, ) *MatchingService
func (*MatchingService) CreateMatching ¶
func (m *MatchingService) CreateMatching(ctx context.Context, matching *entities.UserMatching) (*entities.UserMatching, error)
func (*MatchingService) ListMatching ¶
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func NewUserService( userRepo repos.UserRepo, fileRepo repos.FileRepo, ) *UserService
func (*UserService) CreateUser ¶
func (*UserService) DeleteUser ¶
func (u *UserService) DeleteUser(ctx context.Context, id int64) error
func (*UserService) SetAvatar ¶
func (u *UserService) SetAvatar(ctx context.Context, file *multipart.FileHeader) (string, error)
func (*UserService) UpdateUser ¶
type WalletService ¶
type WalletService struct {
// contains filtered or unexported fields
}
func NewWalletService ¶
func NewWalletService( walletRepo repos.WalletRepo, ) *WalletService
func (*WalletService) CreateTransaction ¶
func (w *WalletService) CreateTransaction( ctx context.Context, transaction *entities.WalletTransaction, ) (*entities.WalletTransaction, error)
func (*WalletService) ListTransactions ¶
func (w *WalletService) ListTransactions( ctx context.Context, userId int64, page, limit int, ) ([]*entities.WalletTransaction, error)
Click to show internal directories.
Click to hide internal directories.