Documentation ¶
Index ¶
- Variables
- type CTMeta
- type CheckInfo
- type CheckInfoRepo
- type CheckInfoUsecase
- type CheckType
- type ClaimedCotaNftKvPair
- type ClaimedCotaNftKvPairRepo
- type ClaimedCotaNftKvPairUsecase
- func (uc *ClaimedCotaNftKvPairUsecase) Create(ctx context.Context, c *ClaimedCotaNftKvPair) error
- func (uc *ClaimedCotaNftKvPairUsecase) DeleteByBlockNumber(ctx context.Context, blockNumber uint64) error
- func (uc ClaimedCotaNftKvPairUsecase) ParseClaimedCotaEntries(blockNumber uint64, entry Entry) ([]HoldCotaNftKvPair, []ClaimedCotaNftKvPair, error)
- func (uc ClaimedCotaNftKvPairUsecase) ParseClaimedUpdateCotaEntries(blockNumber uint64, entry Entry) ([]HoldCotaNftKvPair, []ClaimedCotaNftKvPair, error)
- type ClassInfo
- type ClassInfoJson
- type ClassInfoRepo
- type ClassInfoUsecase
- type DefineCotaNftKvPair
- type DefineCotaNftKvPairRepo
- type DefineCotaNftKvPairUsecase
- func (uc *DefineCotaNftKvPairUsecase) Create(ctx context.Context, d *DefineCotaNftKvPair) error
- func (uc *DefineCotaNftKvPairUsecase) DeleteByBlockNumber(ctx context.Context, blockNumber uint64) error
- func (uc *DefineCotaNftKvPairUsecase) ParseDefineCotaEntries(blockNumber uint64, entry Entry) ([]DefineCotaNftKvPair, error)
- type Entry
- type HoldCotaNftKvPair
- type HoldCotaNftKvPairRepo
- type HoldCotaNftKvPairUsecase
- func (uc *HoldCotaNftKvPairUsecase) Create(ctx context.Context, h *HoldCotaNftKvPair) error
- func (uc *HoldCotaNftKvPairUsecase) DeleteByBlockNumber(ctx context.Context, blockNumber uint64) error
- func (uc HoldCotaNftKvPairUsecase) ParseHoldCotaEntries(blockNumber uint64, entry Entry) ([]HoldCotaNftKvPair, error)
- type InvalidDataRepo
- type InvalidDataUsecase
- type IssuerInfo
- type IssuerInfoJson
- type IssuerInfoRepo
- type IssuerInfoUsecase
- func (uc *IssuerInfoUsecase) Create(ctx context.Context, issuer *IssuerInfo) error
- func (uc *IssuerInfoUsecase) DeleteByBlockNumber(ctx context.Context, blockNumber uint64) error
- func (uc IssuerInfoUsecase) ParseMetadata(blockNumber uint64, txIndex uint32, lockScript *ckbTypes.Script, ...) (IssuerInfo, error)
- type KvPair
- func (p KvPair) HasClaimedCotas() bool
- func (p KvPair) HasClassInfos() bool
- func (p KvPair) HasDefineCotas() bool
- func (p KvPair) HasHoldCotas() bool
- func (p KvPair) HasIssuerInfos() bool
- func (p KvPair) HasRegisters() bool
- func (p KvPair) HasUpdatedDefineCotas() bool
- func (p KvPair) HasUpdatedHoldCotas() bool
- func (p KvPair) HasWithdrawCotas() bool
- type KvPairRepo
- type Localization
- type MetaData
- type MetaType
- type MintCotaKvPair
- type MintCotaKvPairRepo
- type MintCotaKvPairUsecase
- type RegisterCotaKvPair
- type RegisterCotaKvPairRepo
- type RegisterCotaKvPairUsecase
- func (uc *RegisterCotaKvPairUsecase) Create(ctx context.Context, register *RegisterCotaKvPair) error
- func (uc *RegisterCotaKvPairUsecase) DeleteByBlockNumber(ctx context.Context, blockNumber uint64) error
- func (uc *RegisterCotaKvPairUsecase) ParseRegistryEntries(ctx context.Context, blockNumber uint64, tx *ckbTypes.Transaction) ([]RegisterCotaKvPair, error)
- type Script
- type SyncKvPairUsecase
- func (uc SyncKvPairUsecase) CreateCotaEntryKvPairs(ctx context.Context, checkInfo CheckInfo, kvPair *KvPair) error
- func (uc SyncKvPairUsecase) CreateMetadataKvPairs(ctx context.Context, checkInfo CheckInfo, kvPair *KvPair) error
- func (uc SyncKvPairUsecase) RestoreCotaEntryKvPairs(ctx context.Context, blockNumber uint64) error
- func (uc SyncKvPairUsecase) RestoreMetadataKvPairs(ctx context.Context, blockNumber uint64) error
- type TransferCotaKvPair
- type TransferCotaKvPairRepo
- type TransferCotaKvPairUsecase
- func (uc *TransferCotaKvPairUsecase) FindOrCreateScript(ctx context.Context, script *Script) error
- func (uc *TransferCotaKvPairUsecase) ParseTransferCotaEntries(blockNumber uint64, entry Entry) ([]ClaimedCotaNftKvPair, []WithdrawCotaNftKvPair, error)
- func (uc *TransferCotaKvPairUsecase) ParseTransferUpdateCotaEntries(blockNumber uint64, entry Entry) ([]ClaimedCotaNftKvPair, []WithdrawCotaNftKvPair, error)
- type WithdrawCotaNftKvPair
- type WithdrawCotaNftKvPairRepo
- type WithdrawCotaNftKvPairUsecase
- func (uc *WithdrawCotaNftKvPairUsecase) Create(ctx context.Context, w *WithdrawCotaNftKvPair) error
- func (uc *WithdrawCotaNftKvPairUsecase) DeleteByBlockNumber(ctx context.Context, blockNumber uint64) error
- func (uc *WithdrawCotaNftKvPairUsecase) FindOrCreateScript(ctx context.Context, script *Script) error
- func (uc *WithdrawCotaNftKvPairUsecase) ParseWithdrawCotaEntries(blockNumber uint64, entry Entry) ([]WithdrawCotaNftKvPair, error)
- type WithdrawExtraInfoRepo
- type WithdrawExtraInfoUsecase
- func (uc *WithdrawExtraInfoUsecase) CreateExtraInfo(ctx context.Context, outPoint string, txHash string, lockScriptId uint) error
- func (uc *WithdrawExtraInfoUsecase) FindOrCreateScript(ctx context.Context, script *Script) error
- func (uc *WithdrawExtraInfoUsecase) FindQueryInfos(ctx context.Context, page int, pageSize int) ([]WithdrawQueryInfo, error)
- type WithdrawQueryInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewCheckInfoUsecase, NewRegisterCotaKvPairUsecase, NewDefineCotaNftKvPairUsecase, NewHoldCotaNftKvPairUsecase, NewWithdrawCotaNftKvPairUsecase, NewClaimedCotaNftKvPairUsecase, NewSyncKvPairUsecase, NewMintCotaKvPairUsecase, NewTransferCotaKvPairUsecase, NewIssuerInfoUsecase, NewClassInfoUsecase, NewInvalidDataUsecase, NewWithdrawExtraInfoUsecase)
Functions ¶
This section is empty.
Types ¶
type CTMeta ¶
type CTMeta struct { Id string `json:"id"` Ver string `json:"ver"` Metadata MetaData `json:"metadata"` }
func ParseMetadata ¶
type CheckInfoRepo ¶
type CheckInfoUsecase ¶
type CheckInfoUsecase struct {
// contains filtered or unexported fields
}
func NewCheckInfoUsecase ¶
func NewCheckInfoUsecase(repo CheckInfoRepo, logger *logger.Logger) *CheckInfoUsecase
func (*CheckInfoUsecase) Clean ¶
func (uc *CheckInfoUsecase) Clean(ctx context.Context, checkType CheckType) error
func (*CheckInfoUsecase) Create ¶
func (uc *CheckInfoUsecase) Create(ctx context.Context, checkInfo *CheckInfo) error
func (*CheckInfoUsecase) LastCheckInfo ¶
func (uc *CheckInfoUsecase) LastCheckInfo(ctx context.Context, checkInfo *CheckInfo) error
type ClaimedCotaNftKvPair ¶
type ClaimedCotaNftKvPairRepo ¶
type ClaimedCotaNftKvPairRepo interface { CreateClaimedCotaNftKvPair(ctx context.Context, w *ClaimedCotaNftKvPair) error DeleteClaimedCotaNftKvPairs(ctx context.Context, blockNumber uint64) error ParseClaimedCotaEntries(blockNumber uint64, entry Entry) ([]HoldCotaNftKvPair, []ClaimedCotaNftKvPair, error) ParseClaimedUpdateCotaEntries(blockNumber uint64, entry Entry) ([]HoldCotaNftKvPair, []ClaimedCotaNftKvPair, error) }
type ClaimedCotaNftKvPairUsecase ¶
type ClaimedCotaNftKvPairUsecase struct {
// contains filtered or unexported fields
}
func NewClaimedCotaNftKvPairUsecase ¶
func NewClaimedCotaNftKvPairUsecase(repo ClaimedCotaNftKvPairRepo, logger *logger.Logger) *ClaimedCotaNftKvPairUsecase
func (*ClaimedCotaNftKvPairUsecase) Create ¶
func (uc *ClaimedCotaNftKvPairUsecase) Create(ctx context.Context, c *ClaimedCotaNftKvPair) error
func (*ClaimedCotaNftKvPairUsecase) DeleteByBlockNumber ¶
func (uc *ClaimedCotaNftKvPairUsecase) DeleteByBlockNumber(ctx context.Context, blockNumber uint64) error
func (ClaimedCotaNftKvPairUsecase) ParseClaimedCotaEntries ¶
func (uc ClaimedCotaNftKvPairUsecase) ParseClaimedCotaEntries(blockNumber uint64, entry Entry) ([]HoldCotaNftKvPair, []ClaimedCotaNftKvPair, error)
func (ClaimedCotaNftKvPairUsecase) ParseClaimedUpdateCotaEntries ¶
func (uc ClaimedCotaNftKvPairUsecase) ParseClaimedUpdateCotaEntries(blockNumber uint64, entry Entry) ([]HoldCotaNftKvPair, []ClaimedCotaNftKvPair, error)
type ClassInfoJson ¶
type ClassInfoJson struct { CotaId string `json:"cota_id" mapstructure:"cota_id,omitempty"` Version string `json:"version" mapstructure:",omitempty"` Name string `json:"name" mapstructure:",omitempty"` Symbol string `json:"symbol" mapstructure:",omitempty"` Description string `json:"description" mapstructure:",omitempty"` Image string `json:"image" mapstructure:",omitempty"` Audio string `json:"audio"` Video string `json:"video" mapstructure:",omitempty"` Model string `json:"model" mapstructure:",omitempty"` Characteristic [][]any `json:"characteristic" mapstructure:",omitempty"` Properties map[string]any `json:"properties" mapstructure:",omitempty"` Localization Localization `json:"localization" mapstructure:",omitempty"` }
type ClassInfoRepo ¶
type ClassInfoUsecase ¶
type ClassInfoUsecase struct {
// contains filtered or unexported fields
}
func NewClassInfoUsecase ¶
func NewClassInfoUsecase(repo ClassInfoRepo, logger *logger.Logger) *ClassInfoUsecase
func (*ClassInfoUsecase) Create ¶
func (uc *ClassInfoUsecase) Create(ctx context.Context, class *ClassInfo) error
func (*ClassInfoUsecase) DeleteByBlockNumber ¶
func (uc *ClassInfoUsecase) DeleteByBlockNumber(ctx context.Context, blockNumber uint64) error
func (ClassInfoUsecase) ParseMetadata ¶
type DefineCotaNftKvPair ¶
type DefineCotaNftKvPairRepo ¶
type DefineCotaNftKvPairUsecase ¶
type DefineCotaNftKvPairUsecase struct {
// contains filtered or unexported fields
}
func NewDefineCotaNftKvPairUsecase ¶
func NewDefineCotaNftKvPairUsecase(repo DefineCotaNftKvPairRepo, logger *logger.Logger) *DefineCotaNftKvPairUsecase
func (*DefineCotaNftKvPairUsecase) Create ¶
func (uc *DefineCotaNftKvPairUsecase) Create(ctx context.Context, d *DefineCotaNftKvPair) error
func (*DefineCotaNftKvPairUsecase) DeleteByBlockNumber ¶
func (uc *DefineCotaNftKvPairUsecase) DeleteByBlockNumber(ctx context.Context, blockNumber uint64) error
func (*DefineCotaNftKvPairUsecase) ParseDefineCotaEntries ¶
func (uc *DefineCotaNftKvPairUsecase) ParseDefineCotaEntries(blockNumber uint64, entry Entry) ([]DefineCotaNftKvPair, error)
type HoldCotaNftKvPair ¶
type HoldCotaNftKvPairRepo ¶
type HoldCotaNftKvPairUsecase ¶
type HoldCotaNftKvPairUsecase struct {
// contains filtered or unexported fields
}
func NewHoldCotaNftKvPairUsecase ¶
func NewHoldCotaNftKvPairUsecase(repo HoldCotaNftKvPairRepo, logger *logger.Logger) *HoldCotaNftKvPairUsecase
func (*HoldCotaNftKvPairUsecase) Create ¶
func (uc *HoldCotaNftKvPairUsecase) Create(ctx context.Context, h *HoldCotaNftKvPair) error
func (*HoldCotaNftKvPairUsecase) DeleteByBlockNumber ¶
func (uc *HoldCotaNftKvPairUsecase) DeleteByBlockNumber(ctx context.Context, blockNumber uint64) error
func (HoldCotaNftKvPairUsecase) ParseHoldCotaEntries ¶
func (uc HoldCotaNftKvPairUsecase) ParseHoldCotaEntries(blockNumber uint64, entry Entry) ([]HoldCotaNftKvPair, error)
type InvalidDataRepo ¶
type InvalidDataUsecase ¶
type InvalidDataUsecase struct {
// contains filtered or unexported fields
}
func NewInvalidDataUsecase ¶
func NewInvalidDataUsecase(repo InvalidDataRepo, logger *logger.Logger) *InvalidDataUsecase
type IssuerInfo ¶
type IssuerInfoJson ¶
type IssuerInfoJson struct { Version string `json:"version" mapstructure:",omitempty"` Name string `json:"name" mapstructure:",omitempty"` Avatar string `json:"avatar" mapstructure:",omitempty"` Description string `json:"description" mapstructure:",omitempty"` Localization Localization `json:"localization" mapstructure:",omitempty"` }
type IssuerInfoRepo ¶
type IssuerInfoUsecase ¶
type IssuerInfoUsecase struct {
// contains filtered or unexported fields
}
func NewIssuerInfoUsecase ¶
func NewIssuerInfoUsecase(repo IssuerInfoRepo, logger *logger.Logger) *IssuerInfoUsecase
func (*IssuerInfoUsecase) Create ¶
func (uc *IssuerInfoUsecase) Create(ctx context.Context, issuer *IssuerInfo) error
func (*IssuerInfoUsecase) DeleteByBlockNumber ¶
func (uc *IssuerInfoUsecase) DeleteByBlockNumber(ctx context.Context, blockNumber uint64) error
func (IssuerInfoUsecase) ParseMetadata ¶
func (uc IssuerInfoUsecase) ParseMetadata(blockNumber uint64, txIndex uint32, lockScript *ckbTypes.Script, issuerMeta map[string]any) (IssuerInfo, error)
type KvPair ¶
type KvPair struct { Registers []RegisterCotaKvPair DefineCotas []DefineCotaNftKvPair UpdatedDefineCotas []DefineCotaNftKvPair HoldCotas []HoldCotaNftKvPair UpdatedHoldCotas []HoldCotaNftKvPair WithdrawCotas []WithdrawCotaNftKvPair ClaimedCotas []ClaimedCotaNftKvPair IssuerInfos []IssuerInfo ClassInfos []ClassInfo }
func (KvPair) HasClaimedCotas ¶
func (KvPair) HasClassInfos ¶
func (KvPair) HasDefineCotas ¶
func (KvPair) HasHoldCotas ¶
func (KvPair) HasIssuerInfos ¶
func (KvPair) HasRegisters ¶
func (KvPair) HasUpdatedDefineCotas ¶
func (KvPair) HasUpdatedHoldCotas ¶
func (KvPair) HasWithdrawCotas ¶
type KvPairRepo ¶
type KvPairRepo interface { CreateCotaEntryKvPairs(ctx context.Context, checkInfo CheckInfo, kvPair *KvPair) error RestoreCotaEntryKvPairs(ctx context.Context, blockNumber uint64) error CreateMetadataKvPairs(ctx context.Context, checkInfo CheckInfo, kvPair *KvPair) error RestoreMetadataKvPairs(ctx context.Context, blockNumber uint64) error }
type Localization ¶
type MintCotaKvPair ¶
type MintCotaKvPair struct{}
type MintCotaKvPairRepo ¶
type MintCotaKvPairRepo interface { ParseMintCotaEntries(blockNumber uint64, entry Entry) ([]DefineCotaNftKvPair, []WithdrawCotaNftKvPair, error) FindOrCreateScript(ctx context.Context, script *Script) error }
type MintCotaKvPairUsecase ¶
type MintCotaKvPairUsecase struct {
// contains filtered or unexported fields
}
func NewMintCotaKvPairUsecase ¶
func NewMintCotaKvPairUsecase(repo MintCotaKvPairRepo, logger *logger.Logger) *MintCotaKvPairUsecase
func (*MintCotaKvPairUsecase) FindOrCreateScript ¶
func (uc *MintCotaKvPairUsecase) FindOrCreateScript(ctx context.Context, script *Script) error
func (*MintCotaKvPairUsecase) ParseMintCotaEntries ¶
func (uc *MintCotaKvPairUsecase) ParseMintCotaEntries(blockNumber uint64, entry Entry) ([]DefineCotaNftKvPair, []WithdrawCotaNftKvPair, error)
type RegisterCotaKvPair ¶
type RegisterCotaKvPairRepo ¶
type RegisterCotaKvPairRepo interface { CreateRegisterCotaKvPair(ctx context.Context, register *RegisterCotaKvPair) error DeleteRegisterCotaKvPairs(ctx context.Context, blockNumber uint64) error ParseRegistryEntries(ctx context.Context, blockNumber uint64, tx *ckbTypes.Transaction) ([]RegisterCotaKvPair, error) }
type RegisterCotaKvPairUsecase ¶
type RegisterCotaKvPairUsecase struct {
// contains filtered or unexported fields
}
func NewRegisterCotaKvPairUsecase ¶
func NewRegisterCotaKvPairUsecase(repo RegisterCotaKvPairRepo, logger *logger.Logger) *RegisterCotaKvPairUsecase
func (*RegisterCotaKvPairUsecase) Create ¶
func (uc *RegisterCotaKvPairUsecase) Create(ctx context.Context, register *RegisterCotaKvPair) error
func (*RegisterCotaKvPairUsecase) DeleteByBlockNumber ¶
func (uc *RegisterCotaKvPairUsecase) DeleteByBlockNumber(ctx context.Context, blockNumber uint64) error
func (*RegisterCotaKvPairUsecase) ParseRegistryEntries ¶
func (uc *RegisterCotaKvPairUsecase) ParseRegistryEntries(ctx context.Context, blockNumber uint64, tx *ckbTypes.Transaction) ([]RegisterCotaKvPair, error)
type SyncKvPairUsecase ¶
type SyncKvPairUsecase struct {
// contains filtered or unexported fields
}
func NewSyncKvPairUsecase ¶
func NewSyncKvPairUsecase(repo KvPairRepo, logger *logger.Logger) *SyncKvPairUsecase
func (SyncKvPairUsecase) CreateCotaEntryKvPairs ¶
func (SyncKvPairUsecase) CreateMetadataKvPairs ¶
func (SyncKvPairUsecase) RestoreCotaEntryKvPairs ¶
func (uc SyncKvPairUsecase) RestoreCotaEntryKvPairs(ctx context.Context, blockNumber uint64) error
func (SyncKvPairUsecase) RestoreMetadataKvPairs ¶
func (uc SyncKvPairUsecase) RestoreMetadataKvPairs(ctx context.Context, blockNumber uint64) error
type TransferCotaKvPair ¶
type TransferCotaKvPair struct{}
type TransferCotaKvPairRepo ¶
type TransferCotaKvPairRepo interface { ParseTransferCotaEntries(blockNumber uint64, entry Entry) ([]ClaimedCotaNftKvPair, []WithdrawCotaNftKvPair, error) ParseTransferUpdateCotaEntries(blockNumber uint64, entry Entry) ([]ClaimedCotaNftKvPair, []WithdrawCotaNftKvPair, error) FindOrCreateScript(ctx context.Context, script *Script) error }
type TransferCotaKvPairUsecase ¶
type TransferCotaKvPairUsecase struct {
// contains filtered or unexported fields
}
func NewTransferCotaKvPairUsecase ¶
func NewTransferCotaKvPairUsecase(repo TransferCotaKvPairRepo, logger *logger.Logger) *TransferCotaKvPairUsecase
func (*TransferCotaKvPairUsecase) FindOrCreateScript ¶
func (uc *TransferCotaKvPairUsecase) FindOrCreateScript(ctx context.Context, script *Script) error
func (*TransferCotaKvPairUsecase) ParseTransferCotaEntries ¶
func (uc *TransferCotaKvPairUsecase) ParseTransferCotaEntries(blockNumber uint64, entry Entry) ([]ClaimedCotaNftKvPair, []WithdrawCotaNftKvPair, error)
func (*TransferCotaKvPairUsecase) ParseTransferUpdateCotaEntries ¶
func (uc *TransferCotaKvPairUsecase) ParseTransferUpdateCotaEntries(blockNumber uint64, entry Entry) ([]ClaimedCotaNftKvPair, []WithdrawCotaNftKvPair, error)
type WithdrawCotaNftKvPair ¶
type WithdrawCotaNftKvPairRepo ¶
type WithdrawCotaNftKvPairRepo interface { CreateWithdrawCotaNftKvPair(ctx context.Context, w *WithdrawCotaNftKvPair) error DeleteWithdrawCotaNftKvPairs(ctx context.Context, blockNumber uint64) error ParseWithdrawCotaEntries(blockNumber uint64, entry Entry) ([]WithdrawCotaNftKvPair, error) FindOrCreateScript(ctx context.Context, script *Script) error }
type WithdrawCotaNftKvPairUsecase ¶
type WithdrawCotaNftKvPairUsecase struct {
// contains filtered or unexported fields
}
func NewWithdrawCotaNftKvPairUsecase ¶
func NewWithdrawCotaNftKvPairUsecase(repo WithdrawCotaNftKvPairRepo, logger *logger.Logger) *WithdrawCotaNftKvPairUsecase
func (*WithdrawCotaNftKvPairUsecase) Create ¶
func (uc *WithdrawCotaNftKvPairUsecase) Create(ctx context.Context, w *WithdrawCotaNftKvPair) error
func (*WithdrawCotaNftKvPairUsecase) DeleteByBlockNumber ¶
func (uc *WithdrawCotaNftKvPairUsecase) DeleteByBlockNumber(ctx context.Context, blockNumber uint64) error
func (*WithdrawCotaNftKvPairUsecase) FindOrCreateScript ¶
func (uc *WithdrawCotaNftKvPairUsecase) FindOrCreateScript(ctx context.Context, script *Script) error
func (*WithdrawCotaNftKvPairUsecase) ParseWithdrawCotaEntries ¶
func (uc *WithdrawCotaNftKvPairUsecase) ParseWithdrawCotaEntries(blockNumber uint64, entry Entry) ([]WithdrawCotaNftKvPair, error)
type WithdrawExtraInfoRepo ¶
type WithdrawExtraInfoUsecase ¶
type WithdrawExtraInfoUsecase struct {
// contains filtered or unexported fields
}
func NewWithdrawExtraInfoUsecase ¶
func NewWithdrawExtraInfoUsecase(repo WithdrawExtraInfoRepo, logger *logger.Logger) *WithdrawExtraInfoUsecase
func (*WithdrawExtraInfoUsecase) CreateExtraInfo ¶
func (*WithdrawExtraInfoUsecase) FindOrCreateScript ¶
func (uc *WithdrawExtraInfoUsecase) FindOrCreateScript(ctx context.Context, script *Script) error
func (*WithdrawExtraInfoUsecase) FindQueryInfos ¶
func (uc *WithdrawExtraInfoUsecase) FindQueryInfos(ctx context.Context, page int, pageSize int) ([]WithdrawQueryInfo, error)
type WithdrawQueryInfo ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.