mysql

package
v0.0.0-...-e9f4405 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlbumMysqlRepo

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

func NewAlbumMysqlRepo

func NewAlbumMysqlRepo(
	mysqlClient *infras.MysqlConnector,
	fileRepo repos.FileRepo,
) *AlbumMysqlRepo

func (*AlbumMysqlRepo) CreateMany

func (a *AlbumMysqlRepo) CreateMany(ctx context.Context, imageFiles []*entities.File) ([]*entities.Image, error)

func (*AlbumMysqlRepo) CreateOne

func (a *AlbumMysqlRepo) CreateOne(ctx context.Context, imageFile *entities.File) (*entities.Image, error)

func (*AlbumMysqlRepo) GetUserAlbum

func (a *AlbumMysqlRepo) GetUserAlbum(ctx context.Context) ([]*entities.Image, error)

type FeedMysqlRepo

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

func NewFeedMysqlRepo

func NewFeedMysqlRepo(
	db *infras.MysqlConnector,
) *FeedMysqlRepo

func (*FeedMysqlRepo) GetFeed

func (f *FeedMysqlRepo) GetFeed(ctx context.Context, userId int64, page, limit int) ([]*entities.User, error)

type MatchingMysqlRepo

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

func NewMatchingMysqlRepo

func NewMatchingMysqlRepo(
	db *infras.MysqlConnector,
) *MatchingMysqlRepo

func (*MatchingMysqlRepo) CreateOne

func (*MatchingMysqlRepo) DeleteOne

func (m *MatchingMysqlRepo) DeleteOne(ctx context.Context, userId, partnerId int64) error

func (*MatchingMysqlRepo) ListMatching

func (m *MatchingMysqlRepo) ListMatching(ctx context.Context, userId int64, page, limit int) ([]*entities.User, error)

func (*MatchingMysqlRepo) WhoILike

func (m *MatchingMysqlRepo) WhoILike(ctx context.Context, userId int64) ([]*entities.User, error)

func (*MatchingMysqlRepo) WhoLikeMe

func (m *MatchingMysqlRepo) WhoLikeMe(ctx context.Context, partnerId int64) ([]*entities.User, error)

type UserMysqlRepo

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

func NewUserMysqlRepo

func NewUserMysqlRepo(
	client *infras.MysqlConnector,
) *UserMysqlRepo

func (*UserMysqlRepo) CreateOne

func (u *UserMysqlRepo) CreateOne(ctx context.Context, user *entities.User) (*entities.User, error)

func (*UserMysqlRepo) DeleteOne

func (u *UserMysqlRepo) DeleteOne(ctx context.Context, id int64) error

func (*UserMysqlRepo) GetByPhone

func (u *UserMysqlRepo) GetByPhone(ctx context.Context, phone string) (*entities.User, error)

func (*UserMysqlRepo) GetOne

func (u *UserMysqlRepo) GetOne(ctx context.Context, id int64) (*entities.User, error)

func (*UserMysqlRepo) List

func (u *UserMysqlRepo) List(ctx context.Context, page, limit int) ([]*entities.User, error)

func (*UserMysqlRepo) UpdateOne

func (u *UserMysqlRepo) UpdateOne(ctx context.Context, user *entities.User) (*entities.User, error)

func (*UserMysqlRepo) VerifyPhone

func (u *UserMysqlRepo) VerifyPhone(ctx context.Context, phone string) (bool, error)

type WalletMysqlRepo

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

func NewWalletMysqlRepo

func NewWalletMysqlRepo(
	db *infras.MysqlConnector,
) *WalletMysqlRepo

func (*WalletMysqlRepo) CreateOne

func (*WalletMysqlRepo) GetTotalAmount

func (w *WalletMysqlRepo) GetTotalAmount(
	ctx context.Context,
	userId int64,
) (*decimal.Decimal, error)

func (*WalletMysqlRepo) ListTransactions

func (w *WalletMysqlRepo) ListTransactions(
	ctx context.Context,
	userId int64,
	page, limit int,
) ([]*entities.WalletTransaction, error)

Jump to

Keyboard shortcuts

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