Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NftRepositoryService ¶
type NftRepositoryService interface { // ------------------- NFT ------------------- // IsUniqueNft(pctx context.Context, title string) bool InsertOneNft(pctx context.Context, req *nft.Nft) (primitive.ObjectID, error) FindOneNft(pctx context.Context, nftId string) (*nft.Nft, error) FindManyNfts(pctx context.Context, filter primitive.D, opts []*options.FindOptions) ([]*nft.NftShowCase, error) CountNfts(pctx context.Context, filter primitive.D) (int64, error) UpdateOneNft(pctx context.Context, nftId string, req primitive.M) error BlockOrUnblockNft(pctx context.Context, nftId string, isActive bool) error DeleteNft(pctx context.Context, nftId string) error // ------------------- Category ------------------- // InsertOneCategory(pctx context.Context, req *nft.NftCategory) (primitive.ObjectID, error) FindOneCategory(pctx context.Context, categoryId string) (*nft.NftCategory, error) FindManyCategories(pctx context.Context, filter primitive.D, opts []*options.FindOptions) ([]*nft.NftCategory, error) UpdateOneCategory(pctx context.Context, categoryId string, req primitive.M) error BlockOrUnblockCategory(pctx context.Context, categoryId string, isActive bool) error DeleteCategory(pctx context.Context, categoryId string) error // ------------------- Bidding ------------------- // FindManyBids(pctx context.Context, userId string) ([]*nft.Bid, error) CreateBid(pctx context.Context, userId string, req *nft.CreateBidReq) (primitive.ObjectID, error) FindOneBid(pctx context.Context, bidId string) (*nft.Bid, error) EditBid(pctx context.Context, bidId string, req primitive.M) error DeleteBid(pctx context.Context, bidId string) error // ------------------- NFT Bidding User ------------------- // FindOneUserBid(pctx context.Context, userId, bidId string) (*nft.SingleBid, error) FindUserBids(pctx context.Context, userId string) (any, error) BidNft(pctx context.Context, userId, nftId, price string) (primitive.ObjectID, error) WithdrawBid(pctx context.Context, bidId string) error }
func NewNftRepository ¶
func NewNftRepository(db *mongo.Client) NftRepositoryService
Click to show internal directories.
Click to hide internal directories.