nftUsecase

package
v0.0.0-...-a9fa8a7 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NftUsecaseService

type NftUsecaseService interface {
	CreateNft(pctx context.Context, req *nft.CreateNftReq, userId string) (any, error)
	FindOneNft(pctx context.Context, nftId string) (*nft.NftShowCase, error)
	FindManyNfts(pctx context.Context, basePaginateUrl string, req *nft.NftSearchReq) (*models.PaginateRes, error)
	EditNft(pctx context.Context, nftId string, userId string, req *nft.NftUpdateReq) (*nft.NftShowCase, error)
	BlockOrUnblockNft(pctx context.Context, nftId string, userId string) (bool, error)
	DeleteNft(pctx context.Context, nftId string, userId string) (bool, error)

	FindNftsInIds(pctx context.Context, req *nftPb.FindNftsInIdsReq) (*nftPb.FindNftsInIdsRes, error)

	// -------------------- Category -------------------- //
	CreateCategory(pctx context.Context, req *nft.NftCategoryReq) (any, error)
	FindOneCategory(pctx context.Context, categoryId string) (*nft.NftCategory, error)
	FindManyCategories(pctx context.Context, basePaginateUrl string, req *nft.NftSearchReq) ([]*nft.NftCategory, error)
	EditCategory(pctx context.Context, categoryId string, req *nft.NftCategory) (*nft.NftCategory, error)
	BlockOrUnblockCategory(pctx context.Context, categoryId string) (bool, error)
	DeleteCategory(pctx context.Context, categoryId string) (bool, error)

	// -------------------- NFT Image -------------------- //
	UploadToGCP(req []*nft.FileReq) ([]*nft.FileRes, error)
	DeleteFileFromGCP(req []*nft.DeleteFileReq) error

	// -------------------- NFT Bidding Owner -------------------- //
	FindManyBids(pctx context.Context, userId string) (any, error)
	CreateBid(pctx context.Context, req *nft.CreateBidReq, userId string) (any, error)
	EditBid(pctx context.Context, bidId string, userId string, req *nft.CreateBidReq) (*nft.Bid, error)
	DeleteBid(pctx context.Context, bidId string, userId string) error

	// -------------------- NFT Bidding User -------------------- //
	FindUserBids(pctx context.Context, userId string) (any, error)
	BidNft(pctx context.Context, nftId string, userId string, price string) (any, error)
	WithdrawBid(pctx context.Context, bidId string, userId string) error
}

func NewNftUsecase

func NewNftUsecase(nftRepository nftRepository.NftRepositoryService) NftUsecaseService

Jump to

Keyboard shortcuts

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