Documentation ¶
Index ¶
- type Repo
- type Repository
- func (r *Repository) ContractTokenHolders(mapID, limit int64) (holders []models.AssetHolder, count int64, err error)
- func (r *Repository) CreateBulk(rights []models.NFTToken) error
- func (r *Repository) NTFContractsList(contractID string, limit, offset uint) (contracts []models.NFTContract, count int64, err error)
- func (r *Repository) TokenHoldersCount(mapID, tokenNum int64, isEqual bool) (count int64, err error)
- func (r *Repository) TokenHoldersList(mapID int64, tokenID *int64, limit uint, offset uint) (holders []models.AssetHolder, count int64, err error)
- func (r *Repository) TokensList(contractID int64, tokenID *int64, limit uint, offset uint) (tokens []models.NFTToken, count int64, err error)
- func (r *Repository) UpdateNFTToken(contractID int64, tokenID uint64, isForSale bool, lastPrice *int64, ...) error
- func (r *Repository) UpdateNTFContractLastHeight(contract models.NFTContract) error
- func (r *Repository) UpdateNTFContractLastOPHeight(contract models.NFTContract) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repo ¶
type Repo interface { NTFContractsList(string, uint, uint) ([]models.NFTContract, int64, error) TokensList(int64, *int64, uint, uint) ([]models.NFTToken, int64, error) UpdateNTFContractLastHeight(contract models.NFTContract) error UpdateNTFContractLastOPHeight(contract models.NFTContract) error CreateBulk(rights []models.NFTToken) error UpdateNFTToken(contractID int64, tokenID uint64, isForSale bool, lastPrice *int64, lastActive time.Time) error ContractTokenHolders(mapID, limit int64) (tokens []models.AssetHolder, count int64, err error) TokenHoldersList(mapID int64, tokenID *int64, limit, offset uint) (tokens []models.AssetHolder, count int64, err error) TokenHoldersCount(mapID, tokenNum int64, isEqual bool) (int64, error) }
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
Repository is the account repo implementation.
func New ¶
func New(db *gorm.DB) *Repository
New creates an instance of repository using the provided db.
func (*Repository) ContractTokenHolders ¶
func (r *Repository) ContractTokenHolders(mapID, limit int64) (holders []models.AssetHolder, count int64, err error)
func (*Repository) CreateBulk ¶
func (r *Repository) CreateBulk(rights []models.NFTToken) error
func (*Repository) NTFContractsList ¶
func (r *Repository) NTFContractsList(contractID string, limit, offset uint) (contracts []models.NFTContract, count int64, err error)
func (*Repository) TokenHoldersCount ¶
func (r *Repository) TokenHoldersCount(mapID, tokenNum int64, isEqual bool) (count int64, err error)
func (*Repository) TokenHoldersList ¶
func (r *Repository) TokenHoldersList(mapID int64, tokenID *int64, limit uint, offset uint) (holders []models.AssetHolder, count int64, err error)
func (*Repository) TokensList ¶
func (*Repository) UpdateNFTToken ¶
func (*Repository) UpdateNTFContractLastHeight ¶
func (r *Repository) UpdateNTFContractLastHeight(contract models.NFTContract) error
func (*Repository) UpdateNTFContractLastOPHeight ¶
func (r *Repository) UpdateNTFContractLastOPHeight(contract models.NFTContract) error
Click to show internal directories.
Click to hide internal directories.